Commit 12d31285 authored by Matt Wise's avatar Matt Wise
Browse files

aws-int-test-log-file

parent e8d1f220
Pipeline #28860 passed with stage
in 7 seconds
......@@ -164,18 +164,48 @@ aws-test-java:
stage: integration
needs: ['aws-update-ecs']
script:
# This creates a script for running maven, capturing output to a file.
# - First argument is the directory to build from
# - Second argument is the name to use for the logfile
# - The remaining arguments are the maven command to run
- ls -ltr
- cd $INTEGRATION_TEST_DIR
- mvn $MAVEN_CLI_OPTS -Dmaven.repo.local=$MAVEN_REPO_PATH ${AWS_MAVEN_TEST_COMMAND_OVERRIDE:-test} --update-snapshots -Dorg.slf4j.simpleLogger.defaultLogLevel=info
- |
cat > maven-build.sh <<EOF
outputFile="\$1"
echo "********************************************************************************"
pwd
echo Running \$MAVEN "\$@" ...
if \$MAVEN "\$@" > "\$outputFile" 2>&1; then
tail -n 25 "\$outputFile";
echo '**** Showing the last 25 lines of the passed build (above). See Job artifacts for full log details *****';
else
tail -n 200 "\$outputFile";
echo '**** Showing the last 200 lines of the failed build (above). See Job artifacts for full log details *****';
exit 255;
fi
EOF
- export MAVEN="mvn $MAVEN_CLI_OPTS -Dmaven.repo.local=$MAVEN_REPO_PATH ${AWS_MAVEN_TEST_COMMAND_OVERRIDE:-test} --update-snapshots -Dorg.slf4j.simpleLogger.defaultLogLevel=info"
- sh maven-build.sh maven-output.txt
only:
variables:
#Default if not defined
- $AWS_SKIP_DEPLOY != 'true' && $AWS_SKIP_TESTS != 'true' && $AWS == 'true' && ($AWS_INT_TEST_TYPE == 'java' || $AWS_INT_TEST_TYPE == null)
artifacts:
when: on_failure
when: always
paths:
- $INTEGRATION_TEST_DIR
expire_in: 1 week
- ./maven-output.txt
- ./*/maven-output.txt
- ./*/*/maven-output.txt
- ./*/*/*/maven-output.txt
expire_in: 14 days
aws-test-python:
extends:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment