Skip to content

Commit

Permalink
test: remove videos
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinab25 committed Nov 2, 2023
1 parent 9237c03 commit 647977c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ pipeline {
try {
sh '''rm -rf cypress-videos cypress-results cypress-coverage cypress-screenshots'''
sh '''mkdir -p cypress-videos cypress-results cypress-coverage cypress-screenshots'''
sh '''docker cp $IMAGE_NAME-cypress:/app/src/addons/$GIT_NAME/cypress/videos cypress-videos/'''
sh script: '''docker cp $IMAGE_NAME-cypress:/app/src/addons/$GIT_NAME/cypress/videos cypress-videos/''', returnStatus: true
sh '''docker cp $IMAGE_NAME-cypress:/app/src/addons/$GIT_NAME/cypress/reports cypress-results/'''
screenshots = sh script: '''docker cp $IMAGE_NAME-cypress:/app/src/addons/$GIT_NAME/cypress/screenshots cypress-screenshots''', returnStatus: true

Expand All @@ -181,8 +181,7 @@ pipeline {
reportName: 'CypressCoverage',
reportTitles: 'Integration Tests Code Coverage'])
}
sh '''for file in $(find cypress-results -name *.xml); do if [ $(grep -E 'failures="[1-9].*"' $file | wc -l) -eq 0 ]; then testname=$(grep -E 'file=.*failures="0"' $file | sed 's#.* file=".*\\/\\(.*\\.[jsxt]\\+\\)" time.*#\\1#' ); rm -f cypress-videos/videos/$testname.mp4; fi; done'''
archiveArtifacts artifacts: 'cypress-videos/**', fingerprint: true, allowEmptyArchive: true
archiveArtifacts artifacts: 'cypress-videos/**/*.mp4', fingerprint: true, allowEmptyArchive: true
} finally {
catchError(buildResult: 'SUCCESS', stageResult: 'SUCCESS') {
junit testResults: 'cypress-results/**/*.xml', allowEmptyResults: true
Expand Down

0 comments on commit 647977c

Please sign in to comment.