-
Notifications
You must be signed in to change notification settings - Fork 92
Add skupper-source OCI image for downstream build contexts #2560
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
8756cee
a64f312
1c89803
235fabf
4c69b99
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,6 +2,8 @@ | |
| .circleci | ||
| .github | ||
| .codespellrc | ||
| .git/ | ||
| vendor/ | ||
|
|
||
| # Documentation | ||
| README.md | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| # OCI image that packages the Skupper source tree for reproducible downstream builds. | ||
| # Not intended to be run; publish to quay.io/skupper/skupper-source:<version> and | ||
| # consume via build context / additional build contexts instead of git clone. | ||
| ARG GO_IMAGE_BASE_TAG=1.25 | ||
| FROM golang:${GO_IMAGE_BASE_TAG} AS vendor | ||
|
|
||
| WORKDIR /go/src/app | ||
| COPY go.mod go.sum ./ | ||
| RUN --mount=type=cache,target=/go/pkg/mod \ | ||
| go mod download | ||
| COPY . . | ||
| RUN go mod vendor | ||
|
|
||
| FROM scratch | ||
|
|
||
| LABEL \ | ||
| org.opencontainers.image.title="Skupper source" \ | ||
| org.opencontainers.image.description="Skupper source tree at a fixed release for downstream container builds" | ||
|
|
||
| # Match upstream Dockerfile.* builder layout (WORKDIR /go/src/app). | ||
| COPY --from=vendor /go/src/app /go/src/app |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,6 +6,7 @@ GOARCH ?= amd64 | |
|
|
||
| REGISTRY := quay.io/skupper | ||
| IMAGE_TAG := v2-dev | ||
| SOURCE_IMAGE := skupper-source | ||
| ROUTER_IMAGE_TAG := main | ||
| PLATFORMS ?= linux/amd64,linux/arm64 | ||
| CONTAINERFILES := Dockerfile.cli Dockerfile.kube-adaptor Dockerfile.controller Dockerfile.network-observer Dockerfile.system-controller | ||
|
|
@@ -120,6 +121,19 @@ podman-build-must-gather: | |
| podman-push-must-gather: | ||
| ${PODMAN} push "${REGISTRY}/skupper-must-gather:${IMAGE_TAG}" | ||
|
|
||
| ## Source tree OCI image for downstream build contexts (see Dockerfile.source). | ||
| docker-build-source: | ||
| ${DOCKER} build --build-arg GO_IMAGE_BASE_TAG=$(GO_IMAGE_BASE_TAG) $(SHARED_IMAGE_LABELS) -t "${REGISTRY}/${SOURCE_IMAGE}:${IMAGE_TAG}" -f Dockerfile.source . | ||
|
|
||
| docker-push-source: docker-build-source | ||
| ${DOCKER} push "${REGISTRY}/${SOURCE_IMAGE}:${IMAGE_TAG}" | ||
|
|
||
| podman-build-source: | ||
| ${PODMAN} build --build-arg GO_IMAGE_BASE_TAG=$(GO_IMAGE_BASE_TAG) $(SHARED_IMAGE_LABELS) -t "${REGISTRY}/${SOURCE_IMAGE}:${IMAGE_TAG}" -f Dockerfile.source . | ||
|
|
||
| podman-push-source: podman-build-source | ||
| ${PODMAN} push "${REGISTRY}/${SOURCE_IMAGE}:${IMAGE_TAG}" | ||
|
Comment on lines
+128
to
+135
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
rg --glob '!.git/**' -n -C 8 \
'docker-push-source|podman-push-source|make[[:space:]].*(docker|podman)-push' . || trueRepository: skupperproject/skupper Length of output: 1292 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '--- relevant files ---'
git ls-files | rg '(^|/)(Makefile|\.github/workflows/|scripts/|release|ci)' || true
printf '%s\n' '--- push targets and release invocations ---'
rg --glob '!.git/**' -n -C 5 \
'(^|[[:space:]])(docker|podman)-push(-source)?([:space:]|$)|make[[:space:]]+[^#\n]*(push|release)|make[[:space:]]+-C[^#\n]*(push|release)' \
. || true
printf '%s\n' '--- Makefile target definitions ---'
rg -n '^[A-Za-z0-9_.-]+:.*(push|release)|^[A-Za-z0-9_.-]+:' MakefileRepository: skupperproject/skupper Length of output: 5420 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '--- relevant files ---'
git ls-files | rg '(^|/)(Makefile|\.github/workflows/|scripts/|release|ci)' || true
printf '%s\n' '--- push targets and release invocations ---'
rg --glob '!.git/**' -n -C 5 \
'(^|[[:space:]])(docker|podman)-push(-source)?([[:space:]$])|make[[:space:]]+[^#\n]*(push|release)|make[[:space:]]+-C[^#\n]*(push|release)' \
. || true
printf '%s\n' '--- Makefile target definitions ---'
rg -n '^[A-Za-z0-9_.-]+:.*(push|release)|^[A-Za-z0-9_.-]+:' MakefileRepository: skupperproject/skupper Length of output: 3837 🏁 Script executed: #!/bin/bash
set -euo pipefail
cat -n Makefile | sed -n '1,105p'
printf '%s\n' '--- source image and containerfile declarations ---'
rg -n -C 3 'CONTAINERFILES|SOURCE_IMAGE|Dockerfile\.source|docker-push|podman-push' Makefile .github scripts tests Dockerfile* 2>/dev/null || trueRepository: skupperproject/skupper Length of output: 9595 🏁 Script executed: #!/bin/bash
set -euo pipefail
python3 - <<'PY'
from pathlib import Path
import re
text = Path("Makefile").read_text()
containerfiles = re.search(r"^CONTAINERFILES\s*:=\s*(.+)$", text, re.MULTILINE).group(1).split()
source_target = "podman-push-source"
aggregate_targets = [f"podman-push-{Path(name).name.removeprefix('Dockerfile.')}" for name in containerfiles]
print("CONTAINERFILES:", containerfiles)
print("podman-push prerequisites:", aggregate_targets)
print("source target included:", source_target in aggregate_targets)
print("source target definition:", bool(re.search(r"^podman-push-source:\s+podman-build-source$", text, re.MULTILINE)))
PYRepository: skupperproject/skupper Length of output: 537 Invoke a source push target in the release job.
|
||
|
|
||
| ## Print fully qualified image names by arch | ||
| describe-multiarch-oci: | ||
| @scripts/oci-index-archive-info.sh amd64 arm64 | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: skupperproject/skupper
Length of output: 4284
🏁 Script executed:
Repository: skupperproject/skupper
Length of output: 4903
Use
--password-stdinfor registry authentication.Line 397 exposes
${QUAY_PASSWORD}as a command-line argument and splits secrets containing whitespace. Apply the same change to the other registry login commands in.circleci/config.yml.