Skip to content

Commit 1e0ea62

Browse files
authored
HDDS-15589. Let build-ratis workflow output all property override (#10531)
1 parent 2cece19 commit 1e0ea62

3 files changed

Lines changed: 21 additions & 29 deletions

File tree

.github/workflows/build-ratis.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ on:
5454
protobuf-version:
5555
description: "Protobuf Version"
5656
value: ${{ jobs.ratis-thirdparty.outputs.protobuf-version }}
57+
build-args:
58+
description: "Arguments for building with Ratis"
59+
value: ${{ jobs.summary.outputs.build-args }}
5760
env:
5861
MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3
5962
permissions: { }
@@ -126,19 +129,30 @@ jobs:
126129
echo "grpc=$(mvn help:evaluate -N -q -DforceStdout -Dscan=false -Dexpression=shaded.grpc.version)" >> $GITHUB_OUTPUT
127130
echo "netty=$(mvn help:evaluate -N -q -DforceStdout -Dscan=false -Dexpression=shaded.netty.version)" >> $GITHUB_OUTPUT
128131
echo "protobuf=$(mvn help:evaluate -N -q -DforceStdout -Dscan=false -Dexpression=shaded.protobuf.version)" >> $GITHUB_OUTPUT
129-
debug:
132+
summary:
130133
runs-on: ubuntu-slim
131134
needs:
132135
- ratis
133136
- ratis-thirdparty
137+
outputs:
138+
build-args: ${{ steps.versions.outputs.build-args }}
134139
steps:
135140
- name: Print versions
141+
id: versions
136142
run: |
143+
build_args="-Dratis.version=$ratis_version"
144+
build_args="$build_args -Dratis.thirdparty.version=$ratis_thirdparty_version"
145+
build_args="$build_args -Dratis-thirdparty.grpc.version=$grpc_version"
146+
build_args="$build_args -Dratis-thirdparty.netty.version=$netty_version"
147+
build_args="$build_args -Dratis-thirdparty.protobuf.version=$protobuf_version"
148+
echo "build-args=$build_args" >> "$GITHUB_OUTPUT"
149+
137150
echo "Ratis: $ratis_version"
138151
echo "Thirdparty: $ratis_thirdparty_version"
139152
echo "Grpc: $grpc_version"
140153
echo "Netty: $netty_version"
141154
echo "Protobuf: $protobuf_version"
155+
echo "Build args for Ozone: $build_args"
142156
env:
143157
ratis_version: ${{ needs.ratis.outputs.ratis-version }}
144158
ratis_thirdparty_version: ${{ needs.ratis.outputs.thirdparty-version }}

.github/workflows/ci-with-ratis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,5 @@ jobs:
5454
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
5555
SONARCLOUD_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }}
5656
with:
57-
ratis_args: "-Dratis.version=${{ needs.ratis.outputs.ratis-version }} -Dratis.thirdparty.version=${{ needs.ratis.outputs.thirdparty-version }} -Dratis-thirdparty.grpc.version=${{ needs.ratis.outputs.grpc-version }} -Dratis-thirdparty.netty.version=${{ needs.ratis.outputs.netty-version }} -Dratis-thirdparty.protobuf.version=${{ needs.ratis.outputs.protobuf-version }}"
57+
ratis_args: ${{ needs.ratis.outputs.build-args }}
5858
ref: ${{ github.event.inputs.ref }}

.github/workflows/intermittent-test-check.yml

Lines changed: 5 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -135,23 +135,12 @@ jobs:
135135
- name: Build (most) of Ozone
136136
run: |
137137
args="-DskipRecon -DskipShade -Dmaven.javadoc.skip=true -Drocks_tools_native"
138-
if [[ "$RATIS_VERSION" != "" ]]; then
139-
args="$args -Dratis.version=$ratis_version"
140-
args="$args -Dratis.thirdparty.version=$ratis_thirdparty_version"
141-
args="$args -Dratis-thirdparty.grpc.version=$grpc_version"
142-
args="$args -Dratis-thirdparty.netty.version=$netty_version"
143-
args="$args -Dratis-thirdparty.protobuf.version=$protobuf_version"
144-
fi
145-
138+
args="$args $ratis_args"
146139
args="$args -am -pl :$SUBMODULE"
147140
148141
hadoop-ozone/dev-support/checks/build.sh $args
149142
env:
150-
ratis_version: ${{ needs.ratis.outputs.ratis-version }}
151-
ratis_thirdparty_version: ${{ needs.ratis.outputs.thirdparty-version }}
152-
grpc_version: ${{ needs.ratis.outputs.grpc-version }}
153-
netty_version: ${{ needs.ratis.outputs.netty-version }}
154-
protobuf_version: ${{ needs.ratis.outputs.protobuf-version }}
143+
ratis_args: ${{ needs.ratis.outputs.build-args }}
155144
- name: Store Maven repo for tests
156145
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
157146
with:
@@ -212,14 +201,7 @@ jobs:
212201
fi
213202
214203
args="-DexcludedGroups=slow|unhealthy -DskipShade -Drocks_tools_native"
215-
if [[ "$RATIS_VERSION" != "" ]]; then
216-
args="$args -Dratis.version=$ratis_version"
217-
args="$args -Dratis.thirdparty.version=$ratis_thirdparty_version"
218-
args="$args -Dratis-thirdparty.grpc.version=$grpc_version"
219-
args="$args -Dratis-thirdparty.netty.version=$netty_version"
220-
args="$args -Dratis-thirdparty.protobuf.version=$protobuf_version"
221-
fi
222-
204+
args="$args $ratis_args"
223205
args="$args -pl :$SUBMODULE"
224206
225207
if [ "$TEST_METHOD" = "ALL" ]; then
@@ -235,14 +217,10 @@ jobs:
235217
env:
236218
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
237219
repo_path: ${{ steps.download-ozone-repo.outputs.download-path }}
238-
ratis_version: ${{ needs.ratis.outputs.ratis-version }}
239-
ratis_thirdparty_version: ${{ needs.ratis.outputs.thirdparty-version }}
240-
grpc_version: ${{ needs.ratis.outputs.grpc-version }}
241-
netty_version: ${{ needs.ratis.outputs.netty-version }}
242-
protobuf_version: ${{ needs.ratis.outputs.protobuf-version }}
220+
ratis_args: ${{ needs.ratis.outputs.build-args }}
243221
- name: Summary of failures
244222
run: hadoop-ozone/dev-support/checks/_summary.sh target/unit/summary.txt
245-
if: ${{ !cancelled() }}
223+
if: ${{ failure() }}
246224
- name: Archive build results
247225
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
248226
if: ${{ failure() }}

0 commit comments

Comments
 (0)