Skip to content

Commit 8a76ddf

Browse files
authored
Add set -e to buildspecs with multiline commands (#6524)
1 parent 87facc3 commit 8a76ddf

File tree

5 files changed

+6
-0
lines changed

5 files changed

+6
-0
lines changed

buildspecs/build.yml

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

buildspecs/integ-test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ phases:
1212
commands:
1313
- |
1414
if [ ! -z "$INTEGRATION_TEST_ROLE_ARN" ]; then
15+
set -e
1516
ASSUME_ROLE_OUTPUT=`aws sts assume-role --role-arn "$INTEGRATION_TEST_ROLE_ARN" --role-session-name "integration-tests" --duration-seconds 7200 --query 'Credentials.[AccessKeyId,SecretAccessKey,SessionToken]' --output text`
1617
AWS_ACCESS_KEY_ID=`echo $ASSUME_ROLE_OUTPUT | awk '{ print $1 }'`
1718
AWS_SECRET_ACCESS_KEY=`echo $ASSUME_ROLE_OUTPUT | awk '{ print $2 }'`
@@ -24,6 +25,7 @@ phases:
2425
- echo $MAVEN_OPTIONS
2526
- |
2627
if [ "$JAVA_VERSION" -ge "9" ]; then
28+
set -e
2729
cd test/module-path-tests
2830
mvn package
2931
mvn exec:exec -P integ-tests

buildspecs/on-demand-integ-test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ phases:
1212
- echo $JAVA_VERSION
1313
- |
1414
if [ "$JAVA_VERSION" -ge "9" ]; then
15+
set -e
1516
cd test/module-path-tests
1617
mvn package
1718
mvn exec:exec -P integ-tests

buildspecs/release-to-maven-central.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ phases:
2424
- ARTIFACT_URL="https://repo1.maven.org/maven2/software/amazon/awssdk/aws-sdk-java/$RELEASE_VERSION/"
2525
- |
2626
if ! curl -f --head $ARTIFACT_URL; then
27+
set -e
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`
2930
SDK_SIGNING_GPG_KEYNAME=`aws secretsmanager get-secret-value --secret-id $SDK_SIGNING_GPG_KEYNAME_ARN --query SecretString --output text`

buildspecs/release-to-maven.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ phases:
2424
- SONATYPE_URL="https://aws.oss.sonatype.org/service/local/repositories/releases/content/software/amazon/awssdk/aws-sdk-java/$RELEASE_VERSION/"
2525
- |
2626
if ! curl -f --head $SONATYPE_URL; then
27+
set -e
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`
2930
SDK_SIGNING_GPG_KEYNAME=`aws secretsmanager get-secret-value --secret-id $SDK_SIGNING_GPG_KEYNAME_ARN --query SecretString --output text`

0 commit comments

Comments
 (0)