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

adoroszlai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git


The following commit(s) were added to refs/heads/master by this push:
     new 03cc8fa8630 HDDS-14171. Use workflow inputs in run command via 
environment variable (#9498)
03cc8fa8630 is described below

commit 03cc8fa863019aaf4b449e10b76ac2af0da7a97e
Author: Doroszlai, Attila <[email protected]>
AuthorDate: Tue Dec 16 11:11:23 2025 +0100

    HDDS-14171. Use workflow inputs in run command via environment variable 
(#9498)
---
 .github/workflows/check.yml                   | 22 +++++++++++++++-------
 .github/workflows/intermittent-test-check.yml | 14 ++++++++------
 .github/workflows/repeat-acceptance.yml       |  3 ++-
 3 files changed, 25 insertions(+), 14 deletions(-)

diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml
index a94508b7c6c..edd64fe69a3 100644
--- a/.github/workflows/check.yml
+++ b/.github/workflows/check.yml
@@ -136,6 +136,7 @@ env:
   OZONE_IMAGE: ghcr.io/apache/ozone
   OZONE_RUNNER_IMAGE: ghcr.io/apache/ozone-runner
   OZONE_VOLUME_OWNER: 1000
+  SCRIPT: ${{ inputs.script }}
 
 jobs:
   check:
@@ -222,32 +223,39 @@ jobs:
       - name: Execute pre-test steps
         if: ${{ inputs.pre-script }}
         run: |
-          ${{ inputs.pre-script }}
+          $COMMAND
+        env:
+          COMMAND: ${{ inputs.pre-script }}
 
       - name: Execute tests
         run: |
-          hadoop-ozone/dev-support/checks/${{ inputs.script }}.sh ${{ 
inputs.script-args }} ${{ inputs.ratis-args }}
+          $COMMAND
         env:
+          COMMAND: hadoop-ozone/dev-support/checks/${{ inputs.script }}.sh ${{ 
inputs.script-args }} ${{ inputs.ratis-args }}
           DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
           OZONE_WITH_COVERAGE: ${{ inputs.with-coverage }}
 
       - name: Execute post-failure steps
         if: ${{ failure() && inputs.post-failure }}
         run: |
-          ${{ inputs.post-failure }}
+          $COMMAND
+        env:
+          COMMAND: ${{ inputs.post-failure }}
 
       - name: Execute post-success steps
         if: ${{ !failure() && inputs.post-success }}
         run: |
-          ${{ inputs.post-success }}
+          $COMMAND
+        env:
+          COMMAND: ${{ inputs.post-success }}
 
       - name: Summary of failures
         if: ${{ failure() }}
         run: |
-          if [[ -s "target/${{ inputs.script }}/summary.md" ]]; then
-            cat target/${{ inputs.script }}/summary.md >> $GITHUB_STEP_SUMMARY
+          if [[ -s "target/$SCRIPT/summary.md" ]]; then
+            cat target/$SCRIPT/summary.md >> $GITHUB_STEP_SUMMARY
           fi
-          hadoop-ozone/dev-support/checks/_summary.sh target/${{ inputs.script 
}}/summary.txt
+          hadoop-ozone/dev-support/checks/_summary.sh 
target/$SCRIPT/summary.txt
 
       - name: Archive build results
         if: ${{ !cancelled() }}
diff --git a/.github/workflows/intermittent-test-check.yml 
b/.github/workflows/intermittent-test-check.yml
index cb86abffecc..bf03d29d57f 100644
--- a/.github/workflows/intermittent-test-check.yml
+++ b/.github/workflows/intermittent-test-check.yml
@@ -65,6 +65,8 @@ env:
   RATIS_REPO: ${{ github.event.inputs.ratis-repo }}
   RATIS_VERSION: ${{ github.event.inputs.ratis-ref }}
   JAVA_VERSION: ${{ github.event.inputs.java-version }}
+  SPLITS: ${{ github.event.inputs.splits }}
+  SUBMODULE: ${{ github.event.inputs.submodule }}
   # Surefire 3.0.0-M4 is used because newer versions do not reliably kill the 
fork on timeout
   # SUREFIRE-1722, SUREFIRE-1815
   SUREFIRE_VERSION: 3.0.0-M4
@@ -82,7 +84,7 @@ jobs:
         name: Generate test matrix
         run: |
           splits=()
-          for ((i = 1; i <= ${{ github.event.inputs.splits }}; i++)); do
+          for ((i = 1; i <= $SPLITS; i++)); do
             splits+=("$i")
           done
           printf -v x "%s," "${splits[@]}"
@@ -130,7 +132,7 @@ jobs:
       - name: Build (most) of Ozone
         run: |
           args="-DskipRecon -DskipShade -Dmaven.javadoc.skip=true 
-Drocks_tools_native"
-          if [[ "${{ github.event.inputs.ratis-ref }}" != "" ]]; then
+          if [[ "$RATIS_VERSION" != "" ]]; then
             args="$args -Dratis.version=${{ needs.ratis.outputs.ratis-version 
}}"
             args="$args -Dratis.thirdparty.version=${{ 
