Commit 083f4343 authored by Aliaksandr Lubouski (EPAM)'s avatar Aliaksandr Lubouski (EPAM) 🥑
Browse files

GONRG-3596-bootstrap: bootstrap gitlab-ci logic changed to label as latest...

GONRG-3596-bootstrap: bootstrap gitlab-ci logic changed to label as latest only images which was produced by mater branch
parent 61ddd03b
Pipeline #75068 passed with stages
in 3 minutes and 21 seconds
......@@ -3,19 +3,17 @@ containerize_osdu_gcp_ent_bootstrap_image:
image: docker:19.03.15
tags: ["osdu-medium"]
services:
- docker:19.03.15-dind
- docker:20.10.7-dind
variables:
IMAGE_NAME: osdu-bootstrap_ent
SHORT_SHA_IMAGE: ${CI_REGISTRY_IMAGE}/${IMAGE_NAME}:${CI_COMMIT_SHORT_SHA}
LATEST_IMAGE: ${CI_REGISTRY_IMAGE}/${IMAGE_NAME}:latest
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
script:
# Gitlab Container Registry
- docker build -t $SHORT_SHA_IMAGE -t $LATEST_IMAGE -f bootstrap_entitlements/Dockerfile .
- docker push $SHORT_SHA_IMAGE
- docker push $LATEST_IMAGE
- export EXTRA_DOCKER_TAG=""; if [ "$CI_COMMIT_TAG" != "" ] ; then EXTRA_DOCKER_TAG="-t $CI_REGISTRY_IMAGE/$IMAGE_NAME:$CI_COMMIT_TAG" ; elif [ "$CI_COMMIT_REF_NAME" = "master" ] ; then EXTRA_DOCKER_TAG="-t $CI_REGISTRY_IMAGE/$IMAGE_NAME:latest" ; fi
- docker build -t $CI_REGISTRY_IMAGE/$IMAGE_NAME:$CI_COMMIT_SHORT_SHA $EXTRA_DOCKER_TAG --file bootstrap_entitlements/Dockerfile .
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker push $CI_REGISTRY_IMAGE/$IMAGE_NAME
only:
refs:
- master
- /.*bootstrap.*/
- tags
......@@ -3,21 +3,17 @@ containerize_osdu_gcp_infra_bootstrap_image:
image: docker:19.03.15
tags: ["osdu-medium"]
services:
- docker:19.03.15-dind
- docker:20.10.7-dind
variables:
IMAGE_NAME: osdu-bootstrap_infra
SHORT_SHA_IMAGE: ${CI_REGISTRY_IMAGE}/${IMAGE_NAME}:${CI_COMMIT_SHORT_SHA}
LATEST_IMAGE: ${CI_REGISTRY_IMAGE}/${IMAGE_NAME}:latest
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
script:
# Gitlab Container Registry
- docker build -t $IMAGE_NAME:local -f bootstrap_infra/Dockerfile .
- docker tag $IMAGE_NAME:local $SHORT_SHA_IMAGE
- docker tag $IMAGE_NAME:local $LATEST_IMAGE
- docker push $SHORT_SHA_IMAGE
- docker push $LATEST_IMAGE
- export EXTRA_DOCKER_TAG=""; if [ "$CI_COMMIT_TAG" != "" ] ; then EXTRA_DOCKER_TAG="-t $CI_REGISTRY_IMAGE/$IMAGE_NAME:$CI_COMMIT_TAG" ; elif [ "$CI_COMMIT_REF_NAME" = "master" ] ; then EXTRA_DOCKER_TAG="-t $CI_REGISTRY_IMAGE/$IMAGE_NAME:latest" ; fi
- docker build -t $CI_REGISTRY_IMAGE/$IMAGE_NAME:$CI_COMMIT_SHORT_SHA $EXTRA_DOCKER_TAG --file bootstrap_infra/Dockerfile .
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker push $CI_REGISTRY_IMAGE/$IMAGE_NAME
only:
refs:
- master
- /.*bootstrap.*/
- tags
......@@ -3,21 +3,17 @@ containerize_osdu_gcp_partition_bootstrap_image:
image: docker:19.03.15
tags: ["osdu-medium"]
services:
- docker:19.03.15-dind
- docker:20.10.7-dind
variables:
IMAGE_NAME: osdu-bootstrap-partition
SHORT_SHA_IMAGE: ${CI_REGISTRY_IMAGE}/${IMAGE_NAME}:${CI_COMMIT_SHORT_SHA}
LATEST_IMAGE: ${CI_REGISTRY_IMAGE}/${IMAGE_NAME}:latest
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
script:
# Gitlab Container Registry
- docker build -t $IMAGE_NAME:local -f bootstrap_partition/Dockerfile .
- docker tag $IMAGE_NAME:local $SHORT_SHA_IMAGE
- docker tag $IMAGE_NAME:local $LATEST_IMAGE
- docker push $SHORT_SHA_IMAGE
- docker push $LATEST_IMAGE
- export EXTRA_DOCKER_TAG=""; if [ "$CI_COMMIT_TAG" != "" ] ; then EXTRA_DOCKER_TAG="-t $CI_REGISTRY_IMAGE/$IMAGE_NAME:$CI_COMMIT_TAG" ; elif [ "$CI_COMMIT_REF_NAME" = "master" ] ; then EXTRA_DOCKER_TAG="-t $CI_REGISTRY_IMAGE/$IMAGE_NAME:latest" ; fi
- docker build -t $CI_REGISTRY_IMAGE/$IMAGE_NAME:$CI_COMMIT_SHORT_SHA $EXTRA_DOCKER_TAG --file bootstrap_partition/Dockerfile .
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker push $CI_REGISTRY_IMAGE/$IMAGE_NAME
only:
refs:
- master
- /.*bootstrap.*/
- tags
......@@ -3,22 +3,17 @@ containerize_osdu_gcp_pub_sub_bootstrap:
image: docker:19.03.15
tags: ["osdu-medium"]
services:
- docker:19.03.15-dind
- docker:20.10.7-dind
variables:
IMAGE_NAME: osdu-bootstrap-pub-sub
SHORT_SHA_IMAGE: ${CI_REGISTRY_IMAGE}/${IMAGE_NAME}:${CI_COMMIT_SHORT_SHA}
LATEST_IMAGE: ${CI_REGISTRY_IMAGE}/${IMAGE_NAME}:latest
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
script:
# Gitlab Container Registry
- docker build -t $IMAGE_NAME:local -f bootstrap_pub_sub/Dockerfile .
- docker tag $IMAGE_NAME:local $SHORT_SHA_IMAGE
- docker tag $IMAGE_NAME:local $LATEST_IMAGE
- docker push $SHORT_SHA_IMAGE
- docker push $LATEST_IMAGE
- export EXTRA_DOCKER_TAG=""; if [ "$CI_COMMIT_TAG" != "" ] ; then EXTRA_DOCKER_TAG="-t $CI_REGISTRY_IMAGE/$IMAGE_NAME:$CI_COMMIT_TAG" ; elif [ "$CI_COMMIT_REF_NAME" = "master" ] ; then EXTRA_DOCKER_TAG="-t $CI_REGISTRY_IMAGE/$IMAGE_NAME:latest" ; fi
- docker build -t $CI_REGISTRY_IMAGE/$IMAGE_NAME:$CI_COMMIT_SHORT_SHA $EXTRA_DOCKER_TAG --file bootstrap_pub_sub/Dockerfile .
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker push $CI_REGISTRY_IMAGE/$IMAGE_NAME
only:
refs:
- master
- /.*bootstrap.*/
- tags
......@@ -3,22 +3,17 @@ containerize_osdu_gcp_register_bootstrap:
image: docker:19.03.15
tags: ["osdu-medium"]
services:
- docker:19.03.15-dind
- docker:20.10.7-dind
variables:
IMAGE_NAME: osdu-bootstrap-register
SHORT_SHA_IMAGE: ${CI_REGISTRY_IMAGE}/${IMAGE_NAME}:${CI_COMMIT_SHORT_SHA}
LATEST_IMAGE: ${CI_REGISTRY_IMAGE}/${IMAGE_NAME}:latest
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
script:
# Gitlab Container Registry
- docker build -t $IMAGE_NAME:local -f bootstrap_register/Dockerfile .
- docker tag $IMAGE_NAME:local $SHORT_SHA_IMAGE
- docker tag $IMAGE_NAME:local $LATEST_IMAGE
- docker push $SHORT_SHA_IMAGE
- docker push $LATEST_IMAGE
- export EXTRA_DOCKER_TAG=""; if [ "$CI_COMMIT_TAG" != "" ] ; then EXTRA_DOCKER_TAG="-t $CI_REGISTRY_IMAGE/$IMAGE_NAME:$CI_COMMIT_TAG" ; elif [ "$CI_COMMIT_REF_NAME" = "master" ] ; then EXTRA_DOCKER_TAG="-t $CI_REGISTRY_IMAGE/$IMAGE_NAME:latest" ; fi
- docker build -t $CI_REGISTRY_IMAGE/$IMAGE_NAME:$CI_COMMIT_SHORT_SHA $EXTRA_DOCKER_TAG --file bootstrap_register/Dockerfile .
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker push $CI_REGISTRY_IMAGE/$IMAGE_NAME
only:
refs:
- master
- /.*bootstrap.*/
- tags
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment