Skip to content

Commit cf30038

Browse files
committed
Integ testing with Apache 5
This commit creates a new buildspecs/apache5-integ-test.yml that applies a patch that updates the SDK and integ tests to use the Apache 5.x client before running the integ tests.
1 parent 2392409 commit cf30038

File tree

2 files changed

+354
-0
lines changed

2 files changed

+354
-0
lines changed

buildspecs/apache5-integ-test.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
version: 0.2
2+
cache:
3+
paths:
4+
- '/root/.m2/**/*'
5+
6+
phases:
7+
build:
8+
commands:
9+
- |
10+
if [ ! -z "$INTEGRATION_TEST_ROLE_ARN" ]; then
11+
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`
12+
AWS_ACCESS_KEY_ID=`echo $ASSUME_ROLE_OUTPUT | awk '{ print $1 }'`
13+
AWS_SECRET_ACCESS_KEY=`echo $ASSUME_ROLE_OUTPUT | awk '{ print $2 }'`
14+
AWS_SESSION_TOKEN=`echo $ASSUME_ROLE_OUTPUT | awk '{ print $3 }'`
15+
echo "Using role $INTEGRATION_TEST_ROLE_ARN with access key $AWS_ACCESS_KEY_ID."
16+
fi
17+
- git apply buildspecs/apache5-integ-test/0001-Replace-Apache-4.x-with-5.x.patch
18+
- mvn clean install -Dskip.unit.tests -P integration-tests -Dfindbugs.skip -Dcheckstyle.skip -T1C $MAVEN_OPTIONS
19+
- JAVA_VERSION=$(java -version 2>&1 | grep -i version | cut -d'"' -f2 | cut -d'.' -f1-1)
20+
- echo $JAVA_VERSION
21+
- echo $MAVEN_OPTIONS
22+
- |
23+
if [ "$JAVA_VERSION" -ge "9" ]; then
24+
cd test/module-path-tests
25+
mvn package
26+
mvn exec:exec -P integ-tests
27+
fi
28+
finally:
29+
- mkdir -p codebuild-test-reports
30+
- find ./ -name 'TEST-*.xml' -type f -exec cp {} codebuild-test-reports/ \;
31+
reports:
32+
IntegTests:
33+
files:
34+
- 'codebuild-test-reports/**/*'

0 commit comments

Comments
 (0)