File tree Expand file tree Collapse file tree 7 files changed +63
-2
lines changed Expand file tree Collapse file tree 7 files changed +63
-2
lines changed Original file line number Diff line number Diff line change @@ -2,13 +2,17 @@ agents:
22 provider : " gcp"
33 image : " family/apm-agent-java-ubuntu-2204"
44
5+ env :
6+ TARBALL_FILE : ${TARBALL_FILE:-artifacts.tar}
7+
58steps :
69 - label : " Run the release"
710 key : " release"
811 commands : .ci/release.sh
912 artifact_paths :
1013 - " release.txt"
1114 - " **/target/*"
15+ - " ${TARBALL_FILE}"
1216
1317notify :
1418 - slack : " #apm-agent-java"
Original file line number Diff line number Diff line change @@ -2,13 +2,17 @@ agents:
22 provider : " gcp"
33 image : " family/apm-agent-java-ubuntu-2204"
44
5+ env :
6+ TARBALL_FILE : ${TARBALL_FILE:-artifacts.tar}
7+
58steps :
69 - label : " Run the snapshot"
710 key : " release"
811 commands : .ci/snapshot.sh
912 artifact_paths :
1013 - " snapshot.txt"
1114 - " **/target/*"
15+ - " ${TARBALL_FILE}"
1216
1317notify :
1418 - slack : " #apm-agent-java"
Original file line number Diff line number Diff line change 3232
3333echo " --- Deploy the release :package: [./mvnw $GOAL )] $DRY_RUN_MSG "
3434./mvnw -V -s .ci/settings.xml -Pgpg clean $GOAL -DskipTests --batch-mode | tee release.txt
35+
36+ echo " --- Archive the target folder with jar files"
37+ echo ' gather artifacts'
38+ .ci/published-artifacts-list.sh | tee artifacts.list
39+ echo ' create tarbal'
40+ tar -cvf " ${TARBALL_FILE:- artifacts.tar} " -T artifacts.list
Original file line number Diff line number Diff line change 1- #! /bin/env bash
1+ #! /usr/ bin/env bash
22
33targets=" $( find . -type d -name ' target' | grep -v apm-agent-plugins| grep -v integration-tests| sort) "
44
Original file line number Diff line number Diff line change 3434
3535echo " --- Deploy the snapshot :package: [./mvnw $GOAL )] $DRY_RUN_MSG "
3636./mvnw -V -s .ci/settings.xml -Pgpg clean $GOAL -DskipTests --batch-mode | tee snapshot.txt
37+
38+ echo " --- Archive the target folder with jar files"
39+ echo ' gather artifacts'
40+ .ci/published-artifacts-list.sh | tee artifacts.list
41+ echo ' create tarbal'
42+ tar -cvf " ${TARBALL_FILE:- artifacts.tar} " -T artifacts.list
Original file line number Diff line number Diff line change 7474 runs-on : ubuntu-latest
7575 needs :
7676 - validate-tag
77+ permissions :
78+ contents : write
79+ id-token : write
80+ env :
81+ TARBALL_FILE : artifacts.tar
7782 steps :
7883 - id : buildkite
7984 continue-on-error : true
8691 pipeline : apm-agent-java-release
8792 waitFor : true
8893 printBuildLogs : false
94+ artifactName : releases
95+ artifactPath : ${{ env.TARBALL_FILE }}
8996 buildEnvVars : |
9097 dry_run=${{ inputs.dry_run || 'false' }}
98+ TARBALL_FILE=${{ env.TARBALL_FILE }}
99+
100+ - uses : actions/download-artifact@v3
101+ with :
102+ name : releases
103+
104+ - name : untar the buildkite tarball
105+ run : tar xvf ${{ env.TARBALL_FILE }}
106+
107+ - name : generate build provenance
108+ uses : github-early-access/generate-build-provenance@main
109+ with :
110+ subject-path : " ${{ github.workspace }}/**/target/*.jar"
91111
92112 await-maven-central-artifact :
93113 name : " Wait for artifacts to be available on maven central"
Original file line number Diff line number Diff line change 3838 runs-on : ubuntu-latest
3939 needs :
4040 - validate
41+ permissions :
42+ contents : write
43+ id-token : write
44+ env :
45+ TARBALL_FILE : artifacts.tar
4146 if : ${{ contains(needs.validate.outputs.is-snapshot, 'true') }}
4247 steps :
4348 - id : buildkite
@@ -48,10 +53,26 @@ jobs:
4853 vaultRoleId : ${{ secrets.VAULT_ROLE_ID }}
4954 vaultSecretId : ${{ secrets.VAULT_SECRET_ID }}
5055 pipeline : apm-agent-java-snapshot
51- waitFor : false
56+ pipelineBranch : ${{ github.ref_name }}
57+ artifactName : snapshots
58+ artifactPath : ${{ env.TARBALL_FILE }}
59+ waitFor : true
5260 printBuildLogs : false
5361 buildEnvVars : |
5462 dry_run=${{ inputs.dry_run || 'false' }}
63+ TARBALL_FILE=${{ env.TARBALL_FILE }}
64+
65+ - uses : actions/download-artifact@v3
66+ with :
67+ name : snapshots
68+
69+ - name : untar the buildkite tarball
70+ run : tar xvf ${{ env.TARBALL_FILE }}
71+
72+ - name : generate build provenance
73+ uses : github-early-access/generate-build-provenance@main
74+ with :
75+ subject-path : " ${{ github.workspace }}/**/target/*.jar"
5576
5677 - if : ${{ failure() }}
5778 uses : elastic/apm-pipeline-library/.github/actions/slack-message@current
You can’t perform that action at this time.
0 commit comments