Flyway

Azure DevOps - Classic Editor - Pipeline Setup Guide (Deprecated)

This guideline is deprecated. The latest Classic Pipeline Setup guide can be found here - https://documentation.red-gate.com/flyway/deploying-database-changes-via-a-pipeline/example-ci-cd-pipelines/azure-devops/azure-devops-classic-editor-simple-build-and-release-pipeline-setup-guide


  1. In your Azure DevOps Organization, click Pipelines > New pipeline.


  2. Click Use the classic editor to create a pipeline without YAML.

  3. Select your repository and configure your settings.


  4. Click Empty job.


  5. Give your pipeline a name and make sure you're in the correct Agent pool.

  6. Use the plus (+) for the Agent job to add 3 Command line tasks and 2 Publish build artifacts tasks and reorder them as shown under the agent (cmd, cmd, pub, cmd, pub).  

  7. For the first cmdline task, set the following properities:
    Name: Validate Migration Scripts
    Script:
    flyway clean migrate info -url=<jdbc_connection>


  8. ToDo - Usernames and passwords need to be set as variables or using integrated security of a service account.


Release process (example)

  1. Pre Release Schema Snapshot
    sco /forceservicename /source HR/Redgate1@localhost/Acceptance{HR} /snapshot C:\Reports\prereleasesnapshot.onp

  2. Drift Detection
    sco /forceservicename /source C:\Reports\prereleasesnapshot.onp{HR} /target C:\Reports\postreleasesnapshot.onp{HR} /Report:C:\Reports\DriftDetection /ReportType:interactive

  3. Deploy To Acceptance
    flyway migrate -url=jdbc:oracle:thin:@//localhost:1521/Acceptance

  4. Post Release Schema Snapshot
    sco /forceservicename /source HR/Redgate1@localhost/Acceptance{HR} /snapshot C:\Reports\postreleasesnapshot.onp

  5. Compile Change Report
    sco /forceservicename /source C:\Reports\prereleasesnapshot.onp{HR} /target C:\Reports\postreleasesnapshot.onp{HR} /Report:C:\Reports\ChangesReport /ReportType:interactive


Didn't find what you were looking for?