File tree Expand file tree Collapse file tree 6 files changed +162
-7
lines changed Expand file tree Collapse file tree 6 files changed +162
-7
lines changed Original file line number Diff line number Diff line change
1
+ name : ' Build'
2
+ description : ' Builds the project, optionally publishing it to a local deployment repository'
3
+ inputs :
4
+ java-version :
5
+ required : false
6
+ default : ' 17'
7
+ description : ' The Java version to compile and test with'
8
+ java-distribution :
9
+ required : false
10
+ default : ' liberica'
11
+ description : ' The Java distribution to use for the build'
12
+ publish :
13
+ required : false
14
+ default : ' false'
15
+ description : ' Whether to publish artifacts ready for deployment to Artifactory'
16
+ outputs :
17
+ version :
18
+ description : ' The version that was built'
19
+ value : ${{ steps.read-version.outputs.version }}
20
+ runs :
21
+ using : composite
22
+ steps :
23
+ - name : Prepare Maven Build
24
+ uses : ./.github/actions/prepare-maven-build
25
+ with :
26
+ java-version : ${{ inputs.java-version }}
27
+ java-distribution : ${{ inputs.java-distribution }}
28
+ - name : Build
29
+ id : build
30
+ if : ${{ inputs.publish == 'false' }}
31
+ shell : bash
32
+ run : ./mvnw --no-transfer-progress --batch-mode --update-snapshots verify
33
+ - name : Publish
34
+ id : publish
35
+ if : ${{ inputs.publish == 'true' }}
36
+ shell : bash
37
+ run : ./mvnw --no-transfer-progress --batch-mode --update-snapshots -DaltDeploymentRepository=local::file:deployment-repository/ clean deploy -Pspring
38
+ - name : Read version from pom.xml
39
+ id : read-version
40
+ shell : bash
41
+ run : |
42
+ version=$(sed -n 's/^.*<revision>\(.*\)<\/revision>.*$/\1/p' pom.xml)
43
+ echo "Version is $version"
44
+ echo "version=$version" >> $GITHUB_OUTPUT
Original file line number Diff line number Diff line change
1
+ name : ' Prepare Gradle Build'
2
+ description : ' Prepares a Maven build. Sets up Java'
3
+ inputs :
4
+ java-version :
5
+ required : false
6
+ default : ' 17'
7
+ description : ' The Java version to use for the build'
8
+ java-distribution :
9
+ required : false
10
+ default : ' liberica'
11
+ description : ' The Java distribution to use for the build'
12
+ runs :
13
+ using : composite
14
+ steps :
15
+ - name : Set Up Java
16
+ uses : actions/setup-java@v4
17
+ with :
18
+ distribution : ${{ inputs.java-distribution }}
19
+ java-version : |
20
+ ${{ inputs.java-version }}
21
+ ${{ inputs.java-toolchain == 'true' && '17' || '' }}
Original file line number Diff line number Diff line change
1
+ name : Print JVM thread dumps
2
+ description : Prints a thread dump for all running JVMs
3
+ runs :
4
+ using : composite
5
+ steps :
6
+ - if : ${{ runner.os == 'Linux' }}
7
+ shell : bash
8
+ run : |
9
+ for jvm_pid in $(jps -q -J-XX:+PerfDisableSharedMem); do
10
+ jcmd $jvm_pid Thread.print
11
+ done
12
+ - if : ${{ runner.os == 'Windows' }}
13
+ shell : powershell
14
+ run : |
15
+ foreach ($jvm_pid in $(jps -q -J-XX:+PerfDisableSharedMem)) {
16
+ jcmd $jvm_pid Thread.print
17
+ }
Original file line number Diff line number Diff line change
1
+ name : Send Notification
2
+ description : Sends a Google Chat message as a notification of the job's outcome
3
+ inputs :
4
+ webhook-url :
5
+ description : ' Google Chat Webhook URL'
6
+ required : true
7
+ status :
8
+ description : ' Status of the job'
9
+ required : true
10
+ run-name :
11
+ description : ' Name of the run to include in the notification'
12
+ default : ${{ format('{0} {1}', github.ref_name, github.job) }}
13
+ runs :
14
+ using : composite
15
+ steps :
16
+ - shell : bash
17
+ run : |
18
+ echo "RUN_URL=${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" >> "$GITHUB_ENV"
19
+ - shell : bash
20
+ if : ${{ inputs.status == 'success' }}
21
+ run : |
22
+ curl -X POST '${{ inputs.webhook-url }}' -H 'Content-Type: application/json' -d '{ text: "<${{ env.RUN_URL }}|${{ inputs.run-name }}> was successful"}' || true
23
+ - shell : bash
24
+ if : ${{ inputs.status == 'failure' }}
25
+ run : |
26
+ curl -X POST '${{ inputs.webhook-url }}' -H 'Content-Type: application/json' -d '{ text: "<users/all> *<${{ env.RUN_URL }}|${{ inputs.run-name }}> failed*"}' || true
27
+ - shell : bash
28
+ if : ${{ inputs.status == 'cancelled' }}
29
+ run : |
30
+ curl -X POST '${{ inputs.webhook-url }}' -H 'Content-Type: application/json' -d '{ text: "<${{ env.RUN_URL }}|${{ inputs.run-name }}> was cancelled"}' || true
Original file line number Diff line number Diff line change
1
+ name : Build and Deploy Snapshot
2
+ on :
3
+ push :
4
+ branches :
5
+ - main
6
+ permissions :
7
+ actions : write
8
+ concurrency :
9
+ group : ${{ github.workflow }}-${{ github.ref }}
10
+ jobs :
11
+ build-and-deploy-snapshot :
12
+ if : ${{ github.repository == 'spring-projects/spring-retry' }}
13
+ name : Build and Deploy Snapshot
14
+ runs-on : ubuntu-latest
15
+ steps :
16
+ - name : Check Out Code
17
+ uses : actions/checkout@v4
18
+ - name : Build and Publish
19
+ id : build-and-publish
20
+ uses : ./.github/actions/build
21
+ with :
22
+ publish : true
23
+ - name : Deploy
24
+ uses : spring-io/artifactory-deploy-action@26bbe925a75f4f863e1e529e85be2d0093cac116 # v0.0.1
25
+ with :
26
+ uri : ' https://repo.spring.io'
27
+ username : ${{ secrets.ARTIFACTORY_USERNAME }}
28
+ password : ${{ secrets.ARTIFACTORY_PASSWORD }}
29
+ build-name : ' spring-retry-2.0.x'
30
+ repository : ' libs-snapshot-local'
31
+ folder : ' deployment-repository'
32
+ signing-key : ${{ secrets.GPG_PRIVATE_KEY }}
33
+ signing-passphrase : ${{ secrets.GPG_PASSPHRASE }}
34
+ - name : Send Notification
35
+ uses : ./.github/actions/send-notification
36
+ if : always()
37
+ with :
38
+ webhook-url : ${{ secrets.GOOGLE_CHAT_WEBHOOK_URL }}
39
+ status : ${{ job.status }}
40
+ run-name : ${{ format('{0} | Linux | Java 17', github.ref_name) }}
41
+ outputs :
42
+ version : ${{ steps.build-and-publish.outputs.version }}
Original file line number Diff line number Diff line change @@ -6,18 +6,19 @@ permissions:
6
6
7
7
jobs :
8
8
build :
9
- name : Build pull request
9
+ name : Build Pull Request
10
10
runs-on : ubuntu-latest
11
11
if : ${{ github.repository == 'spring-projects/spring-retry' }}
12
12
steps :
13
- - name : Set up JDK 17
14
- uses : actions/setup-java@v3
13
+ - name : Set Up JDK 17
14
+ uses : actions/setup-java@v4
15
15
with :
16
16
java-version : ' 17'
17
17
distribution : ' liberica'
18
-
19
- - name : Check out code
20
- uses : actions/checkout@v3
21
-
18
+ - name : Check Out
19
+ uses : actions/checkout@v4
22
20
- name : Build
23
21
run : ./mvnw --batch-mode --update-snapshots verify
22
+ - name : Print JVM Thread Dumps When Cancelled
23
+ uses : ./.github/actions/print-jvm-thread-dumps
24
+ if : cancelled()
You can’t perform that action at this time.
0 commit comments