Skip to content
Snippets Groups Projects
Commit 9537fee9 authored by Cedric Verstege's avatar Cedric Verstege
Browse files

Update Dockerfile

parent 1f70c5d4
Branches
No related tags found
No related merge requests found
Pipeline #3598 passed
......@@ -12,10 +12,11 @@ Update Upstream 🛠️:
stage: ⏫ Update
script:
- ./alma9-base/update.sh
- CURRENT_TAG=$(grep 'FROM cern/alma9-base:' alma9-base/Dockerfile | sed 's/FROM cern\/alma9-base:\([[:alnum:].-]*\).*/\1/')
- git config user.name "CI Pipeline"
- git config user.email "cedric.verstege@kit.edu"
- git add alma9-base/Dockerfile
- git commit -m "⏫ Update upstream to version $(grep -oP "FROM cern/alma9-base:\K[\w.-]+" "alma9-base/Dockerfile")"
- git commit -m "⏫ Update upstream to version $CURRENT_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
rules:
......@@ -30,6 +31,7 @@ Build Docker Image:
image:
name: docker:dind
script:
- docker build -t $DOCKER_IMAGE:$(grep -oP "FROM cern/alma9-base:\K[\w.-]+" "alma9-base/Dockerfile") $DOCKER_IMAGE:latest alma9-base
- CURRENT_TAG=$(grep 'FROM cern/alma9-base:' alma9-base/Dockerfile | sed 's/FROM cern\/alma9-base:\([[:alnum:].-]*\).*/\1/')
- 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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment