-
Notifications
You must be signed in to change notification settings - Fork 7
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
JBOSS EAP 8.1 images in Konflux POC #44
base: eap81-beta-dev
Are you sure you want to change the base?
JBOSS EAP 8.1 images in Konflux POC #44
Conversation
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.
@rdnovell Thanks, I've added some comments to better understand what is produced and how we would be able to build images from the generated container files.
.github/workflows/cekit-action.yaml
Outdated
|
||
- name: Create folders | ||
run: | | ||
mkdir -p container-images/jdk17/runtime/ |
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 could use a matrix to run the same steps for either jdk17
or jdk21
, that'd simplify this file.
.github/workflows/cekit-action.yaml
Outdated
@@ -0,0 +1,51 @@ | |||
name: Publish cekit | |||
on: | |||
workflow_dispatch |
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.
for POC, that's fine to run this action manually.
When do you plan to run it? On opened PRs, on merges?
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.
From a talk with @jfdenise we will do:
open the PR: , dry-run 4 times, run the tests (no tests run currently).
merge the PR: dry-run 4 times, commit/push the changes.
My idea is use this pattern
on:
pull_request:
branches:
- eap81-beta-dev
jobs:
main-job:
...
commit-job:
if: github.event.pull_request.merged == true
...
.github/workflows/cekit-action.yaml
Outdated
run: cekit --descriptor ./builder-image/image.yaml build --overrides ./builder-image/image-jdk21-overrides.yaml --dry-run docker | ||
- name: Copy files to container-images folder | ||
run: | | ||
cp -prf target/image/Dockerfile container-images/jdk21/builder |
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.
At this point, we have an up-to-date Dockerfile in container-images/jdk21/builder but this file is referencing cekit modules (eg COPY modules/jboss.container.user ...
. What'd be the build context to build this images?
Does cekit dry-run also fetch cekit modules? Should they be added to the git commit below?
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.
|
||
- name: Push the new files | ||
run: | | ||
git config --global user.email "[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.
We'll have to decide how these automated commits are identified.
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Ruben Novelli" | ||
git add container-images |
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.
should we do a git add .
?
git config --global user.name "Ruben Novelli" | ||
git add container-images | ||
git commit -m "Sync files" | ||
git 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.
if the action is run when a PR is opened, would that push to the HEAD of the PR branch? That might be problematic if we want to rebase/amend PRs
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 need to add if: github.event.pull_request.merged == true
and also the correct branch
###### START module 'jboss.container.user:2.0+jboss1' | ||
###### \ | ||
# Copy 'jboss.container.user' module content | ||
COPY modules/jboss.container.user /tmp/scripts/jboss.container.user |
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.
Here, what is the build context so that we can COPY
the modules/jboss.container.user
directory?
I thin ktha tthis PR should be put in Draft for now. @rdnovell is investigating and it seems not ready for review. |
2337ee6
to
6216583
Compare
This will add a Github cekit action. Cekit will run in dry-run mode and the genereated files will be copied and commited.
Issue: https://issues.redhat.com/browse/CLOUD-4265
Signed-off-by: Ruben Novelli [email protected]