You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by pc...@apache.org on 2022/03/01 14:34:56 UTC

[camel-k] 17/18: fix(ci): Fix YAKS installation

This is an automated email from the ASF dual-hosted git repository.

pcongiusti pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k.git

commit 2d0a3688f1db18a3ee6c51ce406f00b6f43d192e
Author: Christoph Deppisch <cd...@redhat.com>
AuthorDate: Tue Feb 15 16:34:29 2022 +0100

    fix(ci): Fix YAKS installation
    
    Make sure to use proper image name and version on YAKS install command especially when using pinned pre-release versions.
---
 .github/actions/e2e-knative-yaks/action.yml    |  9 ++++++---
 .github/actions/e2e-knative-yaks/exec-tests.sh |  3 ---
 .github/actions/kamel-install-yaks/action.yml  | 22 +++++++++++++++++++---
 3 files changed, 25 insertions(+), 9 deletions(-)

diff --git a/.github/actions/e2e-knative-yaks/action.yml b/.github/actions/e2e-knative-yaks/action.yml
index 2659747..bd1620a 100644
--- a/.github/actions/e2e-knative-yaks/action.yml
+++ b/.github/actions/e2e-knative-yaks/action.yml
@@ -42,9 +42,6 @@ runs:
       cluster-config-data: ${{ inputs.cluster-config-data }}
       cluster-kube-config-data: ${{ inputs.cluster-kube-config-data }}
 
-  - name: Install YAKS
-    uses: ./.github/actions/kamel-install-yaks
-
   - name: Install Knative
     uses: ./.github/actions/kamel-install-knative
 
@@ -77,6 +74,12 @@ runs:
       image-registry-insecure: ${{steps.config-cluster.outputs.cluster-image-registry-insecure }}
       image-version: ${{ steps.build-kamel.outputs.build-binary-local-image-version }}
 
+  - name: Install YAKS
+    uses: ./.github/actions/kamel-install-yaks
+    with:
+      image-name: "docker.io/yaks/yaks"
+      version: 0.9.0-202202081449
+
   - id: report-problematic
     name: List Tests Marked As Problematic
     uses: ./.github/actions/kamel-report-problematic
diff --git a/.github/actions/e2e-knative-yaks/exec-tests.sh b/.github/actions/e2e-knative-yaks/exec-tests.sh
index 428018a..a5d38ae 100755
--- a/.github/actions/e2e-knative-yaks/exec-tests.sh
+++ b/.github/actions/e2e-knative-yaks/exec-tests.sh
@@ -111,8 +111,5 @@ export CAMEL_K_TEST_IMAGE_NAME=${CUSTOM_IMAGE}
 export CAMEL_K_TEST_IMAGE_VERSION=${CUSTOM_VERSION}
 export CAMEL_K_TEST_SAVE_FAILED_TEST_NAMESPACE=${SAVE_FAILED_TEST_NS}
 
-# Install Yaks globally
-yaks install
-
 # Then run integration tests
 yaks test e2e/yaks/common
diff --git a/.github/actions/kamel-install-yaks/action.yml b/.github/actions/kamel-install-yaks/action.yml
index e41cb81..2c15900 100644
--- a/.github/actions/kamel-install-yaks/action.yml
+++ b/.github/actions/kamel-install-yaks/action.yml
@@ -17,6 +17,17 @@
 
 name: kamel-install-yaks
 description: 'Install YAKS artifacts'
+
+inputs:
+  version:
+    description: "The YAKS version"
+    default: 0.8.0
+    required: false
+  image-name:
+    description: "The YAKS operator image name"
+    default: "docker.io/citrusframework/yaks"
+    required: false
+
 runs:
   using: "composite"
   steps:
@@ -24,12 +35,17 @@ runs:
       name: Get YAKS
       shell: bash
       run: |
-        export YAKS_VERSION=0.9.0-202202081449
-        curl --fail -L https://github.com/citrusframework/yaks/releases/download/${YAKS_VERSION}/yaks-${YAKS_VERSION}-linux-64bit.tar.gz -o yaks.tar.gz
+        if [ "${{ inputs.image-name }}" == "docker.io/yaks/yaks" ]; then
+            export DOWNLOAD_VERSION=${{ inputs.version }}
+        else
+            export DOWNLOAD_VERSION=v${{ inputs.version }}
+        fi
+
+        curl --fail -L https://github.com/citrusframework/yaks/releases/download/${DOWNLOAD_VERSION}/yaks-${{ inputs.version }}-linux-64bit.tar.gz -o yaks.tar.gz
         tar -zxf yaks.tar.gz
         sudo mv yaks /usr/local/bin/
 
     - name: Install YAKS
       shell: bash
       run: |
-        yaks install --cluster-setup
+        yaks install --operator-image ${{ inputs.image-name }}:${{ inputs.version }}