spec: archive output and cleanup

Add stage to copy over output from fsc for debugging. Add
cleanup post steps.

flag = none

Change-Id: Ibe8795e114f23efea86488285fe788bc8347a8de
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/226416
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Powell <spowell@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
This commit is contained in:
James Butters 2020-02-12 10:14:18 -07:00
parent dbec4a49f9
commit 552c5b504c
1 changed files with 23 additions and 3 deletions

View File

@ -38,9 +38,8 @@ pipeline {
stage('Checkout and clean') {
steps {
timeout(time: 5) {
checkout scm
sh 'build/new-jenkins/docker-cleanup.sh'
sh 'rm -rf ./tmp/spec_failures'
sh 'rm -rf ./tmp/'
}
}
}
@ -65,9 +64,30 @@ pipeline {
stage("Running Selenium Specs") {
steps {
timeout(time: 60) {
sh 'docker-compose exec -T web flakey_spec_catcher --repeat=$FSC_REPEAT_FACTOR'
sh (
script: 'docker-compose exec -T web flakey_spec_catcher --repeat=$FSC_REPEAT_FACTOR --output=/usr/src/app/tmp/fsc.out',
returnStatus: true
)
}
}
}
stage("Copy and Archive output") {
steps {
sh 'mkdir -p tmp'
sh (
script: 'docker cp $(docker-compose ps -q web):/usr/src/app/tmp/fsc.out ./tmp/fsc.out',
returnStatus: true
)
archiveArtifacts(artifacts: 'tmp/fsc.out', allowEmptyArchive: true)
}
}
}
post {
cleanup {
sh 'rm -rf ./tmp/'
sh 'build/new-jenkins/docker-cleanup.sh --allow-failure'
}
}
}