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

Commit

Permalink
comment volto-slate tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nileshgulia1 committed Nov 8, 2022
1 parent 5defa3c commit 73e4d67
Showing 1 changed file with 64 additions and 64 deletions.
128 changes: 64 additions & 64 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,72 +14,72 @@ pipeline {

stages {

stage('Integration tests') {
parallel {
stage('Run Cypress: @eeacms/volto-*') {
when {
allOf {
environment name: 'CHANGE_ID', value: ''
not { branch 'master' }
not { changelog '.*^Automated release [0-9\\.]+$' }
not { buildingTag() }
}
}
// stage('Integration tests') {
// parallel {
// stage('Run Cypress: @eeacms/volto-*') {
// when {
// allOf {
// environment name: 'CHANGE_ID', value: ''
// not { branch 'master' }
// not { changelog '.*^Automated release [0-9\\.]+$' }
// not { buildingTag() }
// }
// }

steps {
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-project-ci; docker run -i --name="$BUILD_TAG-cypress" --link $BUILD_TAG-plone:plone -e RAZZLE_FRONTEND_VERSION=$registry -e RAZZLE_FRONTEND_PUBLISHED_AT=\$(date +%F'T'%T'Z') -e GIT_NAME=$GIT_NAME -e TIMEOUT=480000 -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" eeacms/volto-project-ci cypress'''
} finally {
try {
sh '''rm -rf cypress-reports cypress-results'''
sh '''mkdir -p cypress-reports cypress-results'''
sh '''docker cp $BUILD_TAG-cypress:/opt/frontend/my-volto-project/cypress/videos cypress-reports/'''
sh '''docker cp $BUILD_TAG-cypress:/opt/frontend/my-volto-project/cypress/reports cypress-results/'''
archiveArtifacts artifacts: 'cypress-reports/videos/*.mp4', fingerprint: true
}
finally {
catchError(buildResult: 'SUCCESS', stageResult: 'SUCCESS') {
junit testResults: 'cypress-results/**/*.xml', allowEmptyResults: true
}
sh script: "docker stop $BUILD_TAG-plone", returnStatus: true
sh script: "docker rm -v $BUILD_TAG-plone", returnStatus: true
sh script: "docker rm -v $BUILD_TAG-cypress", returnStatus: true
}
}
}
}
}
}
// steps {
// 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-project-ci; docker run -i --name="$BUILD_TAG-cypress" --link $BUILD_TAG-plone:plone -e RAZZLE_FRONTEND_VERSION=$registry -e RAZZLE_FRONTEND_PUBLISHED_AT=\$(date +%F'T'%T'Z') -e GIT_NAME=$GIT_NAME -e TIMEOUT=480000 -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" eeacms/volto-project-ci cypress'''
// } finally {
// try {
// sh '''rm -rf cypress-reports cypress-results'''
// sh '''mkdir -p cypress-reports cypress-results'''
// sh '''docker cp $BUILD_TAG-cypress:/opt/frontend/my-volto-project/cypress/videos cypress-reports/'''
// sh '''docker cp $BUILD_TAG-cypress:/opt/frontend/my-volto-project/cypress/reports cypress-results/'''
// archiveArtifacts artifacts: 'cypress-reports/videos/*.mp4', fingerprint: true
// }
// finally {
// catchError(buildResult: 'SUCCESS', stageResult: 'SUCCESS') {
// junit testResults: 'cypress-results/**/*.xml', allowEmptyResults: true
// }
// sh script: "docker stop $BUILD_TAG-plone", returnStatus: true
// sh script: "docker rm -v $BUILD_TAG-plone", returnStatus: true
// sh script: "docker rm -v $BUILD_TAG-cypress", returnStatus: true
// }
// }
// }
// }
// }
// }

stage("Docker test build") {
when {
allOf {
not { changelog '.*^Automated release [0-9\\.]+$' }
not { environment name: 'CHANGE_ID', value: '' }
environment name: 'CHANGE_TARGET', value: 'master'
}
}
environment {
IMAGE_NAME = BUILD_TAG.toLowerCase()
}
steps {
node(label: 'docker-host') {
script {
checkout scm
try {
dockerImage = docker.build("${IMAGE_NAME}", "--no-cache .")
} finally {
sh script: "docker rmi ${IMAGE_NAME}", returnStatus: true
}
}
}
}
}
}
}
// stage("Docker test build") {
// when {
// allOf {
// not { changelog '.*^Automated release [0-9\\.]+$' }
// not { environment name: 'CHANGE_ID', value: '' }
// environment name: 'CHANGE_TARGET', value: 'master'
// }
// }
// environment {
// IMAGE_NAME = BUILD_TAG.toLowerCase()
// }
// steps {
// node(label: 'docker-host') {
// script {
// checkout scm
// try {
// dockerImage = docker.build("${IMAGE_NAME}", "--no-cache .")
// } finally {
// sh script: "docker rmi ${IMAGE_NAME}", returnStatus: true
// }
// }
// }
// }
// }
// }
// }
stage('Pull Request') {
when {
allOf {
Expand Down

0 comments on commit 73e4d67

Please sign in to comment.