Skip to content

Commit 214af45

Browse files
author
Test name
committed
Changes for PowerAPI monitoring
1 parent 5894b83 commit 214af45

File tree

3 files changed

+166
-138
lines changed

3 files changed

+166
-138
lines changed

.github/workflows/maven.yml

Lines changed: 38 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,62 @@
1-
name: Main Build
2-
on:
3-
push:
4-
branches:
5-
- master
6-
paths-ignore:
7-
- 'docs/**'
8-
- '.circleci/**'
9-
- '.github/**'
10-
- 'README.md'
11-
121
env:
13-
OSS_USERNAME: ${{ secrets.OSS_USERNAME }}
142
OSS_PASSWORD: ${{ secrets.OSS_PASSWORD }}
15-
3+
OSS_USERNAME: ${{ secrets.OSS_USERNAME }}
164
jobs:
175
build:
18-
name: Build on JDK ${{ matrix.java_version }}
19-
runs-on: 'ubuntu-latest'
20-
strategy:
21-
fail-fast: false
22-
matrix:
23-
java_version: ['8', '11', '17', '21']
246
env:
25-
JAVA_OPTS: "-XX:+TieredCompilation -XX:TieredStopAtLevel=1"
7+
JAVA_OPTS: -XX:+TieredCompilation -XX:TieredStopAtLevel=1
8+
name: Build on JDK ${{ matrix.java_version }}
9+
runs-on: self-hosted
2610
steps:
27-
- uses: actions/checkout@v4
11+
- continue-on-error: true
12+
uses: actions/checkout@v4
2813
with:
29-
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
30-
- name: Set up JDK
14+
fetch-depth: 0
15+
- continue-on-error: true
16+
name: Set up JDK
3117
uses: actions/setup-java@v4
3218
with:
33-
distribution: 'zulu'
19+
cache: maven
20+
distribution: zulu
3421
java-version: ${{ matrix.java_version }}
35-
cache: 'maven'
36-
# Value of the distributionManagement/repository/id field of the pom.xml
3722
server-id: sonatype-nexus-snapshots
38-
server-username: OSS_USERNAME
3923
server-password: OSS_PASSWORD
40-
- name: Cache SonarCloud packages
41-
uses: actions/cache@v4
42-
if: ${{ env.SONAR_TOKEN != null && env.SONAR_TOKEN != '' && matrix.java_version == '17' }}
24+
server-username: OSS_USERNAME
25+
- continue-on-error: true
4326
env:
4427
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
28+
if: ${{ env.SONAR_TOKEN != null && env.SONAR_TOKEN != '' && matrix.java_version
29+
== '17' }}
30+
name: Cache SonarCloud packages
31+
uses: actions/cache@v4
4532
with:
46-
path: ~/.sonar/cache
4733
key: ${{ runner.os }}-sonar
34+
path: ~/.sonar/cache
4835
restore-keys: ${{ runner.os }}-sonar
49-
- name: Run tests
36+
- continue-on-error: true
37+
name: Run tests
5038
run: ./mvnw -V -B -ntp -ff verify jacoco:report
51-
- name: Static Analysis (Sonar)
52-
if: ${{ env.SONAR_TOKEN != null && env.SONAR_TOKEN != '' && matrix.java_version == '17' }}
39+
- continue-on-error: true
5340
env:
5441
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5542
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
43+
if: ${{ env.SONAR_TOKEN != null && env.SONAR_TOKEN != '' && matrix.java_version
44+
== '17' }}
45+
name: Static Analysis (Sonar)
5646
run: ./mvnw -B -ntp -ff org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
57-
- name: Release Snapshot
47+
- continue-on-error: true
5848
if: matrix.java_version == '11'
49+
name: Release Snapshot
5950
run: ./mvnw -V -B -ntp -ff deploy
51+
strategy:
52+
fail-fast: false
53+
matrix:
54+
java_version:
55+
- '8'
56+
- '11'
57+
- '17'
58+
- '21'
59+
name: Main Build
60+
on:
61+
repository_dispatch:
62+
types: trigger-ga___maven.yml

.github/workflows/pr.yml

Lines changed: 52 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,59 @@
1-
name: Pull Request Checks
2-
on:
3-
- pull_request
4-
51
jobs:
6-
cleanup:
7-
name: Cleanup any previous jobs
8-
runs-on: ubuntu-latest
9-
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/master'"
10-
steps:
11-
- uses: rokroskar/workflow-run-cleanup-action@v0.3.3
12-
env:
13-
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
142
build:
3+
env:
4+
JAVA_OPTS: -XX:+TieredCompilation -XX:TieredStopAtLevel=1
155
name: Build on JDK ${{ matrix.java_version }}
16-
runs-on: ubuntu-latest
6+
runs-on: self-hosted
7+
steps:
8+
- continue-on-error: true
9+
uses: actions/checkout@v4
10+
- continue-on-error: true
11+
name: Set up JDK
12+
uses: actions/setup-java@v4
13+
with:
14+
cache: maven
15+
distribution: zulu
16+
java-version: ${{ matrix.java_version }}
17+
- continue-on-error: true
18+
env:
19+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
20+
if: ${{ env.SONAR_TOKEN != null && env.SONAR_TOKEN != '' && matrix.java_version
21+
== '17' }}
22+
name: Cache SonarCloud packages
23+
uses: actions/cache@v4
24+
with:
25+
key: ${{ runner.os }}-sonar
26+
path: ~/.sonar/cache
27+
restore-keys: ${{ runner.os }}-sonar
28+
- continue-on-error: true
29+
name: Run tests
30+
run: ./mvnw -V -B -ntp -ff verify
31+
- continue-on-error: true
32+
env:
33+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
35+
if: ${{ env.SONAR_TOKEN != null && env.SONAR_TOKEN != '' && matrix.java_version
36+
== '17' }}
37+
name: Static Analysis (Sonar)
38+
run: ./mvnw -B -ntp -ff org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
1739
strategy:
1840
fail-fast: false
1941
matrix:
20-
java_version: ['8', '11', '17', '21']
21-
env:
22-
JAVA_OPTS: "-XX:+TieredCompilation -XX:TieredStopAtLevel=1"
42+
java_version:
43+
- '8'
44+
- '11'
45+
- '17'
46+
- '21'
47+
cleanup:
48+
if: '!startsWith(github.ref, ''refs/tags/'') && github.ref != ''refs/heads/master'''
49+
name: Cleanup any previous jobs
50+
runs-on: self-hosted
2351
steps:
24-
- uses: actions/checkout@v4
25-
- name: Set up JDK
26-
uses: actions/setup-java@v4
27-
with:
28-
distribution: 'zulu'
29-
java-version: ${{ matrix.java_version }}
30-
cache: 'maven'
31-
- name: Cache SonarCloud packages
32-
uses: actions/cache@v4
33-
if: ${{ env.SONAR_TOKEN != null && env.SONAR_TOKEN != '' && matrix.java_version == '17' }}
34-
env:
35-
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
36-
with:
37-
path: ~/.sonar/cache
38-
key: ${{ runner.os }}-sonar
39-
restore-keys: ${{ runner.os }}-sonar
40-
- name: Run tests
41-
run: ./mvnw -V -B -ntp -ff verify
42-
- name: Static Analysis (Sonar)
43-
if: ${{ env.SONAR_TOKEN != null && env.SONAR_TOKEN != '' && matrix.java_version == '17' }}
44-
env:
45-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46-
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
47-
run: ./mvnw -B -ntp -ff org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
52+
- continue-on-error: true
53+
env:
54+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
55+
uses: rokroskar/workflow-run-cleanup-action@v0.3.3
56+
name: Pull Request Checks
57+
on:
58+
repository_dispatch:
59+
types: trigger-ga___pr.yml

.github/workflows/release.yml

