Skip to content

Commit cb06df3

Browse files
committed
[Build] Unify options into MAVEN_ARGS variable in shared GH workflows
Define common Maven options in 'MAVEN_ARGS' environment variable to avoid repetitions.
1 parent 21df76d commit cb06df3

File tree

4 files changed

+22
-20
lines changed

4 files changed

+22
-20
lines changed

.github/actions/install-maven-parent-action/action.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
name: 'Install Maven parent and SDK target'
22
description: 'Install the eclipse-parent pom.xml and Eclipse SDK target-platform into the local Maven cache in order to avoid the need for EF-infrastructure (which is currently unavailable).'
3-
inputs:
4-
tycho-version:
5-
description: 'The tycho release to use.'
6-
required: true
3+
74
runs:
85
using: "composite"
96
steps:
@@ -20,10 +17,10 @@ runs:
2017
shell: bash
2118
run: |
2219
cd eclipse-platform-parent
23-
mvn clean install -B -ntp -Dtycho.version=${{ inputs.tycho-version }}
20+
mvn clean install
2421
cd ..
2522
cd eclipse.platform.releng.prereqs.sdk
26-
mvn clean install -B -ntp -Dtycho.version=${{ inputs.tycho-version }}
23+
mvn clean install
2724
- name: Remove eclipse.platform.releng.aggregator
2825
shell: bash
2926
run: 'rm -rf eclipse.platform.releng.aggregator'

.github/workflows/checkVersions.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ on:
3434

3535
permissions: {} # all none
3636

37+
env:
38+
MAVEN_ARGS: >-
39+
--batch-mode --no-transfer-progress
40+
${{ inputs.without-EF-infra && '-Dtycho.version=4.0.12' || '' }}
41+
3742
jobs:
3843
versions-check-and-increment:
3944
name: Check and increment service versions
@@ -59,8 +64,6 @@ jobs:
5964
- name: Install Maven parent locally
6065
uses: eclipse-platform/eclipse.platform.releng.aggregator/.github/actions/install-maven-parent-action@master
6166
if : inputs.without-EF-infra
62-
with:
63-
tycho-version: 4.0.12
6467

6568
- name: Additional setup
6669
if: inputs.extra-setup-command
@@ -76,8 +79,7 @@ jobs:
7679
command: >
7780
mvn verify ${{ inputs.extra-maven-args }} -DskipTests -Dcompare-version-with-baselines.skip=false
7881
org.eclipse.tycho:tycho-versions-plugin:bump-versions -Dtycho.bump-versions.increment=100
79-
--threads 1C --fail-at-end --batch-mode --no-transfer-progress --show-version
80-
${{ inputs.without-EF-infra && '-Dtycho.version=4.0.12' || '' }}
82+
--threads 1C --fail-at-end --show-version
8183
8284
- name: Commit version increments, if any
8385
run: |
@@ -91,8 +93,7 @@ jobs:
9193
9294
# Read 'releaseNumberSDK' property as stream version
9395
pushd ${{ inputs.working-directory }}
94-
mvn help:evaluate -Dexpression=releaseNumberSDK ${{ inputs.extra-maven-args }} --quiet '-Doutput=releaseNumberSDK-value.txt' \
95-
${{ inputs.without-EF-infra && '-Dtycho.version=4.0.12' || '' }}
96+
mvn help:evaluate -Dexpression=releaseNumberSDK ${{ inputs.extra-maven-args }} --quiet '-Doutput=releaseNumberSDK-value.txt'
9697
streamVersion=$(<releaseNumberSDK-value.txt)
9798
rm -f releaseNumberSDK-value.txt
9899
popd

.github/workflows/codeQLworkflow.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ on:
2626
required: false
2727
default: true
2828

29+
env:
30+
MAVEN_ARGS: >-
31+
--batch-mode --no-transfer-progress
32+
${{ inputs.without-EF-infra && '-Dtycho.version=4.0.12' || '' }}
33+
2934
jobs:
3035
analyze:
3136
name: Analyze
@@ -86,14 +91,11 @@ jobs:
8691
- name: Install Maven parent locally
8792
uses: eclipse-platform/eclipse.platform.releng.aggregator/.github/actions/install-maven-parent-action@master
8893
if : inputs.without-EF-infra
89-
with:
90-
tycho-version: 4.0.12
9194

9295
- name: Build with Maven
9396
run: >-
9497
${{ runner.os == 'Linux' && 'xvfb-run' || '' }}
95-
mvn --batch-mode --no-transfer-progress --show-version --update-snapshots --errors
96-
${{ inputs.without-EF-infra && '-Dtycho.version=4.0.12' || '' }}
98+
mvn --show-version --update-snapshots --errors
9799
-Dcompare-version-with-baselines.skip=true
98100
-Pbree-libs
99101
-DskipTests=true

.github/workflows/mavenBuild.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ on:
2828

2929
permissions: {}
3030

31+
env:
32+
MAVEN_ARGS: >-
33+
--batch-mode --no-transfer-progress
34+
${{ inputs.without-EF-infra && '-Dtycho.version=4.0.12' || '' }}
35+
3136
jobs:
3237
event_file:
3338
name: "Upload Event File"
@@ -81,14 +86,11 @@ jobs:
8186
- name: Install Maven parent locally
8287
uses: eclipse-platform/eclipse.platform.releng.aggregator/.github/actions/install-maven-parent-action@master
8388
if : inputs.without-EF-infra
84-
with:
85-
tycho-version: 4.0.12
8689

8790
- name: Build with Maven
8891
run: >-
8992
${{ runner.os == 'Linux' && 'xvfb-run' || '' }}
90-
mvn --batch-mode --no-transfer-progress --show-version --update-snapshots --errors
91-
${{ inputs.without-EF-infra && '-Dtycho.version=4.0.12' || '' }}
93+
mvn --show-version --update-snapshots --errors
9294
-Dcompare-version-with-baselines.skip=false
9395
-Pbree-libs
9496
-Papi-check

0 commit comments

Comments
 (0)