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

Multibranch

parent f138a14b
No related branches found
No related tags found
1 merge request!131Multibranch
...@@ -2,11 +2,11 @@ image: eicweb.phy.anl.gov:4567/containers/image_recipes/ubuntu_dind:latest ...@@ -2,11 +2,11 @@ image: eicweb.phy.anl.gov:4567/containers/image_recipes/ubuntu_dind:latest
variables: variables:
## Application versions used for the main release ## note: nightly builds will always use the master branch ## Application versions used for the main release ## note: nightly builds will always use the master branch
JUGGLER_VERSION: "v3.0.0" JUGGLER_VERSION: "v3.1.0"
NPDET_VERSION: "v0.7.0" NPDET_VERSION: "v0.7.0"
EICD_VERSION: "v0.5.0" EICD_VERSION: "v0.6.0"
DETECTOR_VERSION: "v0.2.0" DETECTOR_VERSION: "acadia-v1.0-alpha"
IP6_VERSION: "v0.3.0" IP6_VERSION: "v0.4.0"
## Spack github version ## Spack github version
SPACK_VERSION: "a68abc15c5b1b8266130f765d1bee6290e71fa7c" SPACK_VERSION: "a68abc15c5b1b8266130f765d1bee6290e71fa7c"
...@@ -58,8 +58,9 @@ workflow: ...@@ -58,8 +58,9 @@ workflow:
rules: rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"' - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
- if: '$CI_COMMIT_BRANCH == "master"' - if: '$CI_COMMIT_BRANCH == "master"'
- if: '$CI_COMMIT_BRANCH =~ /v[0-9]+\.[0-9]+-stable/' - if: '$CI_COMMIT_BRANCH =~ /^v[0-9]+\.[0-9]+-stable/' ## main stable branch: vX.Y-stable
- if: '$CI_COMMIT_TAG =~ /v[0-9]+\.[0-9]+\.[0-9]+/' - if: '$CI_COMMIT_BRANCH =~ /^v[0-9]+\.[0-9]+-[a-z]+-stable/' ## special stable branch: vX.Y-acadia-stable (etc)
- if: '$CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+/' ## commit tags start with vX.Y.Z with optional suffix
## plan: ## plan:
## Workflows: ## Workflows:
...@@ -74,6 +75,7 @@ workflow: ...@@ -74,6 +75,7 @@ workflow:
## - <nightly> --> nightly (run as part of master) ## - <nightly> --> nightly (run as part of master)
## - v3.0-stable --> 3.0-stable ## - v3.0-stable --> 3.0-stable
## - v3.0.0 --> 3.0-stable, 3.0.0 ## - v3.0.0 --> 3.0-stable, 3.0.0
## - acadia
## - MR --> 3.0-unstable (on all registries) ## - MR --> 3.0-unstable (on all registries)
## --> unstable-mr-XXX (on eicweb only, untag at end of pipeline) ## --> unstable-mr-XXX (on eicweb only, untag at end of pipeline)
## - all other --> do nothing ## - all other --> do nothing
...@@ -87,10 +89,10 @@ version: ...@@ -87,10 +89,10 @@ version:
script: script:
- | - |
VERSION=`head -n1 VERSION` VERSION=`head -n1 VERSION`
STABLE=${VERSION%.*}-stable VERSION_FULL=${VERSION}
VERSION_SHORT=${VERSION%.*}
TESTING="testing" TESTING="testing"
NIGHTLY="nightly" NIGHTLY="nightly"
UNSTABLE=${VERSION%.*}-unstable
## determine appropriate major docker tag for this scenario ## determine appropriate major docker tag for this scenario
- | - |
## internal tag used for the CI. Also temporarily tagged ## internal tag used for the CI. Also temporarily tagged
...@@ -101,20 +103,27 @@ version: ...@@ -101,20 +103,27 @@ version:
EXPORT_TAG2= EXPORT_TAG2=
## nightly tag, only used in master ## nightly tag, only used in master
NIGHTLY_TAG=${NIGHTLY} NIGHTLY_TAG=${NIGHTLY}
if [ "x${CI_PIPELINE_SOURCE}" == "xmerge_request_event" ]; then if [ "x${CI_PIPELINE_SOURCE}" = "xmerge_request_event" ]; then
INTERNAL_TAG="unstable-mr-${CI_MERGE_REQUEST_ID}" INTERNAL_TAG="unstable-mr-${CI_MERGE_REQUEST_ID}"
NIGHTLY_TAG="${INTERNAL_TAG}-nightly" NIGHTLY_TAG="${INTERNAL_TAG}-nightly"
EXPORT_TAG=$UNSTABLE EXPORT_TAG=${VERSION_SHORT}-unstable
EXPORT_TAG2= EXPORT_TAG2=
elif [ "$CI_COMMIT_TAG" = "v${VERSION}" ]; then elif [[ "$CI_COMMIT_TAG" =~ ^v${VERSION} ]]; then
VERSION_FULL="${CI_COMMIT_TAG:1}"
INTERNAL_TAG="stable-tag-${VERSION_FULL}"
NIGHTLY_TAG=
EXPORT_TAG=${VERSION_FULL}
EXPORT_TAG2=
elif [ "$CI_COMMIT_BRANCH" = "v${VERSION_SHORT}-stable" ]; then
INTERNAL_TAG="stable-br-${VERSION}" INTERNAL_TAG="stable-br-${VERSION}"
NIGHTLY_TAG= NIGHTLY_TAG=
EXPORT_TAG=${STABLE} EXPORT_TAG=${VERSION_SHORT}-stable
EXPORT_TAG2=${VERSION} EXPORT_TAG2=
elif [ "$CI_COMMIT_BRANCH" == "v${STABLE}" ]; then elif [[ "$CI_COMMIT_BRANCH" =~ ^v${VERSION_SHORT}-[a-z]+-stable ]]; then
INTERNAL_TAG="stable-tag-${VERSION}" VERSION_FULL="${CI_COMMIT_BRANCH:1}"
INTERNAL_TAG="stable-br-${VERSION_FULL}"
NIGHTLY_TAG= NIGHTLY_TAG=
EXPORT_TAG=${STABLE} EXPORT_TAG=${VERSION_FULL}
EXPORT_TAG2= EXPORT_TAG2=
fi fi
echo "INTERNAL_TAG=$INTERNAL_TAG" >> build.env echo "INTERNAL_TAG=$INTERNAL_TAG" >> build.env
......
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