diff --git a/.gitlab/build.yaml b/.gitlab/build.yaml index a2c37fd..ce4b04d 100644 --- a/.gitlab/build.yaml +++ b/.gitlab/build.yaml @@ -1,6 +1,7 @@ --- variables: STORAGE_DRIVER: "overlay" + IMAGE_TAG: "docs-simoncor-net" stages: - "build" @@ -10,17 +11,17 @@ build: image: "quay.io/buildah/stable:latest" script: - # login - - "echo $CR_PASSWORD | buildah login -u $CR_USERNAME --password-stdin $CR_HOSTNAME" + # login to container registry + - "echo $CI_REGISTRY_PASSWORD | buildah login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY" # build image - - "buildah bud -t docs-simoncor-net ." + - "buildah bud -t $IMAGE_TAG ." # tag image - - "buildah tag docs-simoncor-net cr.simoncor.net/siempie/docs-simoncor-net:latest" + - "buildah tag $IMAGE_TAG $CI_REGISTRY_IMAGE:latest" # push image - - "buildah push cr.simoncor.net/siempie/docs-simoncor-net:latest" + - "buildah push $CI_REGISTRY_IMAGE:latest" # logout - - "buildah logout $CR_HOSTNAME" + - "buildah logout $CI_REGISTRY"