-
Notifications
You must be signed in to change notification settings - Fork 8
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
feat: Support for buildx #37
feat: Support for buildx #37
Conversation
Signed-off-by: ashnamehrotra <[email protected]>
Signed-off-by: ashnamehrotra <[email protected]>
Signed-off-by: ashnamehrotra <[email protected]>
Signed-off-by: ashnamehrotra <[email protected]>
Signed-off-by: ashnamehrotra <[email protected]>
Signed-off-by: ashnamehrotra <[email protected]>
… default Signed-off-by: ashnamehrotra <[email protected]>
Signed-off-by: ashnamehrotra <[email protected]>
Signed-off-by: ashnamehrotra <[email protected]>
Signed-off-by: ashnamehrotra <[email protected]>
Signed-off-by: ashnamehrotra <[email protected]>
Signed-off-by: ashnamehrotra <[email protected]>
Signed-off-by: ashnamehrotra <[email protected]>
uses: crazy-max/ghaction-setup-docker@v3 | ||
with: | ||
daemon-config: | | ||
{ |
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.
nit: indention is off in this json
.github/workflows/build.yaml
Outdated
copa-action 'docker.io/library/nginx:1.21.6' 'nginx.1.21.6.json' '1.21.6-patched' '10m' 'buildx' 'openvex' 'output.json' | ||
bats --print-output-on-failure ./test/test.bats | ||
|
||
- name: Bats Test - Buildkit Container |
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.
are these going to run sequentially? if so, can we execute in parallel using a matrix
@ashnamehrotra looks like build e2e failed with a timeout https://github.com/project-copacetic/copa-action/actions/runs/7878674392/job/21497411542?pr=37 do we need to increase the timeout |
Looking into this, I tested with 20min timeout and its still failing, there might be something else wrong. I also re-ran a test that was originally passing which is failing now. |
just fyi if you are passing |
Signed-off-by: ashnamehrotra <[email protected]>
Signed-off-by: ashnamehrotra <[email protected]>
Signed-off-by: ashnamehrotra <[email protected]>
d0246e5
to
c09a51b
Compare
The timeout flag should be available in copa-action in v1.1.0 release. Also looks like the timeout error was specific to the nginx image in the build test, created an issue here: project-copacetic/copacetic#504 and changed the test to use the OPA image for now. Final issue to resolve is for custom-socket approach, trivy is unable to find the patched image in the bats test since it was created in a different context, even when switched to the new context. |
Signed-off-by: ashnamehrotra <[email protected]>
fa5e4dd
to
f26cc30
Compare
Signed-off-by: ashnamehrotra <[email protected]>
Signed-off-by: ashnamehrotra <[email protected]>
Signed-off-by: ashnamehrotra <[email protected]>
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.
Thank you! added a few minor comments, otherwise LGTM
run: | | ||
trivy image --vuln-type os --ignore-unfixed -f json -o /tmp/nginx.1.21.6.json docker.io/library/nginx:1.21.6 | ||
trivy image --vuln-type os --ignore-unfixed -f json -o /tmp/opa.0.46.0.json docker.io/openpolicyagent/opa:0.46.0 |
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.
this is fine for now, but we'll need to add a trivy ignore list like copa in the future as there's no way to avoid false positives
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.
Created issue to add that: #38
docker images | ||
copa-action 'docker.io/openpolicyagent/opa:0.46.0' 'opa.0.46.0.json' '0.46.0-patched' '10m' "${{ matrix.test-type }}" 'openvex' 'output.json' | ||
|
||
docker -c "$CONTEXT" save -o patched.tar openpolicyagent/opa:0.46.0-patched |
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.
why are we saving to a tarball? because trivy can't scan it? if so, can you add a note
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.
yes I did some research but I couldn't find a way to get trivy access without saving to tarball. Added a note for that!
README.md
Outdated
| `custom-socket` | String | False | | Custom Docker socket address (available with copa-action v0.6.1 and later) | | ||
|
||
> [!NOTE] | ||
> Copacetic released version's features do not align with Copa Action versions. |
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.
This is a bit confusing. Are we saying copa may have features that action might not?
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.
I meant to say that if a feature was released in Copa version v0.6.0 (like patching local images), it wont necessarily be supported in Copa-Action version v0.6.0. In this case it will supported starting with Copa-Action v0.6.1. I changed the wording a bit to try to make it more clear.
Signed-off-by: ashnamehrotra <[email protected]>
Signed-off-by: ashnamehrotra <[email protected]>
Adds support and documentation for private and local image patching.
default buildx test run
buildkit container test run
custom socket test run
Fixes #32 #16