[Mesa-dev] [PATCH v2 4/5] gitlab-ci: update base + llvm images with scheduled pipelines
Juan A. Suarez Romero
jasuarez at igalia.com
Wed Aug 29 10:12:37 UTC 2018
Use scheduled pipelines to update both the base and the LLVM images.
This way allows to have an updated version of the base images even when
the respect Rockerfiles keep the same.
Signed-off-by: Juan A. Suarez Romero <jasuarez at igalia.com>
---
.gitlab-ci.yml | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index ffed0ec8c65..d66def2e7bb 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -40,12 +40,14 @@ after_script:
script:
- DOCKERFILE_SHA256=$(cat gitlab-ci/Rockerfile.base gitlab-ci/Rockerfile.llvm | sha256sum | cut -c-64)
- IMAGE_DOCKERFILE_SHA256=$(./gitlab-ci/inspect-remote-image.sh gitlab-ci-token $CI_BUILD_TOKEN $CI_PROJECT_PATH "llvm-$LLVM" ".config.Labels[\"dockerfile.sha256\"]" || echo -n "<notfound>")
- - if [ "$DOCKERFILE_SHA256" != "$IMAGE_DOCKERFILE_SHA256" ] ; then FORCE_BUILD=true ; fi
+ - if [ "$DOCKERFILE_SHA256" != "$IMAGE_DOCKERFILE_SHA256" ] || [ "$CI_PIPELINE_SOURCE" == "schedule" ] ; then FORCE_BUILD=true ; fi
- if [ "$FORCE_BUILD" ] ; then ../rocker build -f gitlab-ci/Rockerfile.llvm --var DOCKERFILE_SHA256=$DOCKERFILE_SHA256 --var LLVM=$LLVM ; fi
- if [ "$FORCE_BUILD" ] ; then docker push $CI_REGISTRY_IMAGE:llvm-$LLVM ; fi
.build_mesa: &build_mesa
stage: mesa
+ except:
+ - schedules
script:
- ../rocker build -f gitlab-ci/Rockerfile.mesa --var BUILD=$BUILD --var LLVM=$LLVM --var TAG=$CI_COMMIT_REF_SLUG .
@@ -53,6 +55,8 @@ after_script:
stage: tarball
dependencies:
- distcheck
+ except:
+ - schedules
script:
- tar -xf release-output/mesa-*.tar.xz
- ../rocker build -f gitlab-ci/Rockerfile.mesa --var BUILD=$BUILD --var LLVM=$LLVM mesa-*
@@ -62,7 +66,7 @@ base:
script:
- DOCKERFILE_SHA256=$(cat gitlab-ci/Rockerfile.base | sha256sum | cut -c-64)
- IMAGE_DOCKERFILE_SHA256=$(./gitlab-ci/inspect-remote-image.sh gitlab-ci-token $CI_BUILD_TOKEN $CI_PROJECT_PATH "base" ".config.Labels[\"dockerfile.sha256\"]" || echo -n "<notfound>")
- - if [ "$DOCKERFILE_SHA256" != "$IMAGE_DOCKERFILE_SHA256" ] ; then FORCE_BUILD=true ; fi
+ - if [ "$DOCKERFILE_SHA256" != "$IMAGE_DOCKERFILE_SHA256" ] || [ "$CI_PIPELINE_SOURCE" == "schedule" ] ; then FORCE_BUILD=true ; fi
- if [ "$FORCE_BUILD" ] ; then ../rocker build -f gitlab-ci/Rockerfile.base --var DOCKERFILE_SHA256=$DOCKERFILE_SHA256 ; fi
- if [ "$FORCE_BUILD" ] ; then docker push $CI_REGISTRY_IMAGE:base ; fi
--
2.17.1
More information about the mesa-dev
mailing list