Skip to content

Commit 8b57d11

Browse files
change pipelines to use default redgate rules from central location for config
1 parent a2d8755 commit 8b57d11

31 files changed

+81
-146
lines changed

Azure/Azure-Templatized-YML-Pipeline/flyway-11.14/templates/InstallFlywayWindows.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ $flywayVersion = '10.17.3'
66

77
#Flyway URL to download CLI
88

9-
$Url = "https://download.red-gate.com/maven/release/com/redgate/flyway/flyway-commandline/$flywayVersion/flyway-commandline-$flywayVersion-windows-x64.zip"
9+
$Url = "https://download.red-gate.com/maven/release/org/flywaydb/enterprise/flyway-commandline/$flywayVersion/flyway-commandline-$flywayVersion-windows-x64.zip"
1010

1111
#Insert path for downloaded files
1212

Azure/Azure-Templatized-YML-Pipeline/flyway-11.14/templates/build-windows-install-fw.yml

Lines changed: 0 additions & 48 deletions
This file was deleted.

Azure/Azure-Templatized-YML-Pipeline/flyway-11.14/templates/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ stages:
7373
FLYWAY_CLEAN_DISABLED: false
7474

7575
- script: '$(FLYWAY) info check -code -environments.target.url="$(target_database_JDBC)" -environments.check.url="$(check_JDBC)" -check.buildEnvironment="check" -check.rulesLocation="$(Build.SourcesDirectory)\templates\rules" -reportFilename="$(System.ArtifactsDirectory)\$(databaseName)-$(Build.BuildId)-Code-Analysis.html"'
76-
continueOnError: false
76+
continueOnError: true
7777
workingDirectory: '$(WORKING_DIRECTORY)\$(Build.Repository.Name)'
7878
displayName: '$(DRIFT_AND_CHANGE_REPORT_DISPLAY_NAME)'
7979
condition: and(succeeded(), eq('${{ parameters.executeStaticCodeAnalysis }}', true))

Azure/Azure-Templatized-YML-Pipeline/flyway-11.14/templates/deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ stages:
111111
- checkout: self
112112
name: source
113113

114-
- script: '$(FLYWAY) info check -dryrun -drift -changes -code -environments.target.url="$(target_database_JDBC)" -environments.check.url="$(check_JDBC)" -check.buildEnvironment="check" -environments.check.provisioner="clean" -check.rulesLocation="$(Build.SourcesDirectory)\templates\rules" -check.failOnDrift="${{parameters.failReleaseIfDriftDetected}}" -reportFilename="$(System.ArtifactsDirectory)\$(databaseName)-$(Build.BuildId)-$(DRIFT_AND_CHANGE_REPORT)"'
114+
- script: '$(FLYWAY) info check -dryrun -drift -changes -code -environments.target.url="$(target_database_JDBC)" -environments.check.url="$(check_JDBC)" -check.buildEnvironment="check" -check.rulesLocation="$(Build.SourcesDirectory)\templates\rules" -check.failOnDrift="${{parameters.failReleaseIfDriftDetected}}" -reportFilename="$(System.ArtifactsDirectory)\$(databaseName)-$(Build.BuildId)-$(DRIFT_AND_CHANGE_REPORT)"'
115115
continueOnError: false
116116
workingDirectory: '$(WORKING_DIRECTORY)\$(Build.Repository.Name)'
117117
displayName: '$(DRIFT_AND_CHANGE_REPORT_DISPLAY_NAME)'
@@ -140,7 +140,7 @@ stages:
140140
- checkout: self
141141
name: source
142142

143-
- script: '$(FLYWAY) info check -dryrun -drift -changes -environments.target.url="$(target_database_JDBC)" -environments.check.url="$(check_JDBC)" -check.buildEnvironment="check" -environments.check.provisioner="clean" -check.rulesLocation="$(Build.SourcesDirectory)\templates\rules" -check.failOnDrift="${{parameters.failReleaseIfDriftDetected}}" -reportFilename="$(System.ArtifactsDirectory)\$(databaseName)-$(Build.BuildId)-$(DRIFT_AND_CHANGE_REPORT)"'
143+
- script: '$(FLYWAY) info check -dryrun -drift -changes -environments.target.url="$(target_database_JDBC)" -environments.check.url="$(check_JDBC)" -check.buildEnvironment="check" -check.rulesLocation="$(Build.SourcesDirectory)\templates\rules" -check.failOnDrift="${{parameters.failReleaseIfDriftDetected}}" -reportFilename="$(System.ArtifactsDirectory)\$(databaseName)-$(Build.BuildId)-$(DRIFT_AND_CHANGE_REPORT)"'
144144
workingDirectory: '$(WORKING_DIRECTORY)'
145145
continueOnError: false
146146
displayName: '$(DRIFT_AND_CHANGE_REPORT_DISPLAY_NAME)'

Azure/Azure-Templatized-YML-Pipeline/flyway-11.14/templates/generate-migrations.yml

Whitespace-only changes.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
$projectPath = "$(System.DefaultWorkingDirectory)\$(Build.Repository.Name)" # Get-Location for current dir
2+
3+
#source of Changes eg. Shared Dev environment
4+
$sourceUrl = "jdbc:sqlserver://localhost;databaseName=NewWorldDB_Dev;encrypt=false;integratedSecurity=true;trustServerCertificate=true"
5+
6+
#scratch DB to allow flyway to use to generate a new script - can provide a backup file that flyway will rehydrate on the specified URL or existing empty db to build entirly from code eg. 1__Baseline.sql to 1+n__current_version.sql
7+
$buildUrl = "jdbc:sqlserver://localhost;databaseName=NewWorldDB_Shadow;encrypt=false;integratedSecurity=true;trustServerCertificate=true"
8+
9+
#the Description of the migration script generated - should probably include feature/ticket information
10+
$scriptName = "YourNewMigrationDescription"
11+
12+
#Syncs the Schema Model folder with the provided Source URL
13+
flyway diff model "-workingDirectory=$projectPath" "-diff.source=dev" "-diff.target=schemaModel" "-environments.dev.url=$sourceUrl"
14+
#Generated a new migration script by comparing the Schema Model folder to Build Url after it's been brought to current version.
15+
flyway diff generate "-workingDirectory=$projectPath" "-diff.source=schemaModel" "-diff.target=migrations" "-generate.types=versioned,undo" "-generate.description=$scriptName" "-diff.buildEnvironment=shadow" "-environments.shadow.url=$buildUrl"

Azure/Azure-Templatized-YML-Pipeline/flyway-11.14/templates/rules/RX001__DropTables.toml

Lines changed: 0 additions & 4 deletions
This file was deleted.

Azure/Azure-Templatized-YML-Pipeline/flyway-11.14/templates/rules/RX002__PasswordChange_Oracle.toml

Lines changed: 0 additions & 4 deletions
This file was deleted.

Azure/Azure-Templatized-YML-Pipeline/flyway-11.14/templates/rules/RX002__PasswordChange_Postgres.toml

Lines changed: 0 additions & 4 deletions
This file was deleted.

Azure/Azure-Templatized-YML-Pipeline/flyway-11.14/templates/rules/RX002__PasswordChange_TSQL.toml

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)