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
f9b300a6
Commit
f9b300a6
authored
1 year ago
by
Wouter Deconinck
Browse files
Options
Downloads
Patches
Plain Diff
feat: export master as tag master
parent
0477867d
No related branches found
No related tags found
1 merge request
!647
feat: export master as tag master
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+16
-15
16 additions, 15 deletions
.gitlab-ci.yml
with
16 additions
and
15 deletions
.gitlab-ci.yml
+
16
−
15
View file @
f9b300a6
...
@@ -27,19 +27,14 @@ variables:
...
@@ -27,19 +27,14 @@ variables:
## is this nightly or not?
## is this nightly or not?
NIGHTLY
:
NIGHTLY
:
## Add to tag
NIGHTLY_TAG
:
"
nightly"
## Additional options for docker build (e.g. --no-cache)
## Additional options for docker build (e.g. --no-cache)
BUILD_OPTIONS
:
BUILD_OPTIONS
:
## Default version and tags
## Internal tag used for the CI
## - internal tag used for the CI. Also temporarily tagged
INTERNAL_TAG
:
"
${CI_COMMIT_REF_NAME}-${CI_PIPELINE_ID}"
## on eicweb to communicate between jobs (removed in cleanup job)
## - export tag to public registries, optional secondary export tag
VERSION
:
"
${CI_COMMIT_REF_NAME}"
NIGHTLY_TAG
:
"
nightly"
TESTING_TAG
:
"
testing"
INTERNAL_TAG
:
"
${TESTING_TAG}-${VERSION}"
EXPORT_TAG
:
"
"
stages
:
stages
:
-
config
-
config
...
@@ -98,30 +93,36 @@ workflow:
...
@@ -98,30 +93,36 @@ workflow:
## caching strategy for dispatch to multiple nodes and to avoid
## caching strategy for dispatch to multiple nodes and to avoid
## --> try this strategy: https://medium.com/titansoft-engineering/docker-build-cache-sharing-on-multi-hosts-with-buildkit-and-buildx-eb8f7005918e
## --> try this strategy: https://medium.com/titansoft-engineering/docker-build-cache-sharing-on-multi-hosts-with-buildkit-and-buildx-eb8f7005918e
## 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
:
version
:
stage
:
config
stage
:
config
script
:
script
:
-
|
-
|
if [ "x${CI_PIPELINE_SOURCE}" = "xmerge_request_event" ]; then
if [ "x${CI_PIPELINE_SOURCE}" = "xmerge_request_event" ]; then
VERSION="unstable-mr-${CI_MERGE_REQUEST_PROJECT_ID}-${CI_MERGE_REQUEST_IID}"
VERSION="unstable-mr-${CI_MERGE_REQUEST_PROJECT_ID}-${CI_MERGE_REQUEST_IID}"
INTERNAL_TAG="${VERSION}"
NIGHTLY_TAG="${VERSION}-nightly"
NIGHTLY_TAG="${VERSION}-nightly"
EXPORT_TAG="${VERSION}"
EXPORT_TAG="${VERSION}"
elif [[ "$CI_COMMIT_TAG" =~ ^v[0-9.]+\.[0-9]+\.[0-9]+ ]]; then
elif [[ "$CI_COMMIT_TAG" =~ ^v[0-9.]+\.[0-9]+\.[0-9]+ ]]; then
VERSION="${CI_COMMIT_TAG:1}"
VERSION="${CI_COMMIT_TAG:1}"
INTERNAL_TAG="stable-tag-${VERSION}"
EXPORT_TAG="${VERSION}"
EXPORT_TAG="${VERSION}"
elif [[ "$CI_COMMIT_BRANCH" = ^v[0-9.]+\.[0-9]+-stable ]]; then
elif [[ "$CI_COMMIT_BRANCH" =
~
^v[0-9.]+\.[0-9]+-stable ]]; then
VERSION="${CI_COMMIT_BRANCH:1}"
VERSION="${CI_COMMIT_BRANCH:1}"
INTERNAL_TAG="stable-br-${VERSION}"
EXPORT_TAG="${VERSION}"
EXPORT_TAG="${VERSION}"
elif [[ "$CI_COMMIT_BRANCH" =~ ^v[0-9.]+\.[0-9]+-[a-z]+-stable ]]; then
elif [[ "$CI_COMMIT_BRANCH" =~ ^v[0-9.]+\.[0-9]+-[a-z]+-stable ]]; then
VERSION="${CI_COMMIT_BRANCH:1}"
VERSION="${CI_COMMIT_BRANCH:1}"
INTERNAL_TAG="stable-br-${VERSION}"
EXPORT_TAG="${VERSION}"
EXPORT_TAG="${VERSION}"
elif [[ "$CI_COMMIT_BRANCH" =~ ^master$ ]]; then
VERSION="${CI_COMMIT_BRANCH}"
EXPORT_TAG="${VERSION}"
else
VERSION="${CI_COMMIT_REF_NAME}-${CI_PIPELINE_ID}"
EXPORT_TAG=""
fi
fi
echo "VERSION=$VERSION" >> build.env
echo "INTERNAL_TAG=$INTERNAL_TAG" >> build.env
echo "INTERNAL_TAG=$INTERNAL_TAG" >> build.env
echo "VERSION=$VERSION" >> 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
cat build.env
cat build.env
...
...
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