needs.ratis.outputs.thirdparty-version }}"
             args="$args -Dio.grpc.version=${{ needs.ratis.outputs.grpc-version 
}}"
@@ -138,7 +140,7 @@ jobs:
             args="$args -Dgrpc.protobuf-compile.version=${{ 
needs.ratis.outputs.protobuf-version }}"
           fi
 
-          args="$args -am -pl :${{ github.event.inputs.submodule }}"
+          args="$args -am -pl :$SUBMODULE"
 
           hadoop-ozone/dev-support/checks/build.sh $args
       - name: Store Maven repo for tests
@@ -199,8 +201,8 @@ jobs:
             export OZONE_REPO_CACHED=true
           fi
 
-          args="-DexcludedGroups=native|slow|unhealthy -DskipShade 
-Drocks_tools_native"
-          if [[ "${{ github.event.inputs.ratis-ref }}" != "" ]]; then
+          args="-DexcludedGroups=slow|unhealthy -DskipShade 
-Drocks_tools_native"
+          if [[ "$RATIS_VERSION" != "" ]]; then
             args="$args -Dratis.version=${{ needs.ratis.outputs.ratis-version 
}}"
             args="$args -Dratis.thirdparty.version=${{ 
needs.ratis.outputs.thirdparty-version }}"
             args="$args -Dio.grpc.version=${{ needs.ratis.outputs.grpc-version 
}}"
@@ -208,7 +210,7 @@ jobs:
             args="$args -Dgrpc.protobuf-compile.version=${{ 
needs.ratis.outputs.protobuf-version }}"
           fi
 
-          args="$args -pl :${{ github.event.inputs.submodule }}"
+          args="$args -pl :$SUBMODULE"
 
           if [ "$TEST_METHOD" = "ALL" ]; then
             echo "Running all tests from $TEST_CLASS"
diff --git a/.github/workflows/repeat-acceptance.yml 
b/.github/workflows/repeat-acceptance.yml
index 252e93518cc..8640f9fd94b 100644
--- a/.github/workflows/repeat-acceptance.yml
+++ b/.github/workflows/repeat-acceptance.yml
@@ -48,6 +48,7 @@ env:
   OZONE_TEST_SELECTOR: ${{ github.event.inputs.test-filter }}
   FAIL_FAST: ${{ github.event.inputs.fail-fast }}
   JAVA_VERSION: 8
+  SPLITS: ${{ github.event.inputs.splits }}
 run-name: ${{ github.event_name == 'workflow_dispatch' && 
format('{0}[{1}]-{2}', inputs.test-suite || inputs.test-filter, inputs.ref, 
inputs.splits) || '' }}
 jobs:
   prepare-job:
@@ -67,7 +68,7 @@ jobs:
         name: Generate test matrix
         run: |
           splits=()
-          for ((i = 1; i <= ${{ github.event.inputs.splits }}; i++)); do
+          for ((i = 1; i <= $SPLITS; i++)); do
               splits+=("$i")
           done
           printf -v x "%s," "${splits[@]}"


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

Reply via email to