Skip to content

Commit ecebc53

Browse files
authored
Update version during release for all project modules (#1348)
Fixes the CI build. As the project structure changed and the bom module does not have the datamanager module as a parent, we need to modify the version bumping. In addition to that the snapshots are now deployed when PRs against main are opened (ncluding hotfix prs so they can be tested before merging) distributionManagement is provided for the bom module as it is not inherited.
1 parent be45550 commit ecebc53

File tree

6 files changed

+33
-12
lines changed

6 files changed

+33
-12
lines changed

.github/workflows/build_package.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ on:
44
push:
55
branches:
66
- '**'
7-
pull_request:
8-
# The branches below must be a subset of the branches above
9-
branches: [ main, master ]
107

118
jobs:
129
package:
@@ -28,4 +25,4 @@ jobs:
2825
restore-keys: |
2926
${{ runner.os }}-maven-
3027
- name: Run mvn package
31-
run: VAADIN_OFFLINE_KEY=${{ secrets.VAADIN_SERVER_23_2 }} mvn -B package --file pom.xml
28+
run: mvn -B package --file pom.xml

.github/workflows/create-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
git config --global user.name "JohnnyQ5"
4646
4747
- name: Set version in Maven project
48-
run: mvn versions:set -DnewVersion=${{ github.event.inputs.versionTag }}
48+
run: mvn versions:set -DnewVersion=${{ github.event.inputs.versionTag }} -DprocessAllModules
4949

5050
- name: Build with Maven
5151
run: VAADIN_OFFLINE_KEY=${{ secrets.VAADIN_SERVER_23_2 }} mvn -B package -Pproduction -Dvaadin.force.production.build=true --file pom.xml
@@ -86,7 +86,7 @@ jobs:
8686
subject-path: "**/target/*.jar"
8787

8888
- name: Publish artefact to QBiC Nexus Repository
89-
run: VAADIN_OFFLINE_KEY=${{ secrets.VAADIN_SERVER_23_2 }} mvn --quiet --settings $GITHUB_WORKSPACE/.github.settings.xml -Pproduction -DskipTests -Dvaadin.force.production.build=true deploy
89+
run: mvn --quiet --settings $GITHUB_WORKSPACE/.github.settings.xml -Pproduction -DskipTests -Dvaadin.force.production.build=true deploy
9090
env:
9191
MAVEN_REPO_USERNAME: ${{ secrets.NEXUS_USERNAME }}
9292
MAVEN_REPO_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}

.github/workflows/nexus-publish-snapshots.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
push:
99
branches:
1010
- development
11+
pull_request:
12+
branches:
13+
- main
1114
permissions:
1215
id-token: write # This is required for requesting the JWT
1316
contents: read # This is required for actions/checkout
@@ -46,10 +49,10 @@ jobs:
4649
run: mvn versions:set -DremoveSnapshot
4750
# Set the SNAPSHOT for this build and deployment
4851
- name: Set version in Maven project
49-
run: mvn versions:set -DnewVersion='${project.version}-SNAPSHOT'
52+
run: mvn versions:set -DnewVersion='${project.version}-SNAPSHOT' -DprocessAllModules
5053

5154
- name: Build with Maven
52-
run: VAADIN_OFFLINE_KEY=${{ secrets.VAADIN_SERVER_23_2 }} mvn -B package -Pproduction -Dvaadin.force.production.build=true --file pom.xml
55+
run: mvn -B package -Pproduction -Dvaadin.force.production.build=true --file pom.xml
5356

5457
# Generate provenance (SLSA attestation) for all JARs
5558
- name: Generate SLSA build provenance
@@ -58,7 +61,7 @@ jobs:
5861
subject-path: "**/target/*.jar"
5962

6063
- name: Publish artefact to QBiC Nexus Repository
61-
run: VAADIN_OFFLINE_KEY=${{ secrets.VAADIN_SERVER_23_2 }} mvn --quiet --settings $GITHUB_WORKSPACE/.github.settings.xml -Pproduction -Dvaadin.force.production.build=true -DskipTests deploy
64+
run: mvn --quiet --settings $GITHUB_WORKSPACE/.github.settings.xml -Pproduction -Dvaadin.force.production.build=true -DskipTests deploy
6265
env:
6366
MAVEN_REPO_USERNAME: ${{ secrets.NEXUS_USERNAME }}
6467
MAVEN_REPO_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}

.github/workflows/run_tests.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ on:
44
push:
55
branches:
66
- '**'
7-
pull_request:
8-
# The branches below must be a subset of the branches above
9-
branches: [ main, master ]
107
permissions:
118
id-token: write # This is required for requesting the JWT
129
contents: read # This is required for actions/checkout

.github/workflows/sonarcloud.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,23 @@ on:
1010
branches:
1111
- development
1212
- main
13+
permissions:
14+
id-token: write # This is required for requesting the JWT
15+
contents: read # This is required for actions/checkout
1316
jobs:
1417
sonarcloud:
1518
runs-on: ubuntu-latest
1619

1720
steps:
1821
- name: Checkout repository
1922
uses: actions/checkout@v5
23+
- name: Debug OIDC (get a token)
24+
uses: actions/github-script@v7
25+
with:
26+
script: |
27+
const token = await core.getIDToken('sigstore'); // audience example
28+
core.setSecret(token);
29+
console.log('OIDC token acquired. Length:', token.length);
2030
- name: Set up JDK 21
2131
uses: actions/setup-java@v5
2232
with:

datamanager-bom/pom.xml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,20 @@
2121
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
2222
</properties>
2323

24+
<distributionManagement>
25+
<repository>
26+
<uniqueVersion>true</uniqueVersion>
27+
<id>nexus-releases</id>
28+
<name>QBiC Releases</name>
29+
<url>https://qbic-repo.qbic.uni-tuebingen.de/repository/maven-releases</url>
30+
</repository>
31+
<snapshotRepository>
32+
<uniqueVersion>false</uniqueVersion>
33+
<id>nexus-snapshots</id>
34+
<name>QBiC Snapshots</name>
35+
<url>https://qbic-repo.qbic.uni-tuebingen.de/repository/maven-snapshots</url>
36+
</snapshotRepository>
37+
</distributionManagement>
2438

2539
<dependencyManagement>
2640
<dependencies>

0 commit comments

Comments
 (0)