Skip to content

Commit

Permalink
[JENKINS] - Run cypress tests
Browse files Browse the repository at this point in the history
  • Loading branch information
avoinea committed Dec 2, 2020
1 parent 3f31e74 commit f665ff3
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,31 @@ pipeline {
}
}

stage('Integration tests') {
steps {
parallel(

"Cypress": {
node(label: 'docker') {
script {
try {
sh '''docker pull plone; docker run -d --name="$BUILD_TAG-plone" -e SITE="Plone" -e PROFILES="profile-plone.restapi:blocks" plone fg'''
sh '''docker pull eeacms/volto-test; docker run -i --name="$BUILD_TAG-cypress" --link $BUILD_TAG-plone:plone -e NAMESPACE="$NAMESPACE" -e DEPENDENCIES="$DEPENDENCIES" -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" eeacms/volto-test cypress'''
} finally {
sh '''mkdir -p cypress-reports'''
sh '''docker cp $BUILD_TAG-cypress:/opt/frontend/my-volto-project/src/addons/$GIT_NAME/cypress/videos cypress-reports/'''
stash name: "cypress-reports", includes: "cypress-reports/**/*"
archiveArtifacts artifacts: 'cypress-reports/videos/*.mp4', fingerprint: true
sh '''echo "$(docker stop $BUILD_TAG-plone; docker rm -v $BUILD_TAG-plone; docker rm -v $BUILD_TAG-cypress)" '''
}
}
}
}

)
}
}

stage('Report to SonarQube') {
// Exclude Pull-Requests
when {
Expand Down

0 comments on commit f665ff3

Please sign in to comment.