Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions scripts/docker/build-tiered.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@ LABEL=spear

die() { echo "build-tiered: $*" >&2; exit 1; }

# Buildkit's default provenance/SBOM attestations turn the image into a multi-
# manifest index whose attestation blob some registries (GitLab's) reject on
# push. These images record their own provenance in their manifest, so the
# buildkit attestations add nothing here -- off they go.

ATTEST=(--provenance=false --sbom=false)

TIER="${1:-}"; shift || true
case "$TIER" in
harness|base|project) ;;
Expand Down Expand Up @@ -144,6 +151,7 @@ harness)
TAG="${TAG:-spear:$VERSION-harness}"
echo "== building $TAG (harness) =="
docker build -f "$REPO/docker/Dockerfile.harness" \
"${ATTEST[@]}" \
--build-context "repo=$REPO" \
--label "$LABEL.profile=harness" \
--label "$LABEL.built=$(date -Iseconds)" \
Expand Down Expand Up @@ -198,6 +206,7 @@ base)

echo "== building $TAG (base, entity=$ENTITY, redistributable=$REDIST) =="
docker build -f "$REPO/docker/Dockerfile.base" \
"${ATTEST[@]}" \
--build-arg "HARNESS_IMAGE=$HARNESS" \
--build-context "repo=$REPO" \
--build-context "index=$STAGE/index" \
Expand Down Expand Up @@ -265,6 +274,7 @@ project)

echo "== building $TAG (project, FROM $FROM_BASE) =="
docker build -f "$REPO/docker/Dockerfile.project" \
"${ATTEST[@]}" \
--build-arg "BASE_IMAGE=$FROM_BASE" \
--build-context "repo=$REPO" \
--build-context "index=$STAGE/index" \
Expand Down
Loading