Lines changed: 76 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,82 @@
1-
name: Triggered Release
2-
on:
3-
workflow_dispatch:
4-
inputs:
5-
releaseVersion:
6-
description: 'Default version to use when preparing a release or a branch.'
7-
required: true
8-
developmentVersion:
9-
description: 'Default version to use for new local working copy.'
10-
required: true
111
env:
12-
OSS_USERNAME: ${{ secrets.OSS_USERNAME }}
13-
OSS_PASSWORD: ${{ secrets.OSS_PASSWORD }}
142
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
3+
OSS_PASSWORD: ${{ secrets.OSS_PASSWORD }}
4+
OSS_USERNAME: ${{ secrets.OSS_USERNAME }}
155
jobs:
16-
release:
17-
runs-on: ubuntu-latest
18-
steps:
19-
- uses: actions/checkout@v4
20-
- name: Set up JDK 11
21-
uses: actions/setup-java@v4
22-
with:
23-
distribution: 'zulu'
24-
java-version: 11
25-
cache: 'maven'
26-
# Value of the distributionManagement/repository/id field of the pom.xml
27-
server-id: sonatype-nexus-staging
28-
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
29-
server-username: OSS_USERNAME
30-
server-password: OSS_PASSWORD
31-
gpg-passphrase: GPG_PASSPHRASE
32-
- name: Setup Git
33-
run: |
34-
git config --global committer.email "noreply@github.com"
35-
git config --global committer.name "GitHub Release"
36-
git config --global author.email "${GITHUB_ACTOR}@users.noreply.github.com"
37-
git config --global author.name "${GITHUB_ACTOR}"
38-
- name: Release
39-
run: ./mvnw -V -B -ntp -Prelease -DreleaseVersion=${{ github.event.inputs.releaseVersion }} -DdevelopmentVersion=${{ github.event.inputs.developmentVersion }} release:prepare release:perform
40-
- name: Rollback on failure
41-
if: ${{ failure() }}
42-
run: |
43-
./mvnw -B release:rollback -Prelease -Dgpg.passphrase=${{secrets.GPG_PASSPHRASE}}
44-
echo "You may need to manually delete the GitHub tag, if it was created."
456
docker:
467
needs: release
47-
runs-on: ubuntu-latest
8+
runs-on: self-hosted
9+
steps:
10+
- continue-on-error: true
11+
uses: actions/checkout@v4
12+
with:
13+
ref: ${{ github.event.inputs.releaseVersion }}
14+
- continue-on-error: true
15+
name: Set up QEMU
16+
uses: docker/setup-qemu-action@v3
17+
- continue-on-error: true
18+
name: Set up Docker Buildx
19+
uses: docker/setup-buildx-action@v3
20+
- continue-on-error: true
21+
name: Login to DockerHub
22+
uses: docker/login-action@v3
23+
with:
24+
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
25+
username: ${{ secrets.DOCKER_HUB_USERNAME }}
26+
- continue-on-error: true
27+
name: Build & Push Docker image
28+
uses: docker/build-push-action@v5
29+
with:
30+
context: .
31+
platforms: linux/amd64,linux/arm64
32+
push: false
33+
tags: 'openapitools/openapi-diff:${{ github.event.inputs.releaseVersion }}
34+
35+
openapitools/openapi-diff:latest
36+
37+
'
38+
release:
39+
runs-on: self-hosted
4840
steps:
49-
- uses: actions/checkout@v4
50-
with:
51-
ref: ${{ github.event.inputs.releaseVersion }}
52-
- name: Set up QEMU
53-
uses: docker/setup-qemu-action@v3
54-
- name: Set up Docker Buildx
55-
uses: docker/setup-buildx-action@v3
56-
- name: Login to DockerHub
57-
uses: docker/login-action@v3
58-
with:
59-
username: ${{ secrets.DOCKER_HUB_USERNAME }}
60-
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
61-
- name: Build & Push Docker image
62-
uses: docker/build-push-action@v5
63-
with:
64-
context: .
65-
push: true
66-
platforms: linux/amd64,linux/arm64
67-
tags: |
68-
openapitools/openapi-diff:${{ github.event.inputs.releaseVersion }}
69-
openapitools/openapi-diff:latest
41+
- continue-on-error: true
42+
uses: actions/checkout@v4
43+
- continue-on-error: true
44+
name: Set up JDK 11
45+
uses: actions/setup-java@v4
46+
with:
47+
cache: maven
48+
distribution: zulu
49+
gpg-passphrase: GPG_PASSPHRASE
50+
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
51+
java-version: 11
52+
server-id: sonatype-nexus-staging
53+
server-password: OSS_PASSWORD
54+
server-username: OSS_USERNAME
55+
- continue-on-error: true
56+
name: Setup Git
57+
run: 'git config --global committer.email "noreply@github.com"
58+
59+
git config --global committer.name "GitHub Release"
60+
61+
git config --global author.email "${GITHUB_ACTOR}@users.noreply.github.com"
62+
63+
git config --global author.name "${GITHUB_ACTOR}"
64+
65+
'
66+
- continue-on-error: true
67+
name: Release
68+
run: ./mvnw -V -B -ntp -Prelease -DreleaseVersion=${{ github.event.inputs.releaseVersion
69+
}} -DdevelopmentVersion=${{ github.event.inputs.developmentVersion }} release:prepare
70+
release:perform
71+
- continue-on-error: true
72+
if: ${{ failure() }}
73+
name: Rollback on failure
74+
run: './mvnw -B release:rollback -Prelease -Dgpg.passphrase=${{secrets.GPG_PASSPHRASE}}
75+
76+
echo "You may need to manually delete the GitHub tag, if it was created."
77+
78+
'
79+
name: Triggered Release
80+
on:
81+
repository_dispatch:
82+
types: trigger-ga___release.yml

0 commit comments

Comments
 (0)