ricardozanini commented on code in PR #1751:
URL: 
https://github.com/apache/incubator-kie-kogito-images/pull/1751#discussion_r1507733032


##########
modules/kogito-workflow-manifests/added/generate-manifests.sh:
##########
@@ -0,0 +1,11 @@
+#!/usr/bin/env bash 

Review Comment:
   Can you add the headers, please?



##########
modules/kogito-workflow-manifests/module.yaml:
##########
@@ -0,0 +1,30 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+schema_version: 1
+name: org.kie.kogito.workflow-manifests
+version: "999-SNAPSHOT"
+description: Module to install kn-workflow tool and scripts
+execute:
+  - script: configure
+envs:
+  - name: KN_CLI
+    value: /usr/local/bin/kn-workflow
+  - name: GEN_MANIFESTS
+    value: false

Review Comment:
   I think we can add the kn-workflow to the `artifacts` section here and cache 
two versions of the plugin: arm and x86. Then in the `configure` script we pick 
the right one based on the image being built. This way we avoid downloading in 
every cekit run: 
https://docs.cekit.io/en/latest/handbook/caching.html#automatic-caching



##########
modules/kogito-workflow-manifests/install.sh:
##########
@@ -0,0 +1,29 @@
+#!/usr/bin/env bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#
+set -x
+
+SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+ADDED_DIR="${SCRIPT_DIR}"/added
+LAUNCH_DIR="${KOGITO_HOME}"/launch
+KN_HOME=/usr/local/bin
+curl -L 
https://github.com/rgolangh/kie-tools/releases/download/0.0.2/kn-workflow-linux-amd64
 -o "${KN_HOME}"/kn-workflow
+chmod +x-w "${KN_HOME}"/kn-workflow
+cp "${ADDED_DIR}"/generate-manifests.sh "${LAUNCH_DIR}"

Review Comment:
   I think you can get rid of this script and do everything in `configure`. It 
seems like we are downloading the cli twice.



##########
modules/kogito-workflow-manifests/configure:
##########
@@ -0,0 +1,31 @@
+#!/usr/bin/env bash 
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#
+set -x
+
+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

Review Comment:
   Can we use the official repo and `uname` to identify the OS and arch in this 
URL?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to