Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
docker-images
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
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
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
Cedric Verstege
docker-images
Commits
b65953c6
Commit
b65953c6
authored
8 months ago
by
Cedric Verstege
Browse files
Options
Downloads
Patches
Plain Diff
Fix auto updates
parent
50eba8a3
Branches
dev
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#3709
passed
8 months ago
Stage: ⏫ Update
Changes
2
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+11
-11
11 additions, 11 deletions
.gitlab-ci.yml
alma9-base/update.sh
+2
-0
2 additions, 0 deletions
alma9-base/update.sh
with
13 additions
and
11 deletions
.gitlab-ci.yml
+
11
−
11
View file @
b65953c6
...
...
@@ -12,16 +12,9 @@ Update Upstream 🛠️:
script
:
-
git config user.name "CI Pipeline"
-
git config user.email "cedric.verstege@kit.edu"
-
git remote set-url --push origin "https://$CI_COMMITTER_USER_AND_TOKEN@gitlab.etp.kit.edu/cverstege/docker-images.git"
-
./alma9-base/update.sh
-
|-
if [[ "${LATEST_TAG}" != "${CURRENT_TAG}" ]]; then
git add alma9-base/Dockerfile
git commit -m "[🛠️ CI] ⏫ Update to upstream version $LATEST_TAG"
git remote set-url --push origin "https://$CI_COMMITTER_USER_AND_TOKEN@gitlab.etp.kit.edu/cverstege/docker-images.git"
git push origin HEAD:$CI_COMMIT_REF_NAME
else
echo "Version didn't change, nothing to do!"
fi
-
git push origin HEAD:$CI_COMMIT_REF_NAME
rules
:
-
if
:
$CI_PIPELINE_SOURCE == "schedule"
when
:
always
...
...
@@ -38,5 +31,12 @@ Build Docker Image 📦:
-
docker build -t $DOCKER_IMAGE:$CURRENT_TAG -t $DOCKER_IMAGE:latest alma9-base
-
docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD
-
docker push cverstege/alma9-base --all-tags
only
:
-
main
rules
:
-
if
:
$CI_PIPELINE_SOURCE == "schedule"
when
:
never
-
if
:
$CI_COMMIT_BRANCH == "main"
changes
:
paths
:
-
alma9-base/Dockerfile
-
when
:
manual
allow_failure
:
true
This diff is collapsed.
Click to expand it.
alma9-base/update.sh
+
2
−
0
View file @
b65953c6
...
...
@@ -17,6 +17,8 @@ function update() {
else
echo
"Updating Dockerfile to
${
LATEST_TAG
}
"
sed
-i
"s|FROM cern/alma9-base:
${
CURRENT_TAG
}
|FROM cern/alma9-base:
${
LATEST_TAG
}
|g"
"
$THIS_DIR
/Dockerfile"
;
git add
$THIS_DIR
/Dockerfile
git commit
-m
"[🛠️ CI] ⏫ Update alma9 container to upstream version
$LATEST_TAG
"
fi
}
...
...
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