Skip to content
Snippets Groups Projects
Commit 191603bc authored by Sylvester Joosten's avatar Sylvester Joosten
Browse files

Publish feature branches from the master CI

parent 0a0750d5
No related branches found
No related tags found
1 merge request!200Publish feature branches from the master CI
...@@ -36,8 +36,7 @@ variables: ...@@ -36,8 +36,7 @@ variables:
stages: stages:
- config - config
- build:base ## base OS image - build:base ## base OS image
- build:dev ## naked dev container image - build:jug ## jug container images
- build:release ## dressed release container image
- deploy ## build/deploy singularity images - deploy ## build/deploy singularity images
- test - test
- finalize - finalize
...@@ -66,7 +65,7 @@ workflow: ...@@ -66,7 +65,7 @@ workflow:
## plan: ## plan:
## Workflows: ## Workflows:
## - master --> config + all build stages + singularity ## - 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-stable --> config + all build stages + singularity
## - v3.0.0 --> config + all build stages + singularity ## - v3.0.0 --> config + all build stages + singularity
## - MR --> config + all build stages ## - MR --> config + all build stages
...@@ -127,6 +126,8 @@ version: ...@@ -127,6 +126,8 @@ version:
EXPORT_TAG=${VERSION_FULL} EXPORT_TAG=${VERSION_FULL}
EXPORT_TAG2= EXPORT_TAG2=
fi fi
echo "VERSION_FULL=$VERSION_FULL" >> build.env
echo "VERSION_SHORT=$VERSION_SHORT" >> build.env
echo "INTERNAL_TAG=$INTERNAL_TAG" >> build.env echo "INTERNAL_TAG=$INTERNAL_TAG" >> build.env
echo "NIGHTLY_TAG=$NIGHTLY_TAG" >> build.env echo "NIGHTLY_TAG=$NIGHTLY_TAG" >> build.env
echo "EXPORT_TAG=$EXPORT_TAG" >> build.env echo "EXPORT_TAG=$EXPORT_TAG" >> build.env
...@@ -177,7 +178,7 @@ debian_base:default: ...@@ -177,7 +178,7 @@ debian_base:default:
jug_dev:default: jug_dev:default:
extends: .build extends: .build
stage: build:dev stage: build:jug
needs: needs:
- version - version
- debian_base:default - debian_base:default
...@@ -225,7 +226,7 @@ jug_dev:default: ...@@ -225,7 +226,7 @@ jug_dev:default:
jug_xl:default: jug_xl:default:
extends: .build extends: .build
stage: build:release stage: build:jug
resource_group: build resource_group: build
needs: needs:
- version - version
...@@ -247,7 +248,7 @@ jug_xl:default: ...@@ -247,7 +248,7 @@ jug_xl:default:
jug_xl:nightly: jug_xl:nightly:
extends: .build extends: .build
stage: build:release stage: build:jug
rules: rules:
- if: '$CI_COMMIT_BRANCH == "master"' - if: '$CI_COMMIT_BRANCH == "master"'
when: on_success when: on_success
...@@ -276,6 +277,40 @@ jug_xl:nightly: ...@@ -276,6 +277,40 @@ jug_xl:nightly:
-n $DOCKER_NTRIES -t $DOCKER_WAIT_TIME -n $DOCKER_NTRIES -t $DOCKER_WAIT_TIME
${NIGHTLY_TAG} ${PUSH_FLAG} ${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: .singularity:
stage: deploy stage: deploy
interruptible: true interruptible: true
......
#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
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