diff options
author | 2020-02-21 18:32:15 -0800 | |
---|---|---|
committer | 2020-02-21 22:38:04 -0800 | |
commit | f1d428785c5948cfb634e8b8c4783f4a26bc7039 (patch) | |
tree | 64a0c85e981b683b00dd3b102b637e47679ff162 | |
parent | CI: compare variables against strings (diff) |
CI: don't use output variables
It was initially used to enable access to variables across jobs, but
the jobs will eventually be consolidated into one so output variables
will no longer be needed.
-rw-r--r-- | ci/build.yml | 5 | ||||
-rwxr-xr-x | scripts/check_dockerfiles.sh | 6 |
2 files changed, 5 insertions, 6 deletions
diff --git a/ci/build.yml b/ci/build.yml index aa08436..a076431 100644 --- a/ci/build.yml +++ b/ci/build.yml @@ -1,7 +1,6 @@ steps: - task: ShellScript@2 displayName: 'Check If Images Need to Be Built' - name: check inputs: scriptPath: scripts/check_dockerfiles.sh disableAutoCwd: true @@ -23,7 +22,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.BASE_PULL, 'True')) # Build the venv image if it's had changes. - script: | @@ -32,4 +31,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.VENV_CHANGED, 'False')) diff --git a/scripts/check_dockerfiles.sh b/scripts/check_dockerfiles.sh index b3b5fe2..a0294b1 100755 --- a/scripts/check_dockerfiles.sh +++ b/scripts/check_dockerfiles.sh @@ -64,7 +64,7 @@ printf '%s\n' "Comparing HEAD (${head}) against ${prev_commit}." if git diff --quiet "${prev_commit}" -- docker/base.Dockerfile; then echo "No changes detected in docker/base.Dockerfile." - echo "##vso[task.setvariable variable=BASE_CHANGED;isOutput=true]False" + echo "##vso[task.setvariable variable=BASE_CHANGED]False" else # Always rebuild the venv if the base changes. echo "Changes detected in docker/base.Dockerfile; all images will be built." @@ -73,7 +73,7 @@ fi if git diff --quiet "${prev_commit}" -- docker/venv.Dockerfile Pipfile*; then echo "No changes detected in docker/venv.Dockerfile or the Pipfiles." - echo "##vso[task.setvariable variable=VENV_CHANGED;isOutput=true]False" + echo "##vso[task.setvariable variable=VENV_CHANGED]False" else echo \ "Changes detected in docker/venv.Dockerfile or the Pipfiles;" \ @@ -87,7 +87,7 @@ else && git diff --quiet "${master_commit}" -- docker/base.Dockerfile then echo "Can pull base image from Docker Hub; no changes since master." - echo "##vso[task.setvariable variable=BASE_PULL;isOutput=true]True" + echo "##vso[task.setvariable variable=BASE_PULL]True" else echo \ "Cannot pull base image from Docker Hub due to detected changes;" \ |