Skip to content

Commit e766def

Browse files
committed
Add after test step
1 parent 41d3be5 commit e766def

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

wercker.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,14 @@ integration-test:
7171
name: Run integration tests
7272
code: |
7373
function finish {
74+
export {$WERCKER_DEPLOYTARGET_NAME}-result=$?
75+
7476
# clean up
7577
yum clean all
7678
7779
# store the artifacts so we can download them easily
7880
tar czvf ${WERCKER_REPORT_ARTIFACTS_DIR}/integration-test-data.tar.gz /pipeline/output/*
81+
exit 0
7982
}
8083
trap finish EXIT
8184
@@ -170,6 +173,17 @@ integration-test:
170173
$WERCKER_SOURCE_DIR/src/integration-tests/bash/run.sh
171174
172175
176+
# This pipeline reports results of integration test. It is separated so that integration test
177+
# pipeline succeeds and stores results even if tests actually failed
178+
after-test:
179+
steps:
180+
- script:
181+
name: Report integration test results
182+
code: |
183+
varname=${INTEGRATION_TEST_RESULT}
184+
exit ${!varname}
185+
186+
173187
# This pipeline runs quality checks
174188
quality:
175189
steps:

0 commit comments

Comments
 (0)