-
Notifications
You must be signed in to change notification settings - Fork 350
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
chore(build): Add a CI workflow to build and push multiubuntu image whenever a change detected #1878
base: main
Are you sure you want to change the base?
Conversation
password: ${{ secrets.DOCKER_AUTHTOK }} | ||
|
||
- name: Build and push multi-architecture image | ||
uses: docker/build-push-action@v6 |
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.
examples/multiubuntu/build/build.sh
can handle build and push as well, no need to setup docker action for it.
build and push
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.
We need multiarch builds, they are not handled in the script.
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.
my bad, in that case keep repo name same that used in the script
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.
examples/multiubuntu/build/build.sh
can handle build and push as well, no need to setup docker action for it. build and push
Do I need to make any changes? Do I need to use examples/multiubuntu/build/build.sh? A bit confused here. Would love for some clarity :))
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.
@sikehish no need to use build.sh script, changes with your PR looks good just change image tag kubearmor/ubuntu-w-utils:latest
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.
Hi @rksharma95 . Ive made the change. Let me know if you need me to change anything else :)
@sikehish thanks for the PR, just some suggestions, looks good otherwise. also can you test it on your fork first?? |
…ndition in build stage.
…ndition in build stage.
Thanks for the oppurtunity too :) I've made all the other changes that you had requested for, barring #1878 (comment) . It's working on my fork. |
@sikehish can you please add
edit: we'll need to handle the case that latest built ubuntu image should be used in the tests |
Added examples/multiubuntu/build path in the CI workflow to run end-to-end tests for any changes.
Yup. I've added it. Let me know if any other changes need to be made. |
we'll need handling that the locally built image with changes pushed with PR used in testing. at this point it will just pull the image from kubearmor repo. |
I didn't quite get you. Do I have make any change in any of the test yml file? What change do I need to make and in which file? Also, how do I handle the case that latest built ubuntu image be used in the tests? Could you elaborate a bit more. |
I guess he is trying to say that in e2e tests, it should pick the locally built image rather than pulling from docker hub. Am I right? @rksharma95? To achieve this need to save docker image of multibuntu with latest tag and then this image will be used for tests. See |
Thanks for clarifying! I'll look into it |
…cally for testing Signed-off-by: sikehish <[email protected]>
Hi @rksharma95 @Manik2708 |
.github/workflows/ci-test-ginkgo.yml
Outdated
- name: Build multiubuntu image | ||
run: | | ||
cd examples/multiubuntu/build | ||
docker build -t kubearmor/multiubuntu:latest . |
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.
Please change the name to kubearmor/ubuntu-w-utils:latest
Can you share the logs or you local github action report or provide the error? |
.github/workflows/ci-test-ginkgo.yml
Outdated
@@ -84,6 +91,12 @@ jobs: | |||
|
|||
- name: Run KubeArmor | |||
run: | | |||
if [[ ${{ matrix.runtime }} == "containerd" ]]; then |
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 another if statement? Is there any problem for putting in the same if statement?
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 another if statement? Is there any problem for putting in the same if statement?
I thought it'd make it a bit more readable(as the kubearmor related images would be in a different block and the multiubuntu docker save block would be prominent enough. I'll make that change right away :)
It worked for containerd, but failed for crio. |
Signed-off-by: sikehish <[email protected]>
@rksharma95 @Manik2708 I've made those minor fixes. Is there anything else that needs to be changed? |
Please share the action logs, it's difficult to conclude from the image! |
Also some more changes are required! The tests which is using |
You might have to change the |
change it to
and if local image is supposed to be used in the tests use imagePullPolicy: Never in deployment.
|
@rksharma95 @Manik2708 I'm looking into the issues flagged. Apologize for the delay; a bit caught up with uni work |
Hi! Are you still working on this PR? Asking if you are facing any problem! |
Purpose of PR?:
Add a CI workflow to build and push the multi-architecture Ubuntu-based image for KubeArmor on changes to the
main
branch.Fixes #1876
Does this PR introduce a breaking change?
No
If the changes in this PR are manually verified, list down the scenarios covered::
push
orpull_request
on themain
branch.Additional information for reviewer? :
This PR introduces a new CI workflow and is not dependent on any previous PR or design.
Checklist:
<type>(<scope>): <subject>