Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
eic_container
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
containers
eic_container
Commits
ff7ba607
Commit
ff7ba607
authored
2 years ago
by
Wouter Deconinck
Browse files
Options
Downloads
Patches
Plain Diff
feat: allow setting versions in trigger, use version for resource_group
parent
4873d54e
No related branches found
No related tags found
1 merge request
!493
feat: allow setting versions in trigger, use version for resource_group
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+15
-21
15 additions, 21 deletions
.gitlab-ci.yml
with
15 additions
and
21 deletions
.gitlab-ci.yml
+
15
−
21
View file @
ff7ba607
...
@@ -63,6 +63,17 @@ variables:
...
@@ -63,6 +63,17 @@ variables:
## Force a rebuild without using cache
## Force a rebuild without using cache
FORCE_NOCACHE
:
0
FORCE_NOCACHE
:
0
## Default version and tags
## - internal tag used for the CI. Also temporarily tagged
## on eicweb to communicate between jobs (removed in cleanup job)
## - export tag to public registries, optional secondary export tag
VERSION
:
"
$CI_COMMIT_BRANCH"
NIGHTLY_TAG
:
"
nightly"
TESTING_TAG
:
"
testing"
INTERNAL_TAG
:
"
${TESTING_TAG}-${VERSION}"
EXPORT_TAG
:
"
"
EXPORT_TAG2
:
"
"
stages
:
stages
:
-
config
-
config
-
base
## base OS image
-
base
## base OS image
...
@@ -92,6 +103,7 @@ default:
...
@@ -92,6 +103,7 @@ default:
workflow
:
workflow
:
rules
:
rules
:
-
if
:
'
$CI_PIPELINE_SOURCE
==
"merge_request_event"'
-
if
:
'
$CI_PIPELINE_SOURCE
==
"merge_request_event"'
-
if
:
'
$CI_PIPELINE_SOURCE
==
"web"'
-
if
:
'
$CI_COMMIT_BRANCH
==
"master"'
-
if
:
'
$CI_COMMIT_BRANCH
==
"master"'
-
if
:
'
$CI_COMMIT_BRANCH
=~
/^v[0-9]+\.[0-9]+-stable/'
## main stable branch: vX.Y-stable
-
if
:
'
$CI_COMMIT_BRANCH
=~
/^v[0-9]+\.[0-9]+-stable/'
## main stable branch: vX.Y-stable
-
if
:
'
$CI_COMMIT_BRANCH
=~
/^v[0-9]+\.[0-9]+-[a-z]+-stable/'
## special stable branch: vX.Y-acadia-stable (etc)
-
if
:
'
$CI_COMMIT_BRANCH
=~
/^v[0-9]+\.[0-9]+-[a-z]+-stable/'
## special stable branch: vX.Y-acadia-stable (etc)
...
@@ -122,42 +134,22 @@ version:
...
@@ -122,42 +134,22 @@ version:
stage
:
config
stage
:
config
script
:
script
:
-
|
-
|
VERSION="$CI_COMMIT_BRANCH"
TESTING="testing"
NIGHTLY="nightly"
## determine appropriate major docker tag for this scenario
-
|
## internal tag used for the CI. Also temporarily tagged
## on eicweb to communicate between jobs (removed in cleanup job)
INTERNAL_TAG="testing-$VERSION"
## main export tag, optional secondary export tag,
EXPORT_TAG=${TESTING}
EXPORT_TAG2=
## nightly tag, only used in master
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_PROJECT_ID}-${CI_MERGE_REQUEST_IID}"
INTERNAL_TAG="unstable-mr-${CI_MERGE_REQUEST_PROJECT_ID}-${CI_MERGE_REQUEST_IID}"
NIGHTLY_TAG="${INTERNAL_TAG}-nightly"
NIGHTLY_TAG="${INTERNAL_TAG}-nightly"
EXPORT_TAG="unstable-mr-${CI_MERGE_REQUEST_PROJECT_ID}-${CI_MERGE_REQUEST_IID}"
EXPORT_TAG="unstable-mr-${CI_MERGE_REQUEST_PROJECT_ID}-${CI_MERGE_REQUEST_IID}"
EXPORT_TAG2=
elif [[ "$CI_COMMIT_TAG" =~ ^v[0-9.]+ ]]; then
elif [[ "$CI_COMMIT_TAG" =~ ^v[0-9.]+ ]]; then
VERSION="${CI_COMMIT_TAG:1}"
VERSION="${CI_COMMIT_TAG:1}"
INTERNAL_TAG="stable-tag-${VERSION}"
INTERNAL_TAG="stable-tag-${VERSION}"
NIGHTLY_TAG=
EXPORT_TAG=${VERSION}
EXPORT_TAG=${VERSION}
EXPORT_TAG2=
elif [[ "$CI_COMMIT_BRANCH" = "v[0-9.]+-stable" ]]; then
elif [[ "$CI_COMMIT_BRANCH" = "v[0-9.]+-stable" ]]; then
VERSION="${CI_COMMIT_BRANCH:1}"
VERSION="${CI_COMMIT_BRANCH:1}"
INTERNAL_TAG="stable-br-${VERSION}"
INTERNAL_TAG="stable-br-${VERSION}"
NIGHTLY_TAG=
EXPORT_TAG=${VERSION}
EXPORT_TAG=${VERSION}
EXPORT_TAG2=
elif [[ "$CI_COMMIT_BRANCH" =~ ^v[0-9.]+-[a-z]+-stable ]]; then
elif [[ "$CI_COMMIT_BRANCH" =~ ^v[0-9.]+-[a-z]+-stable ]]; then
VERSION="${CI_COMMIT_BRANCH:1}"
VERSION="${CI_COMMIT_BRANCH:1}"
INTERNAL_TAG="stable-br-${VERSION}"
INTERNAL_TAG="stable-br-${VERSION}"
NIGHTLY_TAG=
EXPORT_TAG=${VERSION}
EXPORT_TAG=${VERSION}
EXPORT_TAG2=
fi
fi
echo "VERSION=$VERSION" >> build.env
echo "VERSION=$VERSION" >> build.env
echo "INTERNAL_TAG=$INTERNAL_TAG" >> build.env
echo "INTERNAL_TAG=$INTERNAL_TAG" >> build.env
...
@@ -177,7 +169,9 @@ version:
...
@@ -177,7 +169,9 @@ version:
.build
:
.build
:
rules
:
rules
:
-
when
:
on_success
-
when
:
on_success
resource_group
:
${CI_COMMIT_REF_NAME}
needs
:
-
version
resource_group
:
${VERSION}
## Use docker runner for docker builds
## Use docker runner for docker builds
tags
:
tags
:
-
docker-new
-
docker-new
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment