-
Notifications
You must be signed in to change notification settings - Fork 80
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
FLPATH-1066: swf-builder: generate manifests using kn-workflow #1751
base: main
Are you sure you want to change the base?
Conversation
87b04b1
to
23a12c8
Compare
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.
Many thanks! A few comments if you don't mind. Also, can you please create one or more bats tests to validate this new module and the builder calling the new script?
|
||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | ||
INSTALL_DIR=/usr/local/bin | ||
curl -L https://github.com/rgolangh/kie-tools/releases/download/0.0.2/kn-workflow-linux-amd64 -o "${INSTALL_DIR}"/kn-workflow |
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.
Can we use the official repo and uname
to identify the OS and arch in this URL?
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.
till now I'm using this private build because the latest fixes with ''--namespace" flag are still not published. @ederign is this still true?
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.
@rgolangh not yet, but soon we will have kn workflow cli 1.32 published together with serverless release.
e963f7f
to
eda46ff
Compare
eda46ff
to
094e03f
Compare
[ ! -f "${KOGITO_HOME}"/bin/kn-workflow_invocation.txt ] | ||
} | ||
|
||
mock_bin() { |
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.
pretty cool!
e419825
to
86fedf8
Compare
Generate manifests and save them in the runtime image. Generating manifests is an opt-in as part of the build ran by /launch/build-app.sh When setting GEN_MANIFESTS=true during container build the build-app.sh script will call a new generate-manifests.sh script that will use _kn-workflow_ cli and will store the manifests under $KOGITO_HOME/build/manifests Later in the runtime image user can copy and store those manifests for later use: COPY --from=builder --chown=185 /home/kogito/build/manifests /deployments/manifests The manifests can be extracted for example by echoing them from the image: podman run builder:latest cat /deployment/manifests/* > manifests-all.yaml or by podman cp: podman cp $(podman create builder:latest):/deployment/manifests . Signed-off-by: Roy Golan <[email protected]>
86fedf8
to
a649be2
Compare
PR job Please look here: https://ci-builds.apache.org/job/KIE/job/kogito/job/main/job/pullrequest/job/kogito-images.build-and-test/121/display/redirect Console Logs[Pipeline] }Build KIE » kogito » main » pullrequest » kogito-images.build-image PR #1751 - kogito-data-index-ephemeral: https://github.com//pull/1751 completed: SUCCESS [Pipeline] } [Pipeline] // stage [Pipeline] } Build KIE » kogito » main » pullrequest » kogito-images.build-image PR #1751 - kogito-jobs-service-ephemeral: https://github.com//pull/1751 completed: SUCCESS [Pipeline] } [Pipeline] // stage [Pipeline] } Build KIE » kogito » main » pullrequest » kogito-images.build-image PR #1751 - kogito-runtime-jvm: https://github.com//pull/1751 completed: SUCCESS [Pipeline] } [Pipeline] // stage [Pipeline] } Build KIE » kogito » main » pullrequest » kogito-images.build-image PR #1751 - kogito-management-console: https://github.com//pull/1751 completed: SUCCESS [Pipeline] } [Pipeline] // stage [Pipeline] } Build KIE » kogito » main » pullrequest » kogito-images.build-image PR #1751 - kogito-task-console: https://github.com//pull/1751 completed: SUCCESS [Pipeline] } [Pipeline] // stage [Pipeline] } Build KIE » kogito » main » pullrequest » kogito-images.build-image PR #1751 - kogito-swf-builder: https://github.com//pull/1751 completed: SUCCESS [Pipeline] } [Pipeline] // stage [Pipeline] } Build KIE » kogito » main » pullrequest » kogito-images.build-image PR #1751 - kogito-s2i-builder: https://github.com//pull/1751 completed: SUCCESS [Pipeline] } [Pipeline] // stage [Pipeline] } Build KIE » kogito » main » pullrequest » kogito-images.build-image PR #1751 - kogito-jobs-service-allinone: https://github.com//pull/1751 completed: FAILURE [Pipeline] error [Pipeline] } [Pipeline] // stage [Pipeline] } Failed in branch kogito-jobs-service-allinone [Pipeline] // parallel [Pipeline] } [Pipeline] // dir [Pipeline] } [Pipeline] // script [Pipeline] } [Pipeline] // stage [Pipeline] stage [Pipeline] { (Declarative: Post Actions) [Pipeline] script [Pipeline] { [Pipeline] sh + wget --no-check-certificate -qO - 'https://ci-builds.apache.org/job/KIE/job/kogito/job/main/job/pullrequest/job/kogito-images.build-and-test/121/api/json?depth=0' [Pipeline] readJSON [Pipeline] sh |
@tomasdavidorg fyi: concerns kn cli |
Errors in the CI are not related. These are tied to the recent renaming work we are doing on runtimes libraries. |
@jakubschwan @tomasdavidorg can you guys verify? |
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.
@ricardozanini Is this still relevant with the latest planned changes? I mean the Unblocking and releasing Apache KIE 10
. The kie-tools will be the last in the queue and it does not seems to be ok to include them here. But maybe I am missing something.
|
||
artifacts: | ||
- name: kn-workflow-x86_64 | ||
url: https://github.com/rgolangh/kie-tools/releases/download/0.0.2/kn-workflow-linux-amd64 |
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.
The link does not seems to be correct as it points to the fork.
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 will review this once we move kn-workflow to the operator.
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.
is there a release I can use already?
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.
No, there's not.
@tomasdavidorg We will continue with this since we are moving to kie-tools just temporarily. After the release, we will fix the release stream. Additionally, the workflow CLI will be in the operator repo. |
PR job Please look here: https://ci-builds.apache.org/job/KIE/job/kogito/job/main/job/pullrequest/job/kogito-images.build-and-test/1/display/redirect Console LogsFrom https://github.com/rgolangh/incubator-kie-kogito-images* branch add-kn-workflow-to-builder -> FETCH_HEAD hint: You have divergent branches and need to specify how to reconcile them. hint: You can do so by running one of the following commands sometime before hint: your next pull: hint: hint: git config pull.rebase false # merge (the default strategy) hint: git config pull.rebase true # rebase hint: git config pull.ff only # fast-forward only hint: hint: You can replace "git config" with "git config --global" to set a default hint: preference for all repositories. You can also pass --rebase, --no-rebase, hint: or --ff-only on the command line to override the configured default per hint: invocation. fatal: Need to specify how to reconcile divergent branches. [Pipeline] } [Pipeline] // withCredentials [Pipeline] echo ------------------------------------------------------------- [ERROR] Can't merge source into Target. Please rebase PR branch. ------------------------------------------------------------- Source: git://github.com/rgolangh/incubator-kie-kogito-images add-kn-workflow-to-builder Target: a595d8c Upgrade to and align with Quarkus 3.8.4 LTS release. (#1760) ------------------------------------------------------------- [Pipeline] } [Pipeline] // dir [Pipeline] } [Pipeline] // script [Pipeline] } [Pipeline] // stage [Pipeline] stage [Pipeline] { (Validate CeKit Image and Modules descriptors) Stage "Validate CeKit Image and Modules descriptors" skipped due to earlier failure(s) [Pipeline] } [Pipeline] // stage [Pipeline] stage [Pipeline] { (Build & Test Images) Stage "Build & Test Images" skipped due to earlier failure(s) [Pipeline] } [Pipeline] // stage [Pipeline] stage [Pipeline] { (Declarative: Post Actions) [Pipeline] script [Pipeline] { [Pipeline] sh + wget --no-check-certificate -qO - 'https://ci-builds.apache.org/job/KIE/job/kogito/job/main/job/pullrequest/job/kogito-images.build-and-test/1/api/json?depth=0' [Pipeline] readJSON [Pipeline] sh |
PR job Please look here: https://ci-builds.apache.org/job/KIE/job/kogito/job/main/job/pullrequest/job/kogito-images.build-and-test/3/display/redirect Console LogsFrom https://github.com/rgolangh/incubator-kie-kogito-images* branch add-kn-workflow-to-builder -> FETCH_HEAD hint: You have divergent branches and need to specify how to reconcile them. hint: You can do so by running one of the following commands sometime before hint: your next pull: hint: hint: git config pull.rebase false # merge (the default strategy) hint: git config pull.rebase true # rebase hint: git config pull.ff only # fast-forward only hint: hint: You can replace "git config" with "git config --global" to set a default hint: preference for all repositories. You can also pass --rebase, --no-rebase, hint: or --ff-only on the command line to override the configured default per hint: invocation. fatal: Need to specify how to reconcile divergent branches. [Pipeline] } [Pipeline] // withCredentials [Pipeline] echo ------------------------------------------------------------- [ERROR] Can't merge source into Target. Please rebase PR branch. ------------------------------------------------------------- Source: git://github.com/rgolangh/incubator-kie-kogito-images add-kn-workflow-to-builder Target: 431715c Add @jstastny-cz and @rodrigonull to CODEOWNERS (#1771) ------------------------------------------------------------- [Pipeline] } [Pipeline] // dir [Pipeline] } [Pipeline] // script [Pipeline] } [Pipeline] // stage [Pipeline] stage [Pipeline] { (Validate CeKit Image and Modules descriptors) Stage "Validate CeKit Image and Modules descriptors" skipped due to earlier failure(s) [Pipeline] } [Pipeline] // stage [Pipeline] stage [Pipeline] { (Build & Test Images) Stage "Build & Test Images" skipped due to earlier failure(s) [Pipeline] } [Pipeline] // stage [Pipeline] stage [Pipeline] { (Declarative: Post Actions) [Pipeline] script [Pipeline] { [Pipeline] sh + wget --no-check-certificate -qO - 'https://ci-builds.apache.org/job/KIE/job/kogito/job/main/job/pullrequest/job/kogito-images.build-and-test/3/api/json?depth=0' [Pipeline] readJSON [Pipeline] sh |
Generate manifests and save them in the runtime image.
Generating manifests is an opt-in as part of the build ran by /launch/build-app.sh
When setting
GEN_MANIFESTS=true
during container build the build-app.shscript will call a new generate-manifests.sh script that will use
kn-workflow cli and will store the manifests under
$KOGITO_HOME/build/manifests
Later in the runtime image user can copy and store those manifests for
later use:
The manifests can be extracted for example by echoing them from the image:
or by podman cp:
Fixes: #1739
Related-to: https://issues.redhat.com/browse/FLPATH-1066
Signed-off-by: Roy Golan [email protected]
Many thanks for submitting your Pull Request ❤️!
Please make sure your PR meets the following requirements:
[KOGITO|RHPAM-XYZ] Subject
How to retest this PR or trigger a specific build:
Please add comment: Jenkins [test|retest] this
How to backport a pull request to a different branch?
In order to automatically create a backporting pull request please add one or more labels having the following format
backport-<branch-name>
, where<branch-name>
is the name of the branch where the pull request must be backported to (e.g.,backport-7.67.x
to backport the original PR to the7.67.x
branch).Once the original pull request is successfully merged, the automated action will create one backporting pull request per each label (with the previous format) that has been added.
If something goes wrong, the author will be notified and at this point a manual backporting is needed.