Skip to content

Commit

Permalink
add arm64 build
Browse files Browse the repository at this point in the history
  • Loading branch information
kostasb committed Dec 31, 2024
1 parent 75db6e3 commit 84d8123
Show file tree
Hide file tree
Showing 2 changed files with 115 additions and 10 deletions.
123 changes: 114 additions & 9 deletions .buildkite/extensible-dockerfiles-pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
steps:
- group: ":truck: Building, Testing and Scanning Dockerfile and Dockerfile.ftest"
- group: ":truck: Building, Testing and Scanning extensible Dockerfile and Dockerfile.ftest"
key: "build_test_scan_group"
if: "(build.branch == \"main\")"
steps:
# ----
# Dockerfile build and tests on amd64
# ----
- label: "Build amd64 image from Dockerfile"
- label: "Building amd64 Docker image from extensible Dockerfile"
agents:
provider: aws
instanceType: m6i.xlarge
Expand All @@ -19,7 +19,7 @@ steps:
command: ".buildkite/publish/build-docker.sh"
key: "build_extensible_dockerfile_image_amd64"
artifact_paths: ".artifacts/*.tar.gz"
- label: "Test amd64 image built from Dockerfile"
- label: "Testing amd64 image built from extensible Dockerfile"
agents:
provider: aws
instanceType: m6i.xlarge
Expand All @@ -39,7 +39,7 @@ steps:
# ----
# Dockerfile.ftest build and tests on amd64
# ----
- label: "Build amd64 image from Dockerfile.ftest"
- label: "Building amd64 Docker image from extensible Dockerfile.ftest"
agents:
provider: aws
instanceType: m6i.xlarge
Expand All @@ -52,7 +52,7 @@ steps:
command: ".buildkite/publish/build-docker.sh"
key: "build_extensible_dockerfile_ftest_image_amd64"
artifact_paths: ".artifacts/*.tar.gz"
- label: "Test amd64 image built from Dockerfile.ftest"
- label: "Testing amd64 image built from Dockerfile.ftest"
agents:
provider: aws
instanceType: m6i.xlarge
Expand All @@ -69,15 +69,88 @@ steps:
- buildkite-agent artifact download '.artifacts/*.tar.gz*' .artifacts/ --step build_dockerfile_ftest_image_amd64
- ".buildkite/publish/test-docker.sh"

# ----
# Dockerfile build and tests on arm64
# ----
- label: "Building arm64 Docker image from extensible Dockerfile"
agents:
provider: aws
instanceType: m6g.xlarge
imagePrefix: ci-amazonlinux-2-aarch64
diskSizeGb: 40
diskName: '/dev/xvda'
env:
ARCHITECTURE: "arm64"
DOCKERFILE_PATH: "Dockerfile"
DOCKER_IMAGE_NAME: "docker.elastic.co/ci-agent-images/elastic-connectors-extensible-dockerfile"
DOCKER_ARTIFACT_KEY: "elastic-connectors-extensible-dockerfile"
command: ".buildkite/publish/build-docker.sh"
key: "build_extensible_dockerfile_image_arm64"
artifact_paths: ".artifacts/*.tar.gz"
- label: "Testing arm64 image built from extensible Dockerfile"
agents:
provider: aws
instanceType: m6g.xlarge
imagePrefix: ci-amazonlinux-2-aarch64
diskSizeGb: 40
diskName: '/dev/xvda'
env:
ARCHITECTURE: "arm64"
DOCKERFILE_PATH: "Dockerfile"
DOCKER_IMAGE_NAME: "docker.elastic.co/ci-agent-images/elastic-connectors-extensible-dockerfile"
DOCKER_ARTIFACT_KEY: "elastic-connectors-extensible-dockerfile"
depends_on: "build_extensible_dockerfile_image_arm64"
key: "test_extensible_dockerfile_image_arm64"
commands:
- "mkdir -p .artifacts"
- buildkite-agent artifact download '.artifacts/*.tar.gz*' .artifacts/ --step build_dockerfile_image_arm64
- ".buildkite/publish/test-docker.sh"

