You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by nf...@apache.org on 2023/10/31 18:04:48 UTC

(camel) 01/01: (chore) ci: convert component-test parameters to env vars

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

nfilotto pushed a commit to branch fix-component-test-ga
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 02e512ae1ab0a471e80d86096ea79b45789aa105
Author: Nicolas Filotto <nf...@talend.com>
AuthorDate: Tue Oct 31 18:51:21 2023 +0100

    (chore) ci: convert component-test parameters to env vars
---
 .github/actions/component-test/action.yaml       | 14 ++++++++++++--
 .github/actions/component-test/component-test.sh |  8 ++++----
 2 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/.github/actions/component-test/action.yaml b/.github/actions/component-test/action.yaml
index 2d7737a038c..0f63f351a30 100644
--- a/.github/actions/component-test/action.yaml
+++ b/.github/actions/component-test/action.yaml
@@ -40,7 +40,12 @@ runs:
       uses: ./.github/actions/install-mvnd
     - name: maven build
       shell: bash
-      run: ${{ github.action_path }}/component-test.sh ${{ steps.install-mvnd.outputs.mvnd-dir }}/mvnd "${{ inputs.comment-body }}" true build.log
+      run: ${{ github.action_path }}/component-test.sh
+      env:
+        MAVEN_BINARY: ${{ steps.install-mvnd.outputs.mvnd-dir }}/mvnd
+        COMMENT_BODY: ${{ inputs.comment-body }}
+        FAST_BUILD: "true"
+        LOG_FILE: build.log
     - name: archive logs
       uses: actions/upload-artifact@v3
       if: always()
@@ -49,7 +54,12 @@ runs:
         path: build.log
     - name: maven test
       shell: bash
-      run: ${{ github.action_path }}/component-test.sh ${{ steps.install-mvnd.outputs.mvnd-dir }}/mvnd "${{ inputs.comment-body }}" false tests.log
+      run: ${{ github.action_path }}/component-test.sh
+      env:
+        MAVEN_BINARY: ${{ steps.install-mvnd.outputs.mvnd-dir }}/mvnd
+        COMMENT_BODY: ${{ inputs.comment-body }}
+        FAST_BUILD: "false"
+        LOG_FILE: build.log
     - name: archive logs
       uses: actions/upload-artifact@v3
       if: always()
diff --git a/.github/actions/component-test/component-test.sh b/.github/actions/component-test/component-test.sh
index 282b06a1a84..58f5d5f1f62 100755
--- a/.github/actions/component-test/component-test.sh
+++ b/.github/actions/component-test/component-test.sh
@@ -18,10 +18,10 @@
 echo "Using MVND_OPTS=$MVND_OPTS"
 
 function main() {
-  local mavenBinary=${1}
-  local commentBody=${2}
-  local fastBuild=${3}
-  local log=${4}
+  local mavenBinary=$MAVEN_BINARY
+  local commentBody=$COMMENT_BODY
+  local fastBuild=$FAST_BUILD
+  local log=$LOG_FILE
 
   if [[ ${commentBody} = /component-test* ]] ; then
     local componentList="${commentBody:16}"