Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
docker-retag
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Frank Sauerburger
docker-retag
Commits
926ec930
Unverified
Commit
926ec930
authored
1 year ago
by
Frank Sauerburger
Browse files
Options
Downloads
Patches
Plain Diff
Test retagging pipeline
parents
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+48
-0
48 additions, 0 deletions
.gitlab-ci.yml
Dockerfile
+1
-0
1 addition, 0 deletions
Dockerfile
with
49 additions
and
0 deletions
.gitlab-ci.yml
0 → 100644
+
48
−
0
View file @
926ec930
stages
:
-
build
-
tag
build
:
stage
:
build
allow_failure
:
false
image
:
name
:
gcr.io/kaniko-project/executor:v1.20.0-debug
entrypoint
:
[
"
"
]
rules
:
-
if
:
$CI_COMMIT_TAG
script
:
-
echo "{\"auths\":{\"$CI_REGISTRY\":{\"auth\":\"$(printf "%s:%s" "${CI_REGISTRY_USER}" "${CI_REGISTRY_PASSWORD}" | base64 | tr -d '\n')\"}}}" > /kaniko/.docker/config.json
-
/kaniko/executor
--context "${CI_PROJECT_DIR}"
--dockerfile "${CI_PROJECT_DIR}/Dockerfile"
--destination "${CI_REGISTRY_IMAGE}:${CI_COMMIT_TAG}"
tag-latest
:
stage
:
tag
image
:
docker:24.0.7
rules
:
-
if
:
$CI_COMMIT_TAG
when
:
manual
script
:
-
docker buildx imagetools --tag $CI_REGISTRY_IMAGE:latest $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
tag-major
:
stage
:
tag
image
:
docker:24.0.7
rules
:
-
if
:
$CI_COMMIT_TAG
when
:
manual
script
:
-
export newtag=$(echo $CI_COMMIT_TAG | cut -d. -f 1)
-
docker buildx imagetools --tag $CI_REGISTRY_IMAGE:$newtag $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
tag-minor
:
stage
:
tag
image
:
docker:24.0.7
rules
:
-
if
:
$CI_COMMIT_TAG
when
:
manual
script
:
-
export newtag=$(echo $CI_COMMIT_TAG | cut -d. -f 1-2)
-
docker buildx imagetools --tag $CI_REGISTRY_IMAGE:$newtag $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
This diff is collapsed.
Click to expand it.
Dockerfile
0 → 100644
+
1
−
0
View file @
926ec930
FROM
python:3.11
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