diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a861fc7b7a49fd50851fa3713990ba3430153b91..54cafd1814b1ddde788076e5d583ef1b76e9713e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -36,8 +36,7 @@ variables: stages: - config - build:base ## base OS image - - build:dev ## naked dev container image - - build:release ## dressed release container image + - build:jug ## jug container images - deploy ## build/deploy singularity images - test - finalize @@ -66,7 +65,7 @@ workflow: ## plan: ## Workflows: ## - master --> config + all build stages + singularity -# + nightly build:release + nightly singularity +# + nightly build:jug + nightly singularity ## - v3.0-stable --> config + all build stages + singularity ## - v3.0.0 --> config + all build stages + singularity ## - MR --> config + all build stages @@ -127,6 +126,8 @@ version: EXPORT_TAG=${VERSION_FULL} EXPORT_TAG2= fi + echo "VERSION_FULL=$VERSION_FULL" >> build.env + echo "VERSION_SHORT=$VERSION_SHORT" >> build.env echo "INTERNAL_TAG=$INTERNAL_TAG" >> build.env echo "NIGHTLY_TAG=$NIGHTLY_TAG" >> build.env echo "EXPORT_TAG=$EXPORT_TAG" >> build.env @@ -177,7 +178,7 @@ debian_base:default: jug_dev:default: extends: .build - stage: build:dev + stage: build:jug needs: - version - debian_base:default @@ -225,7 +226,7 @@ jug_dev:default: jug_xl:default: extends: .build - stage: build:release + stage: build:jug resource_group: build needs: - version @@ -247,7 +248,7 @@ jug_xl:default: jug_xl:nightly: extends: .build - stage: build:release + stage: build:jug rules: - if: '$CI_COMMIT_BRANCH == "master"' when: on_success @@ -276,6 +277,40 @@ jug_xl:nightly: -n $DOCKER_NTRIES -t $DOCKER_WAIT_TIME ${NIGHTLY_TAG} ${PUSH_FLAG} +jug_xl:feature: + extends: .build + stage: build:jug + rules: + - if: '$CI_COMMIT_BRANCH == "master"' + when: on_success + - when: never + needs: + - version + - jug_xl:default + variables: + BUILD_IMAGE: "jug_xl" + parallel: + matrix: + - DETECTOR: athena + DETECTOR_BRANCH: + - acadia + - canyonlands + script: + - docker build -t ${CI_REGISTRY_IMAGE}/${BUILD_IMAGE}:${INTERNAL_TAG}-${DETECTOR}-${DETECTOR_BRANCH} + -f containers/jug/feature.Dockerfile + --build-arg DETECTOR=${DETECTOR} + --build-arg DETECTOR_BRANCH=${DETECTOR_BRANCH} + containers/jug + - | + PUSH_FLAG="" + if [ "$CI_PIPELINE_SOURCE" == "merge_request_event" ]; then + PUSH_FLAG="--eicweb" + fi + FEATURE_EXPORT_TAG="${VERSION_SHORT}-${DETECTOR_BRANCH}-stable" + - ./gitlab-ci/docker_push.sh -i ${BUILD_IMAGE} -l ${INTERNAL_TAG}-${DETECTOR}-${DETECTOR_BRANCH} + -n ${DOCKER_NTRIES} -t ${DOCKER_WAIT_TIME} + ${FEATURE_EXPORT_TAG} ${PUSH_FLAG} + .singularity: stage: deploy interruptible: true diff --git a/containers/jug/feature.Dockerfile b/containers/jug/feature.Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..534cd93f388b60483d4eca1802f8b25f19a5e759 --- /dev/null +++ b/containers/jug/feature.Dockerfile @@ -0,0 +1,20 @@ +#syntax=docker/dockerfile:1.2 +ARG INTERNAL_TAG="testing" + +## Make a specific "feature" image, identical to jug_xl except for the detector +## symlinked as default in /opt/detector. Not that these images will be removed +## in the future once we move the detectors already installed in the main +## image. + +FROM eicweb.phy.anl.gov:4567/containers/eic_container/jug_xl:${INTERNAL_TAG} + +## also install detector/ip geometries into opt +ARG DETECTOR=athena +ARG DETECTOR_BRANCH=canyonlands +RUN rm -rf /opt/detector/{setup.sh,lib,share} \ + && ln -sf /opt/detector/${DETECTOR}-${DETECTOR_BRANCH}/setup.sh \ + /opt/detector/setup.sh \ + && ln -sf /opt/detector/${DETECTOR}-${DETECTOR_BRANCH}/lib \ + /opt/detector/lib \ + && ln -sf /opt/detector/${DETECTOR}-${DETECTOR_BRANCH}/share \ + /opt/detector/share