From 59bccff36d11e6a38cd5ffb0ffa4f39acf9aad5d Mon Sep 17 00:00:00 2001 From: MarkKoz Date: Fri, 21 Feb 2020 22:07:30 -0800 Subject: CI: don't build venv image if it can be pulled --- azure-pipelines.yml | 1 + ci/build.yml | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index a1a7a4f..615d3a8 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -11,6 +11,7 @@ jobs: BASE_CHANGED: 'True' VENV_CHANGED: 'True' BASE_PULL: 'False' + VENV_PULL: 'False' steps: - template: ci/build.yml diff --git a/ci/build.yml b/ci/build.yml index c5c4b43..7d51709 100644 --- a/ci/build.yml +++ b/ci/build.yml @@ -34,11 +34,18 @@ steps: ) ) - # Build the venv image if it's had changes. + # Build the venv image if it's had changes or it can't be pulled. - script: | docker build \ -f docker/venv.Dockerfile \ -t pythondiscord/snekbox-venv:latest \ . displayName: 'Build Virtual Environment Image' - condition: and(succeeded(), eq(variables.VENV_CHANGED, 'True')) + condition: > + and( + succeeded(), + or( + eq(variables.VENV_CHANGED, 'True'), + eq(variables.VENV_PULL, 'False') + ) + ) -- cgit v1.2.3