Skip to content

Commit

Permalink
Reorder steps
Browse files Browse the repository at this point in the history
  • Loading branch information
hughcapet committed Nov 19, 2024
1 parent 5d869c2 commit 599267e
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions delivery.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 599267e

Please sign in to comment.