From 599267e166e460e2a560ffbc2f775f5f27895fff Mon Sep 17 00:00:00 2001 From: Polina Bungina Date: Tue, 19 Nov 2024 11:21:42 +0100 Subject: [PATCH] Reorder steps --- delivery.yaml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/delivery.yaml b/delivery.yaml index a3629588..67366b64 100644 --- a/delivery.yaml +++ b/delivery.yaml @@ -7,63 +7,63 @@ build_env: &BUILD_ENV MULTI_ARCH_REGISTRY: container-registry-test.zalando.net/acid pipeline: -- id: push-spilo-cdp +- id: push-spilo-cdp-pr env: <<: *BUILD_ENV type: script + requires_human_approval: true when: - - event: push - branch: trigger + - event: pull_request timeout: 10h vm_config: type: linux - size: extra_large + size: large commands: - - desc: Tag and push spilo-cdp image + - desc: Tag and push spilo-cdp image without promotion cmd: | cd postgres-appliance PATRONIVERSION=$(sed -n 's/^ENV PATRONIVERSION=\([1-9][0-9]*\.[0-9]*\).*$/\1/p' Dockerfile) - ECR_TEST_IMAGE="$MULTI_ARCH_REGISTRY/spilo-cdp-$PGVERSION:trigger-$PATRONIVERSION-p$CDP_TARGET_BRANCH_COUNTER" + ECR_TEST_IMAGE="$MULTI_ARCH_REGISTRY/spilo-cdp-pr$CDP_PULL_REQUEST_NUMBER-$PGVERSION:$PATRONIVERSION-p$CDP_PULL_REQUEST_COUNTER" # 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" \ + # single platform build for PR images! + docker buildx build --platform "linux/amd64" \ --build-arg PGVERSION="$PGVERSION" \ --build-arg BASE_IMAGE="$BASE_IMAGE" \ -t "$ECR_TEST_IMAGE" \ --push . - cdp-promote-image "$ECR_TEST_IMAGE" -- id: push-spilo-cdp-pr +- id: push-spilo-cdp env: <<: *BUILD_ENV type: script - requires_human_approval: true when: - - event: pull_request + - event: push + branch: trigger timeout: 10h vm_config: type: linux - size: large + size: extra_large commands: - - desc: Tag and push spilo-cdp image without promotion + - desc: Tag and push spilo-cdp image cmd: | cd postgres-appliance PATRONIVERSION=$(sed -n 's/^ENV PATRONIVERSION=\([1-9][0-9]*\.[0-9]*\).*$/\1/p' Dockerfile) - ECR_TEST_IMAGE="$MULTI_ARCH_REGISTRY/spilo-cdp-pr$CDP_PULL_REQUEST_NUMBER-$PGVERSION:$PATRONIVERSION-p$CDP_PULL_REQUEST_COUNTER" + ECR_TEST_IMAGE="$MULTI_ARCH_REGISTRY/spilo-cdp-$PGVERSION:trigger-$PATRONIVERSION-p$CDP_TARGET_BRANCH_COUNTER" # create a Buildkit builder with CDP specific configuration docker buildx create --config /etc/cdp-buildkitd.toml --driver-opt network=host --bootstrap --use - # single platform build for PR images! - docker buildx build --platform "linux/amd64" \ + docker buildx build --platform "linux/amd64,linux/arm64" \ --build-arg PGVERSION="$PGVERSION" \ --build-arg BASE_IMAGE="$BASE_IMAGE" \ -t "$ECR_TEST_IMAGE" \ --push . + cdp-promote-image "$ECR_TEST_IMAGE" - id: push-spilo-cdp-master env: