Skip to content

Commit 976f104

Browse files
committed
Disambiguate architectures
Eventually we will want to do proper annotations with manifests but for now just add arch to the tag.
1 parent 8cc2b90 commit 976f104

2 files changed

Lines changed: 21 additions & 8 deletions

File tree

.buildkite/scripts/dra/build-and-push-observability-sre.sh

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,26 @@ QUALIFIED_VERSION="$(.buildkite/scripts/common/qualified-version.sh)"
1414
SHA="$(git rev-parse --short HEAD)"
1515
REGISTRY_PATH=docker.elastic.co/logstash/logstash-observability-sre
1616

17+
# Add architecture to the tags
18+
ARCH_TAG="${ARCH:-x86_64}" # Default to x86_64 if ARCH is not set
19+
20+
echo "Architecture: ${ARCH_TAG}"
21+
1722
if [[ "${WORKFLOW_TYPE}" == "staging" ]]; then
18-
# For staging builds, Push the original qualified version
19-
# Ex: docker.elastic.co/logstash/logstash-observability-sre:8.19.0
20-
docker push ${REGISTRY_PATH}:${QUALIFIED_VERSION}
23+
# For staging builds, Push the original qualified version with architecture
24+
# Ex: docker.elastic.co/logstash/logstash-observability-sre:8.19.0-aarch64
25+
ARCH_VERSION_TAG="${QUALIFIED_VERSION}-${ARCH_TAG}"
26+
echo "Tagging and pushing: ${REGISTRY_PATH}:${QUALIFIED_VERSION} as ${REGISTRY_PATH}:${ARCH_VERSION_TAG}"
27+
docker tag ${REGISTRY_PATH}:${QUALIFIED_VERSION} ${REGISTRY_PATH}:${ARCH_VERSION_TAG}
28+
docker push ${REGISTRY_PATH}:${ARCH_VERSION_TAG}
2129
fi
2230

23-
# For both staging and snapshot builds push the qualified version + the sha
24-
# Ex: docker.elastic.co/logstash/logstash-observability-sre:8.19.0-SNAPSHOT-297226b1df
25-
SHA_TAG="${QUALIFIED_VERSION}-${SHA}"
26-
docker tag ${REGISTRY_PATH}:${QUALIFIED_VERSION} ${REGISTRY_PATH}:${SHA_TAG}
27-
docker push ${REGISTRY_PATH}:${SHA_TAG}
31+
# For both staging and snapshot builds push the qualified version + the sha + architecture
32+
# Ex: docker.elastic.co/logstash/logstash-observability-sre:8.19.0-SNAPSHOT-297226b1df-aarch64
33+
SHA_ARCH_TAG="${QUALIFIED_VERSION}-${SHA}-${ARCH_TAG}"
34+
echo "Tagging and pushing: ${REGISTRY_PATH}:${QUALIFIED_VERSION} as ${REGISTRY_PATH}:${SHA_ARCH_TAG}"
35+
docker tag ${REGISTRY_PATH}:${QUALIFIED_VERSION} ${REGISTRY_PATH}:${SHA_ARCH_TAG}
36+
docker push ${REGISTRY_PATH}:${SHA_ARCH_TAG}
2837

2938
# Teardown Docker environment
3039
source .buildkite/scripts/dra/docker-env-teardown.sh

.buildkite/scripts/dra/generatesteps.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ def ship_observability_sre_image_steps(branch, workflow_type):
8484
- label: ":package: Build & Ship aarch64 ObservabilitySRE container / {branch}-{workflow_type.upper()}"
8585
key: "logstash_build_and_ship_observability_sre_aarch64"
8686
soft_fail: true
87+
# TODO: un-comment when we want this step to run after other DRA steps
88+
# depends_on: logstash_publish_dra
8789
agents:
8890
provider: aws
8991
imagePrefix: platform-ingest-logstash-ubuntu-2204-aarch64
@@ -100,6 +102,8 @@ def ship_observability_sre_image_steps(branch, workflow_type):
100102
- label: ":package: Build & Ship x86_64 ObservabilitySRE container / {branch}-{workflow_type.upper()}"
101103
key: "logstash_build_and_ship_observability_sre_x86_64"
102104
soft_fail: true
105+
# TODO: un-comment when we want this step to run after other DRA steps
106+
# depends_on: logstash_publish_dra
103107
agents:
104108
provider: gcp
105109
imageProject: elastic-images-prod

0 commit comments

Comments
 (0)