Skip to content
Snippets Groups Projects
Commit 6ee55548 authored by Felix Weiglhofer's avatar Felix Weiglhofer Committed by Florian Uhlig
Browse files

CI: Add verify step to ensure online container is runnable.

parent 73221de0
No related branches found
No related tags found
Loading
Pipeline #25146 passed
...@@ -3,6 +3,7 @@ stages: ...@@ -3,6 +3,7 @@ stages:
- checkFormat - checkFormat
- build - build
- package - package
- verify
- finalise - finalise
- documentation - documentation
...@@ -548,6 +549,22 @@ BuildOnlineContainerMR: ...@@ -548,6 +549,22 @@ BuildOnlineContainerMR:
# Cache settings suggested by Copilot: --cache=true --cache-repo=${IMAGE_NAME} --cache-ttl=168h --cache-shared=true --cache-dir=/cache # Cache settings suggested by Copilot: --cache=true --cache-repo=${IMAGE_NAME} --cache-ttl=168h --cache-shared=true --cache-dir=/cache
# TODO: Test if these work # TODO: Test if these work
# Ensure the container we just build is usable, and not missing any dependencies
VerifyOnlineContainerMR:
stage: verify
only:
- merge_requests
needs:
- BuildOnlineContainerMR
tags:
- docker
variables:
IMAGE_NAME: $CI_REGISTRY_IMAGE/cbm_online
IMAGE_TAG: mr$CI_MERGE_REQUEST_IID
image: $IMAGE_NAME:$IMAGE_TAG
script:
- cbmreco --help
# Create container for master and DC_* branches on merge # Create container for master and DC_* branches on merge
BuildOnlineContainerBranch: BuildOnlineContainerBranch:
stage: package stage: package
...@@ -569,6 +586,23 @@ BuildOnlineContainerBranch: ...@@ -569,6 +586,23 @@ BuildOnlineContainerBranch:
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json - echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --context dir://$CI_PROJECT_DIR --dockerfile $DOCKERFILE --destination $IMAGE_NAME:$IMAGE_TAG - /kaniko/executor --context dir://$CI_PROJECT_DIR --dockerfile $DOCKERFILE --destination $IMAGE_NAME:$IMAGE_TAG
VerifyOnlineContainerBranch:
stage: verify
only:
- master@computing/cbmroot
- nightly_master@computing/cbmroot
- /^DC_.*$/@computing/cbmroot
needs:
- BuildOnlineContainerBranch
tags:
- docker
variables:
IMAGE_NAME: $CI_REGISTRY_IMAGE/cbm_online
IMAGE_TAG: $CI_COMMIT_BRANCH
image: $IMAGE_NAME:$IMAGE_TAG
script:
- cbmreco --help
InformCodeOwners: InformCodeOwners:
stage: finalise stage: finalise
tags: tags:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment