Skip to content
This repository has been archived by the owner on May 31, 2021. It is now read-only.

Commit

Permalink
enable integration testing
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinab25 committed May 5, 2021
1 parent 9050c1a commit 5e71b8c
Showing 1 changed file with 22 additions and 23 deletions.
45 changes: 22 additions & 23 deletions Jenkinsfile
Expand Up @@ -70,30 +70,29 @@ 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 plone/volto-addon-ci; docker run -i --name="$BUILD_TAG-cypress" --link $BUILD_TAG-plone:plone -e NAMESPACE="$NAMESPACE" -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" plone/volto-addon-ci 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('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 plone/volto-addon-ci; docker run -i --name="$BUILD_TAG-cypress" --link $BUILD_TAG-plone:plone -e NAMESPACE="$NAMESPACE" -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" plone/volto-addon-ci 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
Expand Down

0 comments on commit 5e71b8c

Please sign in to comment.