Get test results
parent
110565662d
commit
935af694eb
|
@ -33,13 +33,14 @@ pipeline {
|
|||
stage('Testing') {
|
||||
steps {
|
||||
echo 'Running Tests....'
|
||||
script {
|
||||
dir('ogWebconsole') {
|
||||
docker.image("${IMAGE_ID}").withRun('-e CHROME_BIN=/usr/bin/chromium -v $(pwd)/karma.conf.js:/app/karma.conf.js -v $(pwd)/.env:/app/.env') { c ->
|
||||
sh 'docekr exec -it ${c.id} ng test --watch=false --source-map=false --karma-config=karma.conf.js --browsers=ChromeHeadless --progress=false'
|
||||
}
|
||||
}
|
||||
}
|
||||
sh """
|
||||
mkdir -p test-results
|
||||
docker run -p 4200:4200 --name oggui-testing -e CHROME_BIN=/usr/bin/chromium -v $(pwd)/karma.conf.js:/app/karma.conf.js -v $(pwd)/.env:/app/.env -d ${IMAGE_ID}"
|
||||
docker exec oggui-testing ng test --watch=false --browsers=ChromeHeadless
|
||||
docker cp oggui-testing:/app/test-results/ogGui-junit-report.xml ./test-results/ogGui-junit-report.xml
|
||||
docker stop oggui-testing
|
||||
docker rm oggui-testing
|
||||
"""
|
||||
}
|
||||
}
|
||||
stage('Push') {
|
||||
|
@ -54,4 +55,16 @@ pipeline {
|
|||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
echo 'Get test results....'
|
||||
xunit (
|
||||
thresholds: [ skipped(failureThreshold: '0') , failed(failureThreshold: '0') ],
|
||||
tools: [ Junit(pattern: './test-results/ogGui-junit-report.xml') ]
|
||||
)
|
||||
echo 'Cleaning up....'
|
||||
sh "docker rmi ${IMAGE_ID}"
|
||||
sh "docker rmi ${LATEST_ID}"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue