devops: added stages and jobs for building and pushing docker images to the local registry.
This commit is contained in:
parent
f6152c36ca
commit
f1d91d63ef
@ -16,6 +16,11 @@ build-and-push docker image to local registry:
|
||||
- if ! test -z "$DOCKERFILE_DIRECTORY"; then cd ${DOCKERFILE_DIRECTORY}; fi
|
||||
- docker build -f "${DOCKERFILE_NAME}" ${DOCKER_EXTRA_OPTS} -t "${CI_REGISTRY_IMAGE}:${DOCKER_IMAGE_TAG}" --progress=plain .
|
||||
- docker push "${CI_REGISTRY_IMAGE}:${DOCKER_IMAGE_TAG}"
|
||||
only:
|
||||
- main
|
||||
- development
|
||||
- staging
|
||||
- develop
|
||||
|
||||
push docker to destination registry:
|
||||
stage: deploy
|
||||
@ -26,3 +31,8 @@ push docker to destination registry:
|
||||
- docker push "${DOCKER_REGISTRY}:${DOCKER_IMAGE_TAG}"
|
||||
needs:
|
||||
- "build-and-push docker image to local registry"
|
||||
only:
|
||||
- main
|
||||
- development
|
||||
- staging
|
||||
- develop
|
||||
Loading…
x
Reference in New Issue
Block a user