How can we help you today? How can we help you today?

How to skip baseline script during creation of release artifact in yaml

When i use classic editor the baseline is skipped as expected. But when i use same configuration in yaml pipeline as same as classic editor baseline is not getting skipped and in the logs i see (Deploy) instead of (mark as deployed), I had to use yaml since i need to write custom query to handle multiple databases within a environment. 

YAML logs:(Deploy) Migrations\1.0.0-Baseline\001_20240419-1532.sql
Classic editor logs:(Mark as Deployed) Migrations\1.0.0-Baseline\001_20240419-1518.sql


this is my yaml
- task: redgatesoftware.redgateDlmAutomationRelease.DlmAutomationReleaseTask.RedgateSqlChangeAutomationRelease@4
  displayName: 'Create Release Artifact'
  inputs:
    Operation: Create
    NuGetFile: '$(System.DefaultWorkingDirectory)/Database Build Artifact/PL_CLIENT_package.1.0.$(Build.BuildId).nupkg'
    TargetDatabaseServer: ${{ parameters.dbServer }}
    TargetDatabaseName: ${{ parameters.databaseName }}
    TargetAuthMethod: sqlServerAuth
    TargetDatabaseUsername: ${{ parameters.sqlServerAdminUserName }}
    TargetDatabasePassword: ${{ parameters.sqlServerAdminPassword }}
    SkipPostUpdateSchemaCheck: false
    requiredVersionOfDlma: 'latest'
    TransactionIsolationLevel: 'serializable'
    DriftFiltering: 'ModifiedObjectsOnly'
    AbortOnWarning: 'none'
    DeleteFilesInExportFolder: true
    IgnoreStaticData: false
    AppendEnvironment: true
    TargetDatabaseConnectionType: 'explicit'
    TargetTrustServerCertificate: false
    TargetEncrypt: false
    SourceAuthMethod: 'windowsAuth'
    SourceEncrypt: false
    SourceTrustServerCertificate: false
Yukesh_Sekar29
0

Comments

1 comment

  • DanC
    Hi @Yukesh_Sekar29

    The baseline will only be deployed to a target database if it's empty.

    In rare cases, if you've modified the schema history table and there's no entry for the baseline, it will also be deployed.
    DanC
    0

Add comment

Please sign in to leave a comment.