From ceca096029633fcedd97ac0246da22add160344a Mon Sep 17 00:00:00 2001 From: idanovinda Date: Mon, 11 Sep 2023 16:36:34 +0200 Subject: [PATCH] add condition to diff pg version --- delivery.yaml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/delivery.yaml b/delivery.yaml index fcb1703ea..8e69d54d1 100644 --- a/delivery.yaml +++ b/delivery.yaml @@ -29,11 +29,19 @@ pipeline: # create a Buildkit builder with CDP specific configuration docker buildx create --config /etc/cdp-buildkitd.toml --driver-opt network=host --bootstrap --use - docker buildx build --platform "linux/amd64,linux/arm64" \ - --build-arg PGVERSION="$PGVERSION" \ - --build-arg BASE_IMAGE="$BASE_IMAGE" \ - -t "$ECR_TEST_IMAGE" \ - --push . + if [ "x${CDP_SOURCE_BRANCH}" == "x" ] && ; then + docker buildx build --platform "linux/amd64,linux/arm64" \ + --build-arg PGVERSION="$PGVERSION" \ + --build-arg BASE_IMAGE="$BASE_IMAGE" \ + -t "$ECR_TEST_IMAGE" \ + --push . + elif [ "x${CDP_TARGET_BRANCH}" == "xdev-16" ]; then + docker buildx build --platform "linux/amd64,linux/arm64" \ + --build-arg PGVERSION=16 \ + --build-arg BASE_IMAGE="$BASE_IMAGE" \ + -t "$ECR_TEST_IMAGE" \ + --push . + fi cdp-promote-image "$ECR_TEST_IMAGE" # - id: tag-spilo