|
| 1 | +## 🏠/.buildkite/pipeline-release.yml |
| 2 | +# Manual triggered pipeline to build and publish Docker images |
| 3 | + |
| 4 | +agents: |
| 5 | + provider: "gcp" |
| 6 | + machineType: "n1-standard-8" |
| 7 | + useVault: true |
| 8 | + |
| 9 | +steps: |
| 10 | + # ---- |
| 11 | + # Docker builds for amd64 |
| 12 | + # ---- |
| 13 | + - group: ":package: amd64 Build and Test" |
| 14 | + key: "build_and_test_amd64" |
| 15 | + if: "build.branch =~ /^[0-9]+\\.[0-9x]+.*/)" |
| 16 | + env: |
| 17 | + - ARCHITECTURE="amd64" |
| 18 | + agents: |
| 19 | + provider: aws |
| 20 | + instanceType: m6i.xlarge |
| 21 | + imagePrefix: ci-amazonlinux-2 |
| 22 | + steps: |
| 23 | + - label: "Building amd64 Docker image" |
| 24 | + command: ".buildkite/publish/build-docker.sh" |
| 25 | + key: "build_docker_image_amd64" |
| 26 | + artifact_paths: ".artifacts/elastic-connectors-docker-*.tar.gz" |
| 27 | + - label: "Testing amd64 Docker image" |
| 28 | + depends_on: "build_docker_image_amd64" |
| 29 | + command: ".buildkite/publish/test-docker.sh" |
| 30 | + # ---- |
| 31 | + # Docker builds for arm64 |
| 32 | + # ---- |
| 33 | + - group: ":package: arm64 Build and Test" |
| 34 | + key: "build_and_test_arm64" |
| 35 | + if: "build.branch =~ /^[0-9]+\\.[0-9x]+.*/)" |
| 36 | + env: |
| 37 | + - ARCHITECTURE="arm64" |
| 38 | + agents: |
| 39 | + provider: aws |
| 40 | + instanceType: m6g.xlarge |
| 41 | + imagePrefix: ci-amazonlinux-2-aarch64 |
| 42 | + diskSizeGb: 40 |
| 43 | + diskName: '/dev/xvda' |
| 44 | + steps: |
| 45 | + - label: "Building arm64 Docker image" |
| 46 | + command: ".buildkite/publish/build-docker.sh" |
| 47 | + key: "build_docker_image_arm64" |
| 48 | + artifact_paths: ".artifacts/elastic-connectors-docker-*.tar.gz" |
| 49 | + - label: "Testing arm64 Docker image" |
| 50 | + depends_on: "build_docker_image_arm64" |
| 51 | + command: ".buildkite/publish/test-docker.sh" |
| 52 | + # ---- |
| 53 | + # Multiarch Docker image build and push |
| 54 | + # ---- |
| 55 | + - group: ":truck: Publish images" |
| 56 | + depends_on: |
| 57 | + - "build_and_test_amd64" |
| 58 | + - "build_and_test_arm64" |
| 59 | + steps: |
| 60 | + - label: "Push amd64 Docker image" |
| 61 | + key: "push_amd64_docker_image" |
| 62 | + env: |
| 63 | + - ARCHITECTURE="amd64" |
| 64 | + agents: |
| 65 | + provider: aws |
| 66 | + instanceType: m6i.xlarge |
| 67 | + imagePrefix: ci-amazonlinux-2 |
| 68 | + commands: |
| 69 | + - "mkdir -p .artifacts" |
| 70 | + - buildkite-agent artifact download '.artifacts/*.tar.gz*' .artifacts/ --step build_docker_image_amd64 |
| 71 | + - ".buildkite/publish/push-docker.sh" |
| 72 | + - label: "Push arm64 Docker image" |
| 73 | + key: "push_arm64_docker_image" |
| 74 | + env: |
| 75 | + - ARCHITECTURE="arm64" |
| 76 | + agents: |
| 77 | + provider: aws |
| 78 | + instanceType: m6g.xlarge |
| 79 | + imagePrefix: ci-amazonlinux-2-aarch64 |
| 80 | + diskSizeGb: 40 |
| 81 | + diskName: '/dev/xvda' |
| 82 | + commands: |
| 83 | + - "mkdir -p .artifacts" |
| 84 | + - buildkite-agent artifact download '.artifacts/*.tar.gz*' .artifacts/ --step build_docker_image_arm64 |
| 85 | + - ".buildkite/publish/push-docker.sh" |
| 86 | + - label: "Build and push multiarch Docker image" |
| 87 | + command: ".buildkite/publish/build-multiarch-docker.sh" |
| 88 | + depends_on: |
| 89 | + - "push_amd64_docker_image" |
| 90 | + - "push_arm64_docker_image" |
0 commit comments