apache / incubator-kie-kogito-images

Images for Kogito
http://kogito.kie.org
Apache License 2.0
23 stars 80 forks source link

FLPATH-1066: swf-builder: generate manifests using kn-workflow #1751

Open rgolangh opened 8 months ago

rgolangh commented 8 months ago

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 .

Fixes: #1739 Related-to: https://issues.redhat.com/browse/FLPATH-1066

Signed-off-by: Roy Golan rgolan@redhat.com

Many thanks for submitting your Pull Request :heart:!

Please make sure your PR meets the following requirements:

How to retest this PR or trigger a specific build: - (Re)run Jenkins tests 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-`, where `` 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 the `7.67.x` branch). > **NOTE**: **backporting** is an action aiming to move a change (usually a commit) from a branch (usually the main one) to another one, which is generally referring to a still maintained release branch. Keeping it simple: it is about to move a specific change or a set of them from one branch to another. 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. > **NOTE**: this automated backporting is triggered whenever a pull request on `main` branch is labeled or closed, but both conditions must be satisfied to get the new PR created.
kie-ci3 commented 8 months ago

PR job #121 was: FAILURE Possible explanation: Pipeline failure or project build failure

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 See console log:

Console Logs [Pipeline] }
Build KIE » kogito » main » pullrequest » kogito-images.build-image PR #1751 - kogito-data-index-ephemeral: https://github.com/apache/incubator-kie-kogito-images/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/apache/incubator-kie-kogito-images/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/apache/incubator-kie-kogito-images/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/apache/incubator-kie-kogito-images/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/apache/incubator-kie-kogito-images/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/apache/incubator-kie-kogito-images/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/apache/incubator-kie-kogito-images/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/apache/incubator-kie-kogito-images/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
domhanak commented 8 months ago

@tomasdavidorg fyi: concerns kn cli

ricardozanini commented 8 months ago

Errors in the CI are not related. These are tied to the recent renaming work we are doing on runtimes libraries.

ricardozanini commented 8 months ago

@jakubschwan @tomasdavidorg can you guys verify?

ricardozanini commented 8 months ago

@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.

kie-ci3 commented 6 months ago

PR job #1 was: FAILURE Possible explanation: Pipeline failure or project build failure

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 See console log:

Console Logs From 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: a595d8cf 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
kie-ci3 commented 5 months ago

PR job #3 was: FAILURE Possible explanation: Pipeline failure or project build failure

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 See console log:

Console Logs From 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: 431715cd 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