Skip to content

Commit

Permalink
Use released version of kn cli
Browse files Browse the repository at this point in the history
The released version of kn cli integrates several plugins in it,
including the kn-workflow plugin.

Signed-off-by: Moti Asayag <[email protected]>
  • Loading branch information
masayag committed Mar 24, 2024
1 parent 077be52 commit 9736a91
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,11 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: setup kn-workflow
run: curl -L https://github.com/rgolangh/kie-tools/releases/download/0.0.2/kn-workflow-linux-amd64 -o kn-workflow && chmod +x kn-workflow
run: |
KN_CLI_URL="https://mirror.openshift.com/pub/openshift-v4/clients/serverless/latest/kn-linux-amd64.tar.gz"
curl -L "$KN_CLI_URL" | tar -xz && chmod +x kn-linux-amd64 && mv kn-linux-amd64 kn
- name: kn-workflow
run: cd ${{ inputs.workflow_id }} && ../kn-workflow gen-manifest --namespace ""
run: cd ${{ inputs.workflow_id }} && ../kn workflow gen-manifest --namespace ""
- name: Remove dev profile
run: yq -i 'del(.metadata.annotations."sonataflow.org/profile")' ${{ inputs.workflow_id }}/manifests/01-sonataflow*.yaml
- name: Set container image ref in SonataFlow resource
Expand Down
11 changes: 5 additions & 6 deletions scripts/gen_manifests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,15 @@

WORKFLOW_ID=$1

if [ ! -f kn-workflow ]; then
if [ ! -f kn ]; then
echo "Installing kn-workflow CLI"
# TODO Update to released version
curl -L https://github.com/rgolangh/kie-tools/releases/download/0.0.2/kn-workflow-linux-amd64 -o kn-workflow
chmod +x kn-workflow
KN_CLI_URL="https://mirror.openshift.com/pub/openshift-v4/clients/serverless/latest/kn-linux-amd64.tar.gz"
curl -L "$KN_CLI_URL" | tar -xz && chmod +x kn-linux-amd64 && mv kn-linux-amd64 kn
else
echo "kn-workflow already available"
echo "kn cli already available"
fi

cd "${WORKFLOW_ID}" || exit
# TODO Update to use --skip-namespace when the following is released
# https://github.com/apache/incubator-kie-tools/pull/2136
../kn-workflow gen-manifest --namespace ""
../kn workflow gen-manifest --namespace ""

0 comments on commit 9736a91

Please sign in to comment.