Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/v9-minor'
Browse files Browse the repository at this point in the history
  • Loading branch information
scip-ci committed May 17, 2024
2 parents 509c864 + 558921f commit 7639423
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 18 deletions.
19 changes: 9 additions & 10 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@
# Jobs should not be defined in this file but in their own file in the ci folder.
# Similar jobs should be grouped in the same file and use inheritance to avoid code duplication.
# The image custom image used in this pipeline is quite complex and large as it contains all the dependencies of SCIP.
# It is defined in ci/docker/Dockerfile.
# It is defined in .gitlab/docker/Dockerfile.
# The image is built in the first stage of the pipeline and then used in all the other stages.
# Jobs that do not require the dependecies inside the image should run on a smaller image like debian-slim.
variables:
IMAGE_NAME: ${CI_REGISTRY}/integer/scip/ci
# combine IMAGE_NAME and current branch
IMAGE: ${IMAGE_NAME}:${IMAGE_HASH}
IMAGE_PATH: ${CI_PROJECT_DIR}/ci/docker/Dockerfile
DEPENDENCIES_PATH: ${CI_PROJECT_DIR}/ci/docker/dependencies.yml
IMAGE: ${IMAGE_NAME}:${DOCKERFILE_HASH}
IMAGE_PATH: ${CI_PROJECT_DIR}/.gitlab/docker/Dockerfile

workflow:
rules:
Expand All @@ -27,9 +26,9 @@ stages:
- release

include:
- local: 'ci/docker/image_hash.yml'
- local: 'ci/docker/prepare_image.yml'
- local: 'ci/cmake_and_ctest.yml'
- local: 'ci/linktest.yml'
- local: 'ci/russcip.yml'
- local: 'ci/valgrind.yml'
- local: '.gitlab/docker/dockerfile_hash.yml'
- local: '.gitlab/jobs/prepare_image.yml'
- local: '.gitlab/jobs/cmake_and_ctest.yml'
- local: '.gitlab/jobs/linktest.yml'
- local: '.gitlab/jobs/russcip.yml'
- local: '.gitlab/jobs/valgrind.yml'
File renamed without changes.
3 changes: 3 additions & 0 deletions .gitlab/docker/dockerfile_hash.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
variables:
# use "md5sum .gitlab/docker/Dockerfile" to get the hash of the Dockerfile
DOCKERFILE_HASH: 1c85ceab9afc81ad147202548b0a781b
File renamed without changes.
File renamed without changes.
10 changes: 5 additions & 5 deletions ci/docker/prepare_image.yml → .gitlab/jobs/prepare_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
# Error out of $IMAGE_HASH is not set
- if [ -z "$IMAGE_HASH" ]; then
echo "IMAGE_HASH is not set. Check that it is set in ci/docker/image_hash.yml and that the file is included in .gitlab-ci.yml";
# Error out of $DOCKERFILE_HASH is not set
- if [ -z "$DOCKERFILE_HASH" ]; then
echo "DOCKERFILE_HASH is not set. Check that it is set in .gitlab/docker/dockerfile_hash.yml and that the file is included in .gitlab-ci.yml";
exit 1;
fi
# Calculate the MD5 hash of the file
- computed_hash=$(md5sum ${IMAGE_PATH} | awk '{print $1}')
# Compare the computed hash with the expected hash
- if [ $computed_hash != $IMAGE_HASH ]; then
echo Hashes do not match! IMAGE_HASH defined in .gitlab-ci.yml has to match the md5sum of ci/docker/Dockerfile.;
- if [ $computed_hash != $DOCKERFILE_HASH ]; then
echo Hashes do not match! DOCKERFILE_HASH defined in .gitlab-ci.yml has to match the md5sum of .gitlab/docker/Dockerfile.;
exit 1;
fi
# Set gitlab registry credentials
Expand Down
File renamed without changes.
File renamed without changes.
3 changes: 0 additions & 3 deletions ci/docker/image_hash.yml

This file was deleted.

0 comments on commit 7639423

Please sign in to comment.