Add commands for building image

This commit is contained in:
Manuel Thalmann 2023-10-31 17:03:51 +01:00
parent 255a163408
commit c8d1defada

View file

@ -1,4 +1,5 @@
stages: stages:
- package
- compile - compile
- test - test
- build - build
@ -11,6 +12,20 @@ cache:
- .m2/repository/ - .m2/repository/
- "**/target/" - "**/target/"
container:
stage: package
image: $CI_REGISTRY/ict/images/alpine/ci:latest
variables:
BUILDAH_ISOLATION: chroot
IMAGE_TAG: $CI_REGISTRY:$CI_COMMIT_REF_SLUG
before_script:
- apk add buildah fuse-overlayfs
- buildah login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- buildah info
script:
- buildah build --tag $IMAGE_TAG -f Dockerfile
- buildah push $IMAGE_TAG
compile: compile:
stage: compile stage: compile
image: maven:3.8.6-openjdk-18 image: maven:3.8.6-openjdk-18