Skip to content

Commit 9a6ed7e

Browse files
fix user pass login path
1 parent 37ee5a4 commit 9a6ed7e

File tree

1 file changed

+8
-2
lines changed
  • Azure/Azure-Templatized-YML-Pipeline/flyway-11.14/templates

1 file changed

+8
-2
lines changed

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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,15 @@ variables:
2222
# https://developercommunity.visualstudio.com/t/azure-pipelines-expressions-unable-to-use-length-w/1303114
2323
# https://learn.microsoft.com/en-us/azure/devops/pipelines/process/runtime-parameters?view=azure-devops&tabs=script
2424

25-
# # --check.scope=ALL, DEFAULT, PENDING https://documentation.red-gate.com/fd/flyway-check-scope-setting-303169758.html
25+
# --check.scope=ALL, DEFAULT, PENDING https://documentation.red-gate.com/fd/flyway-check-scope-setting-303169758.html
2626

27-
FLYWAY: 'flyway -check.code.failOnError=true -check.regexEnabled=false -check.rulesConfig="$(WORKING_DIRECTORY)\$(Build.Repository.Name)\sqlfluff.cfg" -installedBy="$(Build.BuildId)" -reportEnabled=true -environment=target -environments.target.schemas="$(schemas)" -environments.check.schemas="$(schemas)" -baselineOnMigrate=true -errorOverrides=S0001:0:I- -baselineVersion=$(BASELINE_VERSION) -email="$(FLYWAY_EMAIL)" -token="$(FLYWAY_TOKEN)" -workingDirectory="$(WORKING_DIRECTORY)" -locations="filesystem:$(WORKING_DIRECTORY)\$(Build.Repository.Name)\migrations" -configFiles="$(WORKING_DIRECTORY)\$(Build.Repository.Name)\flyway.toml"'
27+
# $userName is not defined, use integratedSecurity in JDBC
28+
${{ if gt(length(join('', variables['userName'])), 0) }}:
29+
FLYWAY: 'flyway -check.code.failOnError=false -check.regexEnabled=false -check.rulesConfig="$(WORKING_DIRECTORY)\$(Build.Repository.Name)\sqlfluff.cfg" -installedBy="$(Build.BuildId)" -reportEnabled=true -environment=target -environments.target.schemas="$(schemas)" -environments.check.schemas="$(schemas)" -baselineOnMigrate=true -errorOverrides=S0001:0:I- -baselineVersion=$(BASELINE_VERSION) -email="$(FLYWAY_EMAIL)" -token="$(FLYWAY_TOKEN)" -workingDirectory="$(WORKING_DIRECTORY)" -locations="filesystem:$(WORKING_DIRECTORY)\$(Build.Repository.Name)\migrations" -configFiles="$(WORKING_DIRECTORY)\$(Build.Repository.Name)\flyway.toml"'
30+
31+
# $userName is defined - password implicitly assumed defined
32+
${{ if le(length(join('', variables['userName'])), 0) }}:
33+
FLYWAY: 'flyway -check.code.failOnError=false -check.regexEnabled=false -check.rulesConfig="$(WORKING_DIRECTORY)\$(Build.Repository.Name)\sqlfluff.cfg" -installedBy="$(Build.BuildId)" -reportEnabled=true -environment=target -environments.target.schemas="$(schemas)" -environments.check.schemas="$(schemas)" -baselineOnMigrate=true -errorOverrides=S0001:0:I- -baselineVersion=$(BASELINE_VERSION) -email="$(FLYWAY_EMAIL)" -token="$(FLYWAY_TOKEN)" -workingDirectory="$(WORKING_DIRECTORY)" -locations="filesystem:$(WORKING_DIRECTORY)\$(Build.Repository.Name)\migrations" -configFiles="$(WORKING_DIRECTORY)\$(Build.Repository.Name)\flyway.toml" -user="$(userName)" -password="$(password)"'
2834

2935
BUILD_NAME: 'Repository-Snapshot'
3036
RELEASE_PREVIEW: 'Release-Preview.sql'

0 commit comments

Comments
 (0)