File tree Expand file tree Collapse file tree 6 files changed +59
-2
lines changed Expand file tree Collapse file tree 6 files changed +59
-2
lines changed Original file line number Diff line number Diff line change @@ -2,11 +2,16 @@ agents:
2
2
provider : " gcp"
3
3
image : " family/ecs-logging-java-ubuntu-2204"
4
4
5
+ env :
6
+ TARBALL_FILE : ${TARBALL_FILE:-artifacts.tar}
7
+
5
8
steps :
6
9
- label : " Run the release"
7
10
key : " release"
8
11
commands : .ci/release.sh
9
- artifact_paths : " release.txt"
12
+ artifact_paths :
13
+ - " release.txt"
14
+ - " ${TARBALL_FILE}"
10
15
11
16
notify :
12
17
- slack : " #apm-agent-java"
Original file line number Diff line number Diff line change @@ -2,13 +2,17 @@ agents:
2
2
provider : " gcp"
3
3
image : " family/ecs-logging-java-ubuntu-2204"
4
4
5
+ env :
6
+ TARBALL_FILE : ${TARBALL_FILE:-artifacts.tar}
7
+
5
8
steps :
6
9
- label : " Run the snapshot"
7
10
key : " release"
8
11
commands : .ci/snapshot.sh
9
12
artifact_paths :
10
13
- " snapshot.txt"
11
14
- " **/target/*"
15
+ - " ${TARBALL_FILE}"
12
16
13
17
notify :
14
18
- slack : " #apm-agent-java"
Original file line number Diff line number Diff line change 38
38
39
39
echo " --- Release the binaries to Maven Central :maven: [./mvnw ${GOAL} )] ${DRY_RUN_MSG} "
40
40
./mvnw -V -s .ci/settings.xml -Pgpg clean $GOAL -DskipTests --batch-mode | tee release.txt
41
+
42
+ echo " --- Archive the target folder with jar files"
43
+ .ci/published-artifacts-list.sh | tee artifacts.list
44
+ tar -cvf " ${TARBALL_FILE:- artifacts.tar} " -T artifacts.list
Original file line number Diff line number Diff line change 35
35
36
36
echo " --- Deploy the snapshot :package: [./mvnw ${GOAL} )] ${DRY_RUN_MSG} "
37
37
./mvnw -V -s .ci/settings.xml -Pgpg clean ${GOAL} -DskipTests --batch-mode | tee snapshot.txt
38
+
39
+ echo " --- Archive the target folder with jar files"
40
+ .ci/published-artifacts-list.sh | tee artifacts.list
41
+ tar -cvf " ${TARBALL_FILE:- artifacts.tar} " -T artifacts.list
Original file line number Diff line number Diff line change 66
66
if : ${{ ! inputs.skip_maven_deploy }}
67
67
needs :
68
68
- validate-tag
69
+ permissions :
70
+ contents : write
71
+ id-token : write
72
+ env :
73
+ TARBALL_FILE : artifacts.tar
69
74
steps :
70
75
- id : buildkite
71
76
name : Run Release
@@ -75,11 +80,26 @@ jobs:
75
80
vaultRoleId : ${{ secrets.VAULT_ROLE_ID }}
76
81
vaultSecretId : ${{ secrets.VAULT_SECRET_ID }}
77
82
pipeline : ecs-logging-java-release
83
+ artifactName : releases
84
+ artifactPath : ${{ env.TARBALL_FILE }}
78
85
waitFor : true
79
86
printBuildLogs : false
80
87
buildEnvVars : |
81
88
ref=${{ inputs.ref }}
82
89
dry_run=${{ inputs.dry_run || 'false' }}
90
+ TARBALL_FILE=${{ env.TARBALL_FILE }}
91
+
92
+ - uses : actions/download-artifact@v3
93
+ with :
94
+ name : releases
95
+
96
+ - name : untar the buildkite tarball
97
+ run : tar xvf ${{ env.TARBALL_FILE }}
98
+
99
+ - name : generate build provenance
100
+ uses : github-early-access/generate-build-provenance@main
101
+ with :
102
+ subject-path : " ${{ github.workspace }}/**/target/*.jar"
83
103
84
104
- if : ${{ success() }}
85
105
uses : elastic/apm-pipeline-library/.github/actions/slack-message@current
Original file line number Diff line number Diff line change 37
37
runs-on : ubuntu-latest
38
38
needs : validate
39
39
if : ${{ contains(needs.validate.outputs.is-snapshot, 'true') }}
40
+ permissions :
41
+ contents : write
42
+ id-token : write
43
+ env :
44
+ TARBALL_FILE : artifacts.tar
40
45
steps :
41
46
- id : buildkite
42
47
name : Run Deploy
@@ -46,10 +51,25 @@ jobs:
46
51
vaultRoleId : ${{ secrets.VAULT_ROLE_ID }}
47
52
vaultSecretId : ${{ secrets.VAULT_SECRET_ID }}
48
53
pipeline : ecs-logging-java-snapshot
49
- waitFor : false
54
+ artifactName : snapshots
55
+ artifactPath : ${{ env.TARBALL_FILE }}
56
+ waitFor : true
50
57
printBuildLogs : false
51
58
buildEnvVars : |
52
59
dry_run=${{ inputs.dry_run || 'false' }}
60
+ TARBALL_FILE=${{ env.TARBALL_FILE }}
61
+
62
+ - uses : actions/download-artifact@v3
63
+ with :
64
+ name : snapshots
65
+
66
+ - name : untar the buildkite tarball
67
+ run : tar xvf ${{ env.TARBALL_FILE }}
68
+
69
+ - name : generate build provenance
70
+ uses : github-early-access/generate-build-provenance@main
71
+ with :
72
+ subject-path : " ${{ github.workspace }}/**/target/*.jar"
53
73
54
74
- if : ${{ failure() }}
55
75
uses : elastic/apm-pipeline-library/.github/actions/slack-message@current
You can’t perform that action at this time.
0 commit comments