feat: push container to gitlab registry
This commit is contained in:
parent
950ef1dc4e
commit
c065e2855a
1 changed files with 7 additions and 6 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue