Restructure os version layout#49
Conversation
Key images by OS/OS-version built from a CI matrix (.ci/matrix.yml). - ubuntu/Dockerfile: one multi-stage Dockerfile for all Ubuntu versions (22.04/24.04/26.04); base = `full` stage, add-ons (cmake-4) = extra stages - single .github/workflows/build.yml pipeline: discover -> build -> release -> publish GHCR (signed) + Nexus, so a token-created release still publishes - debian/almalinux/arch: empty multi-stage placeholders, absent from the matrix - README + RELEASING document the layout and release flow Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
@coderabbitai review |
1 similar comment
|
@coderabbitai review |
✅ Action performedReview finished.
|
📝 WalkthroughWalkthroughReplaces a single flat ChangesMonorepo CI Pipeline Overhaul
Sequence Diagram(s)sequenceDiagram
participant dev as Developer
participant gha as GitHub Actions
participant matrix as matrix.py
participant buildx as docker buildx
participant ghcr as GHCR
participant nexus as Nexus
participant cosign as cosign
dev->>gha: push tag (os-version-semver)
gha->>matrix: matrix.py all → JSON matrix
matrix-->>gha: image list
gha->>buildx: build base + add-on stages (--load)
gha->>gha: create/update GitHub Release (--latest=false)
rect rgba(100, 149, 237, 0.5)
note over gha,cosign: publish-ghcr
gha->>matrix: matrix.py image TAG → shell vars
matrix-->>gha: build params
gha->>ghcr: docker buildx --push (moving + immutable tags)
gha->>cosign: cosign sign --yes each tag
gha->>cosign: cosign verify each tag
end
rect rgba(144, 238, 144, 0.5)
note over gha,nexus: publish-nexus
gha->>matrix: matrix.py image TAG → shell vars
matrix-->>gha: build params
gha->>nexus: docker buildx --push (moving + immutable tags)
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 6
🧹 Nitpick comments (1)
ubuntu/Dockerfile (1)
47-67: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick winUse
--no-install-recommendson package installs.These install steps currently pull recommended packages by default, which increases image size and attack surface for every published image variant.
Proposed patch
RUN apt-get update \ && apt-get upgrade -qy \ && apt-get dist-upgrade -qy \ - && apt-get install -qy \ + && apt-get install -qy --no-install-recommends \ ca-certificates \ curl \ gnupg \ lsb-release \ @@ FROM base AS venv RUN apt-get update \ - && apt-get install -qy python3-pip python3-venv \ + && apt-get install -qy --no-install-recommends python3-pip python3-venv \ && rm -rf /var/lib/apt/lists/* @@ RUN apt-get update \ && . /etc/os-release \ && case "${VERSION_ID}" in \ 22.04) qt="${QT_PKGS_22_04}" ;; \ *) qt="${QT_PKGS}" ;; \ esac \ - && apt-get install -qy ${COMMON_PKGS} ${qt} \ + && apt-get install -qy --no-install-recommends ${COMMON_PKGS} ${qt} \ && apt-get clean \ && rm -rf /var/lib/apt/lists/*Also applies to: 73-75, 156-164
Source: Linters/SAST tools
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: e0109505-7866-440e-8690-1bdf31658c9e
📒 Files selected for processing (15)
.ci/matrix.py.ci/matrix.yml.ci/publish.sh.github/workflows/build.yml.github/workflows/publish-nexus.yml.github/workflows/publish.yml.github/workflows/release.yml.gitignoreDockerfileREADME.mdRELEASING.mdalmalinux/Dockerfilearch/Dockerfiledebian/Dockerfileubuntu/Dockerfile
💤 Files with no reviewable changes (3)
- .github/workflows/publish.yml
- Dockerfile
- .github/workflows/publish-nexus.yml
| # PLACEHOLDER — OpenModelica build-deps image for Debian. | ||
| # | ||
| # Not implemented yet. Use the same layout as ../ubuntu/Dockerfile: a single | ||
| # multi-stage Dockerfile covering ALL Debian versions, with these stages: | ||
| # base OpenModelica build dependencies only | ||
| # venv Python virtualenv at /opt/venv, built in isolation and copied later | ||
| # full the published base image (build-deps:debian-<ver>) | ||
| # <addon> optional add-on stages (FROM full) | ||
| # | ||
| # The Debian version is selected with a build-arg, e.g.: | ||
| # ARG DEBIAN_VERSION=13 | ||
| # FROM debian:${DEBIAN_VERSION} AS base | ||
| # | ||
| # To implement: | ||
| # 1. Replace this file with a real multi-stage Dockerfile (see | ||
| # ../ubuntu/Dockerfile and RELEASING.md). A starting point exists on the | ||
| # old Debian branches / PR #36 | ||
| # (https://github.com/OpenModelica/build-deps/pull/36). | ||
| # 2. Add the debian entries to .ci/matrix.yml | ||
| # (context: debian, dockerfile: debian/Dockerfile, target: full, | ||
| # build_args: { DEBIAN_VERSION: "<ver>" }). | ||
| # 3. Open a PR; build.yml will build it. | ||
| # | ||
| # Until then Debian is intentionally absent from .ci/matrix.yml, so CI does not | ||
| # try to build it. |
There was a problem hiding this comment.
I would perhaps rename "ubuntu/Dockerfile" to "apt/Dockerfile" instead. They are pretty much the same when it comes to dependencies
| ``build_args`` and ``addons`` are space-separated strings so they can be | ||
| looped over in shell directly. |
There was a problem hiding this comment.
Is that important? A list would be much more natural...
| Resolve a release tag such as ``ubuntu-24.04-2.1.0`` to the image it | ||
| refers to and print shell ``key='value'`` assignments to stdout:: | ||
|
|
||
| dir='ubuntu/24.04' | ||
| base_tag='ubuntu-24.04' | ||
| semver='2.1.0' | ||
| context='ubuntu' | ||
| dockerfile='ubuntu/Dockerfile' | ||
| target='full' | ||
| build_args='UBUNTU_VERSION=24.04' | ||
| addons='cmake-4' |
There was a problem hiding this comment.
Simply make the tags v2.1.0 instead and rebuild the images based on that. Needing to tag multiple things is annoying.
e83f241 to
fbcb397
Compare
|
@AnHeuermann I pushed my rust deps |
Issue
Fixes #48
Changes
Key images by OS/OS-version built from a CI matrix (.ci/matrix.yml).
ubuntu/Dockerfile: one multi-stage Dockerfile for all Ubuntu versions
(22.04/24.04/26.04); base =
fullstage, add-ons (cmake-4) = extra stagessingle .github/workflows/build.yml pipeline: discover -> build -> release
-> publish GHCR (signed) + Nexus, so a token-created release still publishes
debian/almalinux/arch: empty multi-stage placeholders, absent from the matrix
README + RELEASING document the layout and release flow