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:
|
variables:
|
||||||
STORAGE_DRIVER: "overlay"
|
STORAGE_DRIVER: "overlay"
|
||||||
|
IMAGE_TAG: "docs-simoncor-net"
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- "build"
|
- "build"
|
||||||
|
|
@ -10,17 +11,17 @@ build:
|
||||||
image: "quay.io/buildah/stable:latest"
|
image: "quay.io/buildah/stable:latest"
|
||||||
script:
|
script:
|
||||||
|
|
||||||
# login
|
# login to container registry
|
||||||
- "echo $CR_PASSWORD | buildah login -u $CR_USERNAME --password-stdin $CR_HOSTNAME"
|
- "echo $CI_REGISTRY_PASSWORD | buildah login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY"
|
||||||
|
|
||||||
# build image
|
# build image
|
||||||
- "buildah bud -t docs-simoncor-net ."
|
- "buildah bud -t $IMAGE_TAG ."
|
||||||
|
|
||||||
# tag image
|
# 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
|
# push image
|
||||||
- "buildah push cr.simoncor.net/siempie/docs-simoncor-net:latest"
|
- "buildah push $CI_REGISTRY_IMAGE:latest"
|
||||||
|
|
||||||
# logout
|
# logout
|
||||||
- "buildah logout $CR_HOSTNAME"
|
- "buildah logout $CI_REGISTRY"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue