Skip to content

Commit 57921a6

Browse files
committed
move to central - 01
1 parent 3052f04 commit 57921a6

File tree

7 files changed

+215
-257
lines changed

7 files changed

+215
-257
lines changed

.github/workflows/build.yaml

Lines changed: 30 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
#
2-
# Copyright © 2018 - Frank Hossfeld
2+
# Copyright © 2023 Frank Hossfeld, Philipp Kohl
33
#
4-
# Licensed under the Apache License, Version 2.0 (the "License");
5-
# you may not use this file except in compliance with the License.
6-
# You may obtain a copy of the License at
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
77
#
8-
# http://www.apache.org/licenses/LICENSE-2.0
8+
# http://www.apache.org/licenses/LICENSE-2.0
99
#
10-
# Unless required by applicable law or agreed to in writing, software
11-
# distributed under the License is distributed on an "AS IS" BASIS,
12-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
# See the License for the specific language governing permissions and
14-
# limitations under the License.
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
1515
#
16+
1617
name: Build & Deploy
1718

1819
on:
@@ -23,7 +24,7 @@ on:
2324
paths-ignore:
2425
- "README.md"
2526
jobs:
26-
build-jdk11:
27+
build:
2728
runs-on: ubuntu-latest
2829
steps:
2930
- uses: actions/checkout@v4
@@ -33,52 +34,11 @@ jobs:
3334
java-version: '11'
3435
cache: maven
3536
- name: Compile with Maven
36-
run: mvn compile -ntp
37-
build-jdk17:
38-
runs-on: ubuntu-latest
39-
steps:
40-
- uses: actions/checkout@v4
41-
- uses: actions/setup-java@v4
42-
with:
43-
distribution: temurin
44-
java-version: '17'
45-
cache: maven
46-
- name: Compile with Maven
47-
run: mvn compile -ntp
48-
build-jdk21:
49-
runs-on: ubuntu-latest
50-
steps:
51-
- uses: actions/checkout@v4
52-
- uses: actions/setup-java@v4
53-
with:
54-
distribution: temurin
55-
java-version: '21'
56-
cache: maven
57-
- name: Compile with Maven
58-
run: mvn compile -ntp
59-
60-
check-versions:
61-
runs-on: ubuntu-latest
62-
needs: [ build-jdk11, build-jdk17, build-jdk21 ]
63-
timeout-minutes: 8
64-
steps:
65-
- uses: actions/checkout@v4
66-
- uses: actions/setup-java@v4
67-
with:
68-
distribution: temurin
69-
java-version: '11'
70-
cache: maven
71-
- uses: actions/setup-java@v4
72-
with:
73-
distribution: temurin
74-
java-version: '17'
75-
cache: maven
76-
- name: Check versions with Maven
77-
run: mvn versions:display-dependency-updates -ntp
37+
run: mvn compile -ntp -P build
7838

79-
test-jdk11:
39+
test:
8040
runs-on: ubuntu-latest
81-
needs: [ build-jdk11 ]
41+
needs: build
8242
steps:
8343
- uses: actions/checkout@v4
8444
- uses: actions/setup-java@v4
@@ -87,55 +47,20 @@ jobs:
8747
java-version: '11'
8848
cache: maven
8949
- name: Test with Maven
90-
run: mvn test -ntp
91-
- uses: actions/upload-artifact@v4
92-
if: failure()
93-
with:
94-
name: surefire-report
95-
path: target/surefire-reports/
96-
test-jdk17:
97-
runs-on: ubuntu-latest
98-
needs: [ build-jdk17 ]
99-
steps:
100-
- uses: actions/checkout@v4
101-
- uses: actions/setup-java@v4
102-
with:
103-
distribution: temurin
104-
java-version: '17'
105-
cache: maven
106-
- name: Test with Maven
107-
run: mvn test -ntp
108-
- uses: actions/upload-artifact@v4
109-
if: failure()
110-
with:
111-
name: surefire-report
112-
path: target/surefire-reports/
113-
test-jdk21:
114-
runs-on: ubuntu-latest
115-
needs: [ build-jdk21 ]
116-
steps:
117-
- uses: actions/checkout@v4
118-
- uses: actions/setup-java@v4
119-
with:
120-
distribution: temurin
121-
java-version: '21'
122-
cache: maven
123-
- name: Test with Maven
124-
run: mvn test -ntp
50+
run: mvn test -ntp -P development
12551
- uses: actions/upload-artifact@v4
12652
if: failure()
12753
with:
12854
name: surefire-report
12955
path: target/surefire-reports/
13056

131-
owasp:
57+
build-and-owasp:
13258
runs-on: ubuntu-latest
133-
timeout-minutes: 8
13459
permissions:
13560
actions: read
13661
contents: read
13762
security-events: write
138-
needs: [ build-jdk11, build-jdk17, build-jdk21 ]
63+
needs: test
13964
services:
14065
owasp-db:
14166
image: nalusolutionsgmbh/owasp-maven-action:latest
@@ -147,6 +72,8 @@ jobs:
14772
distribution: temurin
14873
java-version: '11'
14974
cache: maven
75+
- name: Build with Maven
76+
run: mvn install -ntp -P development
15077
- name: Copy owasp database from container to runner
15178
run: docker cp $(docker ps -aqf "name=owasp-db"):/dependency-check/data ./dependency-checker-db/
15279
- name: OWASP Check
@@ -167,7 +94,7 @@ jobs:
16794

16895
maven-deploy-dev:
16996
runs-on: ubuntu-latest
170-
needs: [ check-versions, test-jdk11, test-jdk17, test-jdk21, owasp ]
97+
needs: build-and-owasp
17198
if: github.ref == 'refs/heads/dev'
17299
steps:
173100
- uses: actions/checkout@v4
@@ -176,7 +103,7 @@ jobs:
176103
distribution: temurin
177104
java-version: '11'
178105
cache: maven
179-
server-id: ossrh
106+
server-id: central
180107
server-username: MAVEN_USERNAME
181108
server-password: MAVEN_PASSWORD
182109
- name: Extract Maven project version
@@ -199,13 +126,13 @@ jobs:
199126
gpg --list-secret-keys --keyid-format LONG
200127
- name: Deploy with Maven
201128
env:
202-
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
203-
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
204-
run: mvn deploy -ntp -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD_NALUKIT_GITHUB_USER }} -DskipTests -Drevision=HEAD-SNAPSHOT
129+
MAVEN_USERNAME: ${{ secrets.CENTRAL_TOKEN_USERNAME }}
130+
MAVEN_PASSWORD: ${{ secrets.CENTRAL_TOKEN_PASSWORD }}
131+
run: mvn deploy -ntp -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD_NALUKIT_GITHUB_USER }} -DskipTests -Drevision=HEAD-SNAPSHOT -P release
205132

206133
maven-deploy-main:
207134
runs-on: ubuntu-latest
208-
needs: [ check-versions, test-jdk11, test-jdk17, test-jdk21, owasp ]
135+
needs: build-and-owasp
209136
if: github.ref == 'refs/heads/main'
210137
steps:
211138
- uses: actions/checkout@v4
@@ -214,7 +141,7 @@ jobs:
214141
distribution: temurin
215142
java-version: '11'
216143
cache: maven
217-
server-id: ossrh
144+
server-id: central
218145
server-username: MAVEN_USERNAME
219146
server-password: MAVEN_PASSWORD
220147
- name: Extract Maven project version
@@ -258,7 +185,7 @@ jobs:
258185
gpg --list-secret-keys --keyid-format LONG
259186
- name: Deploy with Maven
260187
env:
261-
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
262-
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
263-
run: mvn deploy -ntp -P release -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD_NALUKIT_GITHUB_USER }} -DskipTests -Daether.checksums.algorithms=MD5 -Drevision=${{ steps.project.outputs.version }}
188+
MAVEN_USERNAME: ${{ secrets.CENTRAL_TOKEN_USERNAME }}
189+
MAVEN_PASSWORD: ${{ secrets.CENTRAL_TOKEN_PASSWORD }}
190+
run: mvn deploy -ntp -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD_NALUKIT_GITHUB_USER }} -DskipTests -Daether.checksums.algorithms=MD5 -Drevision=${{ steps.project.outputs.version }} -P release
264191

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,55 @@
11
name: Delete workflow runs
22
on:
3+
schedule:
4+
- cron: '10 2 1 * *'
5+
# Run monthly, at 02:10 on the 1st day of month.
36
workflow_dispatch:
47
inputs:
58
days:
6-
description: 'Days-worth of runs to keep for each workflow'
9+
description: Days-worth of runs to keep for each workflow
710
required: true
811
default: '30'
912
minimum_runs:
10-
description: 'Minimum runs to keep for each workflow'
13+
description: Minimum runs to keep for each workflow
1114
required: true
1215
default: '6'
1316
delete_workflow_pattern:
14-
description: 'Name or filename of the workflow (if not set, all workflows are targeted)'
17+
description: Name or filename of the workflow (if not set, all workflows are targeted)
1518
required: false
1619
delete_workflow_by_state_pattern:
1720
description: 'Filter workflows by state: active, deleted, disabled_fork, disabled_inactivity, disabled_manually'
1821
required: true
19-
default: "ALL"
22+
default: ALL
2023
type: choice
2124
options:
22-
- "ALL"
25+
- ALL
2326
- active
2427
- deleted
2528
- disabled_inactivity
2629
- disabled_manually
2730
delete_run_by_conclusion_pattern:
2831
description: 'Remove runs based on conclusion: action_required, cancelled, failure, skipped, success'
2932
required: true
30-
default: "ALL"
33+
default: ALL
3134
type: choice
3235
options:
33-
- "ALL"
34-
- "Unsuccessful: action_required,cancelled,failure,skipped"
36+
- ALL
37+
- 'Unsuccessful: action_required,cancelled,failure,skipped'
3538
- action_required
3639
- cancelled
3740
- failure
3841
- skipped
3942
- success
4043
dry_run:
41-
description: 'Logs simulated changes, no deletions are performed'
44+
description: Logs simulated changes, no deletions are performed
4245
required: false
4346

4447
jobs:
45-
del_runs:
48+
delete_workflow_runs:
4649
runs-on: ubuntu-latest
4750
permissions:
4851
actions: write
52+
contents: write # This is required for actions/read
4953
steps:
5054
- name: Delete workflow runs
5155
uses: Mattraks/delete-workflow-runs@v2
@@ -62,4 +66,4 @@ jobs:
6266
&& 'action_required,cancelled,failure,skipped'
6367
|| github.event.inputs.delete_run_by_conclusion_pattern
6468
}}
65-
dry_run: ${{ github.event.inputs.dry_run }}
69+
dry_run: ${{ github.event.inputs.dry_run }}

iban4g-gwt2-tests/pom.xml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -124,14 +124,6 @@
124124
<sourceLevel>1.8</sourceLevel>
125125
</configuration>
126126
</plugin>
127-
<plugin>
128-
<groupId>org.apache.maven.plugins</groupId>
129-
<artifactId>maven-deploy-plugin</artifactId>
130-
<version>${plugin.version.deploy}</version>
131-
<configuration>
132-
<skip>true</skip>
133-
</configuration>
134-
</plugin>
135127
</plugins>
136128
</build>
137129
</project>

iban4g-j2cl-tests/pom.xml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -128,14 +128,6 @@
128128
<!-- <skipTests>true</skipTests>-->
129129
<!-- </configuration>-->
130130
</plugin>
131-
<plugin>
132-
<groupId>org.apache.maven.plugins</groupId>
133-
<artifactId>maven-deploy-plugin</artifactId>
134-
<version>${plugin.version.deploy}</version>
135-
<configuration>
136-
<skip>true</skip>
137-
</configuration>
138-
</plugin>
139131
</plugins>
140132
</build>
141133

iban4g-tests/pom.xml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,6 @@
8787
</includes>
8888
</configuration>
8989
</plugin>
90-
<plugin>
91-
<groupId>org.apache.maven.plugins</groupId>
92-
<artifactId>maven-deploy-plugin</artifactId>
93-
<version>${plugin.version.deploy}</version>
94-
<configuration>
95-
<skip>true</skip>
96-
</configuration>
97-
</plugin>
9890
</plugins>
9991
</build>
10092
</project>

0 commit comments

Comments
 (0)