add cli-stack for binary distribution#3195
add cli-stack for binary distribution#3195sampras343 wants to merge 2 commits intoconforma:release-v0.8from
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
ⓘ You are approaching your monthly quota for Qodo. Upgrade your plan Review Summary by QodoAdd CLI stack for multi-architecture binary distribution
WalkthroughsDescription• Add multi-architecture CLI binary distribution image • Create Tekton pipeline configurations for PR and push events • Aggregate pre-built binaries from multiple architectures into single image • Support Linux, Darwin, and Windows platforms across architectures Diagramflowchart LR
A["Per-arch CLI builds<br/>amd64, arm64, ppc64le, s390x"] -->|"Extract binaries"| B["Packager stage<br/>decompress and repackage"]
B -->|"Collect all binaries"| C["Minimal UBI9 image<br/>with all tar.gz archives"]
D["Tekton PR Pipeline<br/>conforma-cli-stack-pull-request.yaml"] -->|"Builds on PR"| C
E["Tekton Push Pipeline<br/>conforma-cli-stack-push.yaml"] -->|"Builds on push"| C
C -->|"Distributes to"| F["quay.io registry<br/>for developer access"]
File Changes1. Dockerfile.cli-stack.rh
|
Code Review by Qodo
1. Unbuildable digest placeholders
|
Signed-off-by: Sachin Sampras M <sampras343@gmail.com>
ⓘ You are approaching your monthly quota for Qodo. Upgrade your plan Review Summary by QodoAdd CLI stack for multi-platform binary distribution
WalkthroughsDescription• Add multi-architecture CLI binary aggregation image • Create Tekton pipeline configurations for pull requests and push events • Bundle CLI binaries for Linux, Darwin, and Windows platforms • Enable binary distribution via container registry Diagramflowchart LR
A["Multi-arch CLI builds<br/>amd64, arm64, ppc64le, s390x"] -->|"Aggregate binaries"| B["Dockerfile.cli-stack.rh<br/>Packager stage"]
B -->|"Extract & compress"| C["Binary archives<br/>Linux, Darwin, Windows"]
C -->|"Final minimal image"| D["quay.io/securesign/<br/>conforma-cli-stack"]
E["Pull Request trigger"] -->|"Build on PR"| F["conforma-cli-stack-pull-request.yaml"]
G["Push to release-v0.8"] -->|"Build on push"| H["conforma-cli-stack-push.yaml"]
F -->|"Uses pipeline"| D
H -->|"Uses pipeline"| D
File Changes1. Dockerfile.cli-stack.rh
|
Code Review by Qodo
1. Unbuildable digest placeholders
|
| @@ -0,0 +1,66 @@ | |||
| FROM --platform=linux/amd64 quay.io/redhat-user-workloads/rhtap-contract-tenant/ec-v08/cli-v08@sha256:7d2ecffad4cee873caee676eda74c5acd6254e64bbca8280b1d69f0806426999 AS build-amd64 | |||
There was a problem hiding this comment.
I think it needs a license preamble to avoid a lint error.
There was a problem hiding this comment.
I was expecting to see a verion number in the filename.
We are a little bit "multi-stream", i.e. we maintain and build more than one parallel release branch build. Right now we have v0.6, v0.7 and v0.8. (v0.6 would be retired soon after RHTAS 1.4 is shipped.).
So I think it's likely we should version the component name, so we can have say "conforma-cli-stack-v08" and later in the year we can introduce "conforma-cli-stack-v09". Wdyt?
There was a problem hiding this comment.
Similar multi stream approach here as well.
The current component created is under main$ by default, so the naming is conforma-cli-stack.
I will address this issue when I create the stack under 1.4 release of rhtas.
So the application would be like cli-stacks-v1-4 and the component under that could be conforma-cli-stack-v08.
Dockerfile.cli-stack.rh
Outdated
| FROM --platform=linux/ppc64le quay.io/redhat-user-workloads/rhtap-contract-tenant/ec-v08/cli-v08@sha256:2e385572d9cc508288e5a4cc7a44c22de4266be860e725a7795d4402db1314c0 AS build-ppc64le | ||
| FROM --platform=linux/s390x quay.io/redhat-user-workloads/rhtap-contract-tenant/ec-v08/cli-v08@sha256:e725abfa91aa21d28d2ae5b5c5fa5544bcd3998b48c18d268d981c1ad51d3f1f AS build-s390x | ||
|
|
||
| FROM registry.redhat.io/ubi9/go-toolset:9.7@sha256:799cc027d5ad58cdc156b65286eb6389993ec14c496cf748c09834b7251e78dc AS packager |
There was a problem hiding this comment.
Not a blocker, but I'm wondering why do you need the go-toolset? Seems like gzip and tar would be all that is needed, so why not use a lighter weight image to do the packaging?
There was a problem hiding this comment.
In one of my earlier tryouts, I tried using ubi-minimal but gzip was not found in that and I had to install on top of it which I felt was counter intuitive to already signed off packages within the image.
Plus, the final base image in the multi stage build is something minimal
| FROM --platform=linux/amd64 quay.io/redhat-user-workloads/rhtap-contract-tenant/ec-v08/cli-v08@sha256:7d2ecffad4cee873caee676eda74c5acd6254e64bbca8280b1d69f0806426999 AS build-amd64 | ||
| FROM --platform=linux/arm64 quay.io/redhat-user-workloads/rhtap-contract-tenant/ec-v08/cli-v08@sha256:9f39e82fd59f414bc26207d18588c5ffbf8c9c0ca00e81e68f80f2c39db01657 AS build-arm64 | ||
| FROM --platform=linux/ppc64le quay.io/redhat-user-workloads/rhtap-contract-tenant/ec-v08/cli-v08@sha256:2e385572d9cc508288e5a4cc7a44c22de4266be860e725a7795d4402db1314c0 AS build-ppc64le | ||
| FROM --platform=linux/s390x quay.io/redhat-user-workloads/rhtap-contract-tenant/ec-v08/cli-v08@sha256:e725abfa91aa21d28d2ae5b5c5fa5544bcd3998b48c18d268d981c1ad51d3f1f AS build-s390x |
There was a problem hiding this comment.
I was thinking we should use the registry.redhat.io/rhtas/ec-rhel9:0.8 image here, but IIUC using the quay.io image means it works better with Konflux's nudging mechanism.
c3cfc93 to
6ac7a03
Compare
Signed-off-by: Sachin Sampras M <sampras343@gmail.com>
| - name: url | ||
| value: https://github.com/securesign/pipelines.git | ||
| - name: revision | ||
| value: main |
There was a problem hiding this comment.
Might be a good idea to pin to a known revision.
|
/ok-to-test |
|
The acceptance test failure here is unexpected. Created #3197 to (hopefully) fix it. If that works and gets merged, I'll rebase this one and see if we can get it green. |
Add cli-stack for binary aggregation into a single image and distribution to developers portal