Skip to content

Commit 37a7b23

Browse files
authored
CI pipeline improvements (#1977)
* Rewrite CI: * Use versioned Maven Wrapper instead of Maven provided by Ubuntu * Split Branch/Tag CI job from publishing. * Disable publishing examples and benchmark projects. * Rewrite CI: * Use versioned Maven Wrapper instead of Maven provided by Ubuntu * Split Branch/Tag CI job from publishing. * Disable publishing examples and benchmark projects. * Rewrite CI: * Use versioned Maven Wrapper instead of Maven provided by Ubuntu * Split Branch/Tag CI job from publishing. * Disable publishing examples and benchmark projects. * Rewrite CI: * Use versioned Maven Wrapper instead of Maven provided by Ubuntu * Split Branch/Tag CI job from publishing. * Disable publishing examples and benchmark projects.
1 parent e189932 commit 37a7b23

12 files changed

Lines changed: 164 additions & 84 deletions

File tree

.github/workflows/benchmark.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,24 @@ jobs:
1010
runs-on: ubuntu-latest-16-cores
1111
steps:
1212
- uses: actions/checkout@v6
13+
1314
- uses: actions/setup-node@v6
1415
with:
1516
node-version: "20.x"
17+
1618
- name: Set up JDK 1.17
1719
uses: actions/setup-java@v5
1820
with:
1921
java-version: 17
2022
java-package: jdk
2123
distribution: temurin
2224
cache: 'maven'
25+
26+
- name: Make mvnw executable
27+
run: chmod +x mvnw
28+
2329
- name: Install Modules
24-
run: mvn -B install --file pom.xml
30+
run: ./mvnw -B -ntp install --file pom.xml
31+
2532
- name: Run Microbenchmarks
26-
run: mvn exec:exec -pl benchmark
33+
run: ./mvnw exec:exec -pl benchmark
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Create release branch and tag
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
releaseVersion:
7+
description: "Default version to use when preparing a release."
8+
required: true
9+
default: "X.Y"
10+
developmentVersion:
11+
description: "Default version to use for new local working copy."
12+
required: true
13+
default: "X.Y-SNAPSHOT"
14+
15+
env:
16+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17+
RELEASE_VERSION: ${{ github.event.inputs.releaseVersion }}
18+
DEVELOPMENT_VERSION: ${{ github.event.inputs.developmentVersion }}
19+
20+
jobs:
21+
build:
22+
runs-on: ubuntu-latest
23+
24+
steps:
25+
- name: Checkout source
26+
uses: actions/checkout@v6
27+
28+
- name: Switch git branch
29+
run: git switch -c release-${{ env.RELEASE_VERSION }}
30+
31+
- name: Install Node
32+
uses: actions/setup-node@v6
33+
with:
34+
node-version: "20.x"
35+
36+
- name: Set up JDK
37+
uses: actions/setup-java@v5
38+
with:
39+
java-version: 17
40+
java-package: jdk
41+
distribution: temurin
42+
cache: 'maven'
43+
44+
- name: Configure git
45+
run: |
46+
git config committer.email "infra@finos.org"
47+
git config committer.name "FINOS Admin"
48+
git config author.email "${GITHUB_ACTOR}@users.noreply.github.com"
49+
git config author.name "${GITHUB_ACTOR}"
50+
51+
- name: Make mvnw executable
52+
run: chmod +x mvnw
53+
54+
- name: Prepare and perform maven release
55+
run: ./mvnw -B -ntp release:prepare release:perform -DreleaseVersion=${{ env.RELEASE_VERSION }} -DdevelopmentVersion=${{ env.DEVELOPMENT_VERSION }}
56+

.github/workflows/cve-scanning.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,11 @@ jobs:
2020
- name: Checkout
2121
uses: actions/checkout@v6
2222

23+
- name: Make mvnw executable
24+
run: chmod +x mvnw
25+
2326
- name: Build project with Maven
24-
run: mvn clean install -DskipTests
27+
run: ./mvnw -B -ntp clean install -DskipTests
2528

2629
- name: Run OWASP Dependency-Check on Maven subprojects
2730
if: ${{ env.OSS_INDEX_USERNAME != '' && env.OSS_INDEX_API_KEY != '' }}

.github/workflows/legal-report.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,14 @@ jobs:
3131
sudo apt-get update
3232
sudo apt-get install xq
3333
34+
- name: Make mvnw executable
35+
run: chmod +x mvnw
36+
3437
- name: Maven build
35-
run: mvn clean install -pl ${{ matrix.package-folder }} -am -DskipTests
38+
run: ./mvnw -B -ntp clean install -pl ${{ matrix.package-folder }} -am -DskipTests
3639

3740
- name: License XML report
38-
run: mvn org.codehaus.mojo:license-maven-plugin:2.0.0:download-licenses
41+
run: ./mvnw -B -ntp org.codehaus.mojo:license-maven-plugin:download-licenses
3942
working-directory: ${{ matrix.package-folder }}
4043

4144
- name: Validate XML report
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Publish to MVN Central
2+
3+
env:
4+
CI_DEPLOY_USERNAME: ${{ secrets.CI_DEPLOY_USERNAME }}
5+
CI_DEPLOY_PASSWORD: ${{ secrets.CI_DEPLOY_PASSWORD }}
6+
CI_GPG_PASSPHRASE: ${{ secrets.CI_GPG_PASSPHRASE }}
7+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8+
9+
on:
10+
push:
11+
tags:
12+
- "vuu-parent-*.*.*" # e.g. vuu-parent-0.9.109
13+
14+
jobs:
15+
build:
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- name: Checkout source
20+
uses: actions/checkout@v6
21+
22+
- name: Install Node
23+
uses: actions/setup-node@v6
24+
with:
25+
node-version: "20.x"
26+
27+
- name: Set up JDK
28+
uses: actions/setup-java@v5
29+
with:
30+
java-version: 17
31+
java-package: jdk
32+
distribution: temurin
33+
cache: 'maven'
34+
server-id: ossrh
35+
server-username: CI_DEPLOY_USERNAME
36+
server-password: CI_DEPLOY_PASSWORD
37+
gpg-private-key: ${{ secrets.CI_GPG_PRIVATE_KEY }}
38+
gpg-passphrase: CI_GPG_PASSPHRASE
39+
40+
- name: Make mvnw executable
41+
run: chmod +x mvnw
42+
43+
- name: Build and Publish with Maven
44+
run: ./mvnw -B -ntp clean install -Dskiptests -P sign-it -Dsign=true org.sonatype.central:central-publishing-maven-plugin:publish
45+

.github/workflows/release-mvn-central.yml

Lines changed: 0 additions & 66 deletions
This file was deleted.
Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,16 @@ jobs:
2121
distribution: temurin
2222
cache: 'maven'
2323

24+
- name: Make mvnw executable
25+
run: chmod +x mvnw
26+
2427
- name: Build with Maven
25-
run: mvn -B test --file pom.xml
28+
run: ./mvnw -B -ntp verify
29+
30+
- name: Publish test results
31+
if: always()
32+
uses: EnricoMi/publish-unit-test-result-action@v2
33+
with:
34+
files: |
35+
**/target/surefire-reports/*.xml
36+
**/target/failsafe-reports/*.xml

.semgrepignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
.github/workflows/release-mvn-central.yml
21
vuu/src/main/resources/certs/key.pem
32
example/main/src/main/resources/certs/key.pem
43
example/main/src/main/resources/certs/cert.pem

benchmark/pom.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,18 @@
4242
<sourceDirectory>src/main/java</sourceDirectory>
4343
<testSourceDirectory>src/test/java</testSourceDirectory>
4444

45+
<pluginManagement>
46+
<plugins>
47+
<plugin>
48+
<groupId>org.sonatype.central</groupId>
49+
<artifactId>central-publishing-maven-plugin</artifactId>
50+
<configuration>
51+
<skipPublishing>true</skipPublishing>
52+
</configuration>
53+
</plugin>
54+
</plugins>
55+
</pluginManagement>
56+
4557
<plugins>
4658

4759
<plugin>

example/pom.xml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,18 @@
2525
<module>rest-api</module>
2626
</modules>
2727

28+
<build>
29+
<pluginManagement>
30+
<plugins>
31+
<plugin>
32+
<groupId>org.sonatype.central</groupId>
33+
<artifactId>central-publishing-maven-plugin</artifactId>
34+
<configuration>
35+
<skipPublishing>true</skipPublishing>
36+
</configuration>
37+
</plugin>
38+
</plugins>
39+
</pluginManagement>
40+
</build>
41+
2842
</project>

0 commit comments

Comments
 (0)