diff options
author | 2020-02-21 18:21:29 -0800 | |
---|---|---|
committer | 2020-02-21 22:36:29 -0800 | |
commit | 686419d1b1d4c6457819ecf2306a36278fe66f55 (patch) | |
tree | dd11517a2a67b76a5167a158a64b0a835b12a59e | |
parent | CI: install dev dependencies inside running container (diff) |
CI: compare variables against strings
Avoids type casting ambiguity and weirdness.
-rw-r--r-- | azure-pipelines.yml | 30 | ||||
-rw-r--r-- | ci/build.yml | 4 |
2 files changed, 17 insertions, 17 deletions
diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 1ccc04e..9b0c648 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -22,17 +22,17 @@ jobs: succeeded(), or( ne(variables['Build.Reason'], 'PullRequest'), - eq(coalesce(dependencies.test.outputs['check.BASE_CHANGED'], True), True), - eq(coalesce(dependencies.test.outputs['check.VENV_CHANGED'], True), True) + eq(coalesce(dependencies.test.outputs['check.BASE_CHANGED'], 'True'), 'True'), + eq(coalesce(dependencies.test.outputs['check.VENV_CHANGED'], 'True'), 'True') ) ) dependsOn: test # coalesce() gives variables default values if they are null (i.e. unset). variables: - BASE_CHANGED: $[ coalesce(dependencies.test.outputs['check.BASE_CHANGED'], True) ] - VENV_CHANGED: $[ coalesce(dependencies.test.outputs['check.VENV_CHANGED'], True) ] - BASE_PULL: $[ coalesce(dependencies.test.outputs['check.BASE_PULL'], False) ] + BASE_CHANGED: $[ coalesce(dependencies.test.outputs['check.BASE_CHANGED'], 'True') ] + VENV_CHANGED: $[ coalesce(dependencies.test.outputs['check.VENV_CHANGED'], 'True') ] + BASE_PULL: $[ coalesce(dependencies.test.outputs['check.BASE_PULL'], 'False') ] steps: - task: Docker@1 @@ -54,10 +54,10 @@ jobs: condition: > and( succeeded(), - ne(variables.BASE_PULL, True), + ne(variables.BASE_PULL, 'True'), or( - eq(variables.BASE_CHANGED, True), - eq(variables.VENV_CHANGED, True) + eq(variables.BASE_CHANGED, 'True'), + eq(variables.VENV_CHANGED, 'True') ) ) @@ -72,8 +72,8 @@ jobs: and( succeeded(), or( - eq(variables.BASE_CHANGED, True), - eq(variables.VENV_CHANGED, True) + eq(variables.BASE_CHANGED, 'True'), + eq(variables.VENV_CHANGED, 'True') ) ) @@ -95,10 +95,10 @@ jobs: and( succeeded(), ne(variables['Build.Reason'], 'PullRequest'), - ne(variables.BASE_PULL, True), + ne(variables.BASE_PULL, 'True'), or( - eq(variables.BASE_CHANGED, True), - eq(variables.VENV_CHANGED, True) + eq(variables.BASE_CHANGED, 'True'), + eq(variables.VENV_CHANGED, 'True') ) ) @@ -109,8 +109,8 @@ jobs: succeeded(), ne(variables['Build.Reason'], 'PullRequest'), or( - eq(variables.BASE_CHANGED, True), - eq(variables.VENV_CHANGED, True) + eq(variables.BASE_CHANGED, 'True'), + eq(variables.VENV_CHANGED, 'True') ) ) diff --git a/ci/build.yml b/ci/build.yml index fcde2e1..aa08436 100644 --- a/ci/build.yml +++ b/ci/build.yml @@ -23,7 +23,7 @@ steps: -t pythondiscord/snekbox-base:latest \ . displayName: 'Build Base Image' - condition: and(succeeded(), ne(variables['check.BASE_PULL'], True)) + condition: and(succeeded(), ne(variables['check.BASE_PULL'], 'True')) # Build the venv image if it's had changes. - script: | @@ -32,4 +32,4 @@ steps: -t pythondiscord/snekbox-venv:latest \ . displayName: 'Build Virtual Environment Image' - condition: and(succeeded(), ne(variables['check.VENV_CHANGED'], False)) + condition: and(succeeded(), ne(variables['check.VENV_CHANGED'], 'False')) |