aboutsummaryrefslogtreecommitdiffstats
path: root/ci
diff options
context:
space:
mode:
authorGravatar MarkKoz <[email protected]>2020-02-21 22:07:30 -0800
committerGravatar MarkKoz <[email protected]>2020-02-21 22:40:21 -0800
commit59bccff36d11e6a38cd5ffb0ffa4f39acf9aad5d (patch)
tree24b5cb97d2817fbb7b66b7524838e7e46517df94 /ci
parentCI: check if venv image can be pulled (diff)
CI: don't build venv image if it can be pulled
Diffstat (limited to 'ci')
-rw-r--r--ci/build.yml11
1 files changed, 9 insertions, 2 deletions
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')
+ )
+ )