Skip to content

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

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

Add skupper-source OCI image for downstream build contexts#2560
AryanP123 wants to merge 5 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 distributing the Skupper source tree as an OCI image for downstream builds.
    • Added Docker and Podman commands to build and publish source images.
    • Source images now include vendored Go dependencies for more reproducible builds.
    • Source images are published alongside release container images.
  • Chores
    • Automated source-image publishing as part of the release workflow.
    • Excluded Git metadata and existing vendor content from the source-image build context.

@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: cf80c2cc-7b64-4504-9af6-ce470e156c71

📥 Commits

Reviewing files that changed from the base of the PR and between 235fabf and 4c69b99.

📒 Files selected for processing (1)
  • Dockerfile.source
🚧 Files skipped from review as they are similar to previous changes (1)
  • Dockerfile.source

Included review availability: Your plan provides up to 4 included reviews per hour; 2 remain after this review.


📝 Walkthrough

Walkthrough

The change adds Go dependency vendoring to the source OCI image, 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
Adds a Go-based vendor stage that downloads modules and runs go mod vendor. The scratch image copies the vendored source tree. The build context excludes .git/ and vendor/.
Build and publish integration
Makefile
Adds SOURCE_IMAGE and Docker and Podman targets for building and pushing tagged source images. The build targets pass GO_IMAGE_BASE_TAG.
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 4c69b

The release job passes the Quay password through Docker command-line arguments, creating a bounded credential-exposure risk in CI; the PR is otherwise mergeable with explicit owner awareness and follow-up to move the secret out of command-line arguments.

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
🚥 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 identifies the primary change: adding the skupper-source OCI image for downstream build contexts.
Linked Issues check ✅ Passed The changes satisfy issue #2559. They add a source image definition, provide Docker and Podman build and push targets, publish the image during releases, and support downstream builds without a Git cl…
Out of Scope Changes check ✅ Passed The changes are within scope for issue #2559. Vendor handling and Docker ignore updates directly support a reproducible source-tree image and do not introduce unrelated code changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Full details: Linked Issues check

Explanation

The changes satisfy issue #2559. They add a source image definition, provide Docker and Podman build and push targets, publish the image during releases, and support downstream builds without a Git clone. The IBM Dockerfile updates remain outside this issue as required.

Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

Warning

Your free Security trial is over. An organization admin can upgrade to Advanced for continuous pull request security review or dismiss this notice.


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 Outdated
Comment thread Makefile Outdated
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?

@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: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: 037458c1-4a29-4775-8a2a-6cad6161fdc5

📥 Commits

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

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

Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review.

Comment thread Dockerfile.source Outdated
@AryanP123

Copy link
Copy Markdown
Contributor Author

@fgiorgetti Updated Dockerfile.source with a golang stage that runs go mod vendor before copying into scratch. Lmk what you think

@fgiorgetti fgiorgetti left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@AryanP123 LGTM! Thank you.

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