Skip to content

Commit 01cc5a5

Browse files
authored
Add set -e to buildspecs with multi line commands (#6541)
* Add set -e to buildspecs with multi line commands * Move command before if clause
1 parent 678af8f commit 01cc5a5

File tree

4 files changed

+4
-0
lines changed

4 files changed

+4
-0
lines changed

buildspecs/build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ phases:
1515
- echo $JAVA_VERSION
1616
- echo $MAVEN_OPTIONS
1717
- |
18+
set -e
1819
if [ "$JAVA_VERSION" -ge "9" ]; then
1920
cd test/module-path-tests
2021
mvn package

buildspecs/on-demand-integ-test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ phases:
1111
- JAVA_VERSION=$(java -version 2>&1 | grep -i version | cut -d'"' -f2 | cut -d'.' -f1-1)
1212
- echo $JAVA_VERSION
1313
- |
14+
set -e
1415
if [ "$JAVA_VERSION" -ge "9" ]; then
1516
cd test/module-path-tests
1617
mvn package

buildspecs/release-to-maven-central.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ phases:
2323
- RELEASE_VERSION=`mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec`
2424
- ARTIFACT_URL="https://repo1.maven.org/maven2/software/amazon/awssdk/aws-sdk-java/$RELEASE_VERSION/"
2525
- |
26+
set -e
2627
if ! curl -f --head $ARTIFACT_URL; then
2728
SONATYPE_USERNAME=`aws secretsmanager get-secret-value --secret-id $SONATYPE_USERNAME_ARN --query SecretString --output text`
2829
SONATYPE_PASSWORD=`aws secretsmanager get-secret-value --secret-id $SONATYPE_PASSWORD_ARN --query SecretString --output text`

buildspecs/release-to-maven.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ phases:
2323
- RELEASE_VERSION=`mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec`
2424
- SONATYPE_URL="https://aws.oss.sonatype.org/service/local/repositories/releases/content/software/amazon/awssdk/aws-sdk-java/$RELEASE_VERSION/"
2525
- |
26+
set -e
2627
if ! curl -f --head $SONATYPE_URL; then
2728
SONATYPE_USERNAME=`aws secretsmanager get-secret-value --secret-id $SONATYPE_USERNAME_ARN --query SecretString --output text`
2829
SONATYPE_PASSWORD=`aws secretsmanager get-secret-value --secret-id $SONATYPE_PASSWORD_ARN --query SecretString --output text`

0 commit comments

Comments
 (0)