# ----
# Dockerfile.ftest build and tests on arm64
# ----
- label: "Building arm64 Docker image from extensible Dockerfile.ftest"
agents:
provider: aws
instanceType: m6g.xlarge
imagePrefix: ci-amazonlinux-2-aarch64
diskSizeGb: 40
diskName: '/dev/xvda'
env:
ARCHITECTURE: "arm64"
DOCKERFILE_PATH: "Dockerfile.ftest"
DOCKER_IMAGE_NAME: "docker.elastic.co/ci-agent-images/elastic-connectors-extensible-dockerfile-ftest"
DOCKER_ARTIFACT_KEY: "elastic-connectors-extensible-dockerfile-ftest"
command: ".buildkite/publish/build-docker.sh"
key: "build_extensible_dockerfile_ftest_image_arm64"
artifact_paths: ".artifacts/*.tar.gz"
- label: "Testing arm64 image built from Dockerfile.ftest"
agents:
provider: aws
instanceType: m6g.xlarge
imagePrefix: ci-amazonlinux-2-aarch64
diskSizeGb: 40
diskName: '/dev/xvda'
env:
ARCHITECTURE: "arm64"
DOCKERFILE_PATH: "Dockerfile.ftest"
DOCKER_IMAGE_NAME: "docker.elastic.co/ci-agent-images/elastic-connectors-extensible-dockerfile-ftest"
DOCKER_ARTIFACT_KEY: "elastic-connectors-extensible-dockerfile-ftest"
depends_on: "build_extensible_dockerfile_ftest_image_arm64"
key: "test_extensible_dockerfile_ftest_image_arm64"
commands:
- "mkdir -p .artifacts"
- buildkite-agent artifact download '.artifacts/*.tar.gz*' .artifacts/ --step build_dockerfile_ftest_image_arm64
- ".buildkite/publish/test-docker.sh"

# ----
# Vulnerability scanning on Dockerfile and Dockerfile.ftest built images
# Vulnerability scanning on amd64 extensible Dockerfile and Dockerfile.ftest built images
# ----
- label: "Trivy Scan amd64 Dockerfile Artifacts"
- label: "Trivy Scan amd64 extensible Dockerfile Artifacts"
timeout_in_minutes: 10
depends_on:
- test_extensible_dockerfile_image_amd64
key: "trivy-scan-extensible-dockerfile-image"
key: "trivy-scan-amd64-extensible-dockerfile-image"
agents:
provider: k8s
image: "docker.elastic.co/ci-agent-images/trivy:latest"
Expand All @@ -91,7 +164,7 @@ steps:
timeout_in_minutes: 10
depends_on:
- test_extensible_dockerfile_ftest_image_amd64
key: "trivy-scan-extensible-dockerfile-ftest-image"
key: "trivy-scan-amd64-extensible-dockerfile-ftest-image"
agents:
provider: k8s
image: "docker.elastic.co/ci-agent-images/trivy:latest"
Expand All @@ -101,3 +174,35 @@ steps:
trivy --version
env | grep TRIVY
find .artifacts -type f -name '*.tar.gz*' -exec trivy image --quiet --input {} \;
# ----
# Vulnerability scanning on arm64 extensible Dockerfile and Dockerfile.ftest built images
# ----
- label: "Trivy Scan arm64 extensible Dockerfile Artifacts"
timeout_in_minutes: 10
depends_on:
- test_extensible_dockerfile_image_arm64
key: "trivy-scan-arm64-extensible-dockerfile-image"
agents:
provider: k8s
image: "docker.elastic.co/ci-agent-images/trivy:latest"
command: |-
mkdir -p .artifacts
buildkite-agent artifact download '.artifacts/*.tar.gz*' .artifacts/ --step build_dockerfile_image_arm64
trivy --version
env | grep TRIVY
find .artifacts -type f -name '*.tar.gz*' -exec trivy image --quiet --input {} \;
- label: "Trivy Scan arm64 Dockerfile.ftest Artifacts"
timeout_in_minutes: 10
depends_on:
- test_extensible_dockerfile_ftest_image_arm64
key: "trivy-scan-arm64-extensible-dockerfile-ftest-image"
agents:
provider: k8s
image: "docker.elastic.co/ci-agent-images/trivy:latest"
command: |-
mkdir -p release
buildkite-agent artifact download '.artifacts/*.tar.gz*' .artifacts/ --step build_dockerfile_ftest_image_arm64
trivy --version
env | grep TRIVY
find .artifacts -type f -name '*.tar.gz*' -exec trivy image --quiet --input {} \;
2 changes: 1 addition & 1 deletion catalog-info.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ spec:
search-extract-and-transform: {}
search-productivity-team: {}

# Nightly build and scan of the public/extensible connectors Dockerfiles
# Nightly build and scan of the connectors extensible Dockerfiles
---
apiVersion: "backstage.io/v1alpha1"
kind: "Resource"
Expand Down

0 comments on commit 84d8123

Please sign in to comment.