Skip to content

Commit 6e92f39

Browse files
authored
release: remove local repository pointing to Jenkins and tweak errors propagation in the buildkite pipelines (#205)
1 parent 3f252fd commit 6e92f39

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

.buildkite/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ agents:
44
steps:
55
- label: "Run the release"
66
key: "release"
7-
commands: .ci/release.sh | tee release.out
8-
artifact_paths: "release.out"
7+
commands: .ci/release.sh
8+
artifact_paths: "release.txt"
99

1010
notify:
1111
- slack:

.buildkite/snapshot.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@ agents:
44
steps:
55
- label: "Run the snapshot"
66
key: "release"
7-
commands: .ci/snapshot.sh | tee snapshot.out
7+
commands: .ci/snapshot.sh
88
artifact_paths:
9-
- "snapshot.out"
9+
- "snapshot.txt"
1010
- "**/target/*"
1111

1212
notify:
1313
- slack:
14+
if: build.state == "failed"
1415
channels:
1516
- "#apm-agent-java"

.ci/release.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
## branch_specifier
44
## dry_run
55
##
6-
## It relies on the .buildkite/hooks/pre-command so the Vault is prepared
7-
## automatically by buildkite.
8-
9-
set -e
6+
## It relies on the .buildkite/hooks/pre-command so the Vault and other tooling
7+
## are prepared automatically by buildkite.
8+
##
9+
set -eo pipefail
1010

1111
# Make sure we delete this folder before leaving even in case of failure
1212
clean_up () {
@@ -27,5 +27,5 @@ if [[ "$dry_run" == "true" ]] ; then
2727
echo './mvnw release:prepare release:perform --settings .ci/settings.xml --batch-mode'
2828
else
2929
# providing settings in arguments to make sure they are propagated to the forked maven release process
30-
./mvnw release:prepare release:perform --settings .ci/settings.xml -Darguments="--settings .ci/settings.xml" --batch-mode
30+
./mvnw release:prepare release:perform --settings .ci/settings.xml -Darguments="--settings .ci/settings.xml" --batch-mode | tee release.txt
3131
fi

.ci/settings.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<settings xmlns="http://maven.apache.org/SETTINGS/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
22
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd">
3-
<localRepository>/var/lib/jenkins/.m2/repository</localRepository>
43
<pluginGroups>
54
<pluginGroup>org.apache.maven.plugins</pluginGroup>
65
<pluginGroup>org.codehaus.mojo</pluginGroup>

.ci/snapshot.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
## are prepared automatically by buildkite.
77
##
88

9-
set -e
9+
set -eo pipefail
1010

1111
# Make sure we delete this folder before leaving even in case of failure
1212
clean_up () {
@@ -23,5 +23,5 @@ echo "--- Deploy the snapshot"
2323
if [[ "$dry_run" == "true" ]] ; then
2424
echo './mvnw -s .ci/settings.xml -Pgpg clean deploy --batch-mode'
2525
else
26-
./mvnw -s .ci/settings.xml -Pgpg clean deploy --batch-mode
26+
./mvnw -s .ci/settings.xml -Pgpg clean deploy --batch-mode | tee snapshot.txt
2727
fi

0 commit comments

Comments
 (0)