Skip to content

Add skupper-source OCI image for downstream build contexts - #2560

Open
AryanP123 wants to merge 3 commits into
skupperproject:mainfrom
AryanP123:skupper-source-oci
Open

Add skupper-source OCI image for downstream build contexts#2560
AryanP123 wants to merge 3 commits into
skupperproject:mainfrom
AryanP123:skupper-source-oci

Conversation

@AryanP123

@AryanP123 AryanP123 commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Fixes #2559

Summary by CodeRabbit

  • New Features
    • Added support for packaging the Skupper source tree as an OCI image for downstream builds.
    • Added Docker and Podman commands to build and publish the source image.
    • Added automated publishing of the source image as part of the release workflow.
    • Improved source image packaging by excluding Git metadata.
    • Source images are labeled and made available alongside release container images for reproducible downstream build workflows.

@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 62d01615-e4bf-462d-bd3a-9f1919359472

📥 Commits

Reviewing files that changed from the base of the PR and between a64f312 and 1c89803.

📒 Files selected for processing (1)
  • .circleci/config.yml
💤 Files with no reviewable changes (1)
  • .circleci/config.yml

📝 Walkthrough

Walkthrough

The change adds a scratch-based OCI image for the Skupper source tree, local Docker and Podman build and push targets, and release workflow publication to Quay.

Changes

Source image publishing

Layer / File(s) Summary
Source image definition
Dockerfile.source, .dockerignore
Defines a scratch-based OCI image, adds metadata labels, copies the source tree to /go/src/app, and excludes .git/ from the build context.
Build and publish integration
Makefile
Adds SOURCE_IMAGE and Docker and Podman targets for building and pushing tagged source images.
Release source image publication
.circleci/config.yml
Adds a release job that runs after OCI image publication, authenticates to Quay, and builds and pushes the source image with the release tag.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: 🔵 Low · up to 1c898

The release workflow still passes the Quay password through Docker command-line arguments, which can expose credentials to process inspection or command logging. The change is otherwise mergeable, but this bounded security concern needs explicit owner awareness and follow-up.

Sequence Diagram(s)

sequenceDiagram
  participant ReleaseWorkflow
  participant MakeTargets
  participant Quay
  ReleaseWorkflow->>MakeTargets: Build source image with release tag
  MakeTargets->>Quay: Authenticate and push tagged source image
Loading

Suggested reviewers: fgiorgetti, nluaces, c-kruse

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding a Skupper source OCI image for downstream build contexts.
Linked Issues check ✅ Passed The changes add the source image, build and push targets, and release publishing required by issue #2559.
Out of Scope Changes check ✅ Passed All changes support source-image packaging, publishing, or Docker build context handling; no unrelated scope is evident.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 50dfdcf5-34d4-499c-8db0-a7b6088d2cc4

📥 Commits

Reviewing files that changed from the base of the PR and between 27d974b and 8756cee.

📒 Files selected for processing (2)
  • Dockerfile.source
  • Makefile

Comment thread Dockerfile.source
Comment thread Makefile
Comment thread Makefile
Comment on lines +128 to +135
docker-push-source: docker-build-source
${DOCKER} push "${REGISTRY}/${SOURCE_IMAGE}:${IMAGE_TAG}"

podman-build-source:
${PODMAN} build $(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}"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The 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' . || true

Repository: 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_.-]+:' Makefile

Repository: 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_.-]+:' Makefile

Repository: 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 || true

Repository: 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)))
PY

Repository: skupperproject/skupper

Length of output: 537


Invoke a source push target in the release job.

CONTAINERFILES excludes Dockerfile.source, so aggregate podman-push does not invoke podman-push-source. If release automation uses only that aggregate target, skupper-source is not published. Invoke podman-push-source or docker-push-source explicitly.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: ef68f89b-9af3-44a4-9389-0a242a0922e1

📥 Commits

Reviewing files that changed from the base of the PR and between 8756cee and a64f312.

📒 Files selected for processing (2)
  • .circleci/config.yml
  • .dockerignore

Comment thread .circleci/config.yml
Comment on lines +395 to +397
- run:
name: Docker login
command: docker login quay.io -u ${QUAY_LOGIN} -p ${QUAY_PASSWORD}

Copy link
Copy Markdown

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:

#!/bin/bash
set -eu
sed -n '370,410p' .circleci/config.yml
printf '\nDocker login references:\n'
rg -n -C 3 'docker login|QUAY_(LOGIN|PASSWORD)|docker-push-source' .circleci/config.yml Makefile 2>/dev/null || true
printf '\nShell expansion probe:\n'
bash -c 'set -- docker login quay.io -u ${QUAY_LOGIN} -p ${QUAY_PASSWORD}; printf "%s\n" "$@"' \
  2>/dev/null || true

Repository: skupperproject/skupper

Length of output: 4284


🏁 Script executed:

#!/bin/bash
set -eu
printf '%s\n' 'Argument expansion with whitespace:'
QUAY_LOGIN='build user' QUAY_PASSWORD='secret with spaces' bash -c '
  set -- docker login quay.io -u ${QUAY_LOGIN} -p ${QUAY_PASSWORD}
  printf "argc=%s\n" "$#"
  i=1
  for arg in "$@"; do printf "arg%s=%q\n" "$i" "$arg"; i=$((i+1)); done
'
printf '\nRelevant job context and all matching commands:\n'
sed -n '160,190p' .circleci/config.yml
sed -n '370,405p' .circleci/config.yml
sed -n '415,455p' .circleci/config.yml
sed -n '495,520p' .circleci/config.yml
printf '\nMatching line numbers:\n'
rg -n 'docker login|helm registry login|skopeo login' .circleci/config.yml

Repository: skupperproject/skupper

Length of output: 4903


Use --password-stdin for 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.

Comment thread .circleci/config.yml Outdated
@fgiorgetti

Copy link
Copy Markdown
Member

@AryanP123 should we also include a vendor directory as part of the source image?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Publish Skupper source as OCI image (skupper-source) for reproducible downstream builds

4 participants