@@ -14,112 +14,112 @@ pipeline {
14
14
15
15
stages {
16
16
17
- stage(' Integration tests' ) {
18
- parallel {
19
- stage(' Run Cypress: @eeacms/volto-*' ) {
20
- when {
21
- allOf {
22
- environment name : ' CHANGE_ID' , value : ' '
23
- not { branch ' master' }
24
- not { changelog ' .*^Automated release [0-9\\ .]+$' }
25
- not { buildingTag() }
26
- }
27
- }
28
- steps {
29
- node(label : ' docker' ) {
30
- script {
31
- try {
32
- sh ''' docker pull eeacms/eea-website-backend; docker run --rm -d --name="$BUILD_TAG-plone-eeacms" -e SITE="Plone" -e PROFILES="eea.kitkat:testing" eeacms/eea-website-backend'''
33
- sh ''' docker pull eeacms/volto-project-ci; docker run -i --name="$BUILD_TAG-cypress-eeacms" --link $BUILD_TAG-plone-eeacms:plone -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" -e DEPENDENCIES="$DEPENDENCIES" eeacms/volto-project-ci --config-file cypress.eeacms.json'''
34
- } finally {
35
- try {
36
- sh ''' rm -rf cypress-reports cypress-results'''
37
- sh ''' mkdir -p cypress-reports cypress-results'''
38
- sh ''' docker cp $BUILD_TAG-cypress-eeacms:/opt/frontend/my-volto-project/cypress/videos cypress-reports/'''
39
- sh ''' docker cp $BUILD_TAG-cypress-eeacms:/opt/frontend/my-volto-project/cypress/reports cypress-results/'''
40
- sh ''' touch empty_file; for ok_test in $(grep -E 'file=.*failures="0"' $(grep 'testsuites .*failures="0"' $(find cypress-results -name *.xml) empty_file | awk -F: '{print $1}') empty_file | sed 's/.* file="\\ (.*\\ )" time.*/\\ 1/' | sed 's#^node_modules/volto-slate/##g' | sed 's#^node_modules/@eeacms/##g'); do rm -f cypress-reports/videos/$ok_test.mp4; rm -f cypress-reports/$ok_test.mp4; done'''
41
- archiveArtifacts artifacts : ' cypress-reports/**/*.mp4' , fingerprint : true , allowEmptyArchive : true
42
- }
43
- finally {
44
- catchError(buildResult : ' SUCCESS' , stageResult : ' SUCCESS' ) {
45
- junit testResults : ' cypress-results/**/*.xml' , allowEmptyResults : true
46
- }
47
- sh script : " docker stop $BUILD_TAG -plone-eeacms" , returnStatus : true
48
- sh script : " docker rm -v $BUILD_TAG -plone-eeacms" , returnStatus : true
49
- sh script : " docker rm -v $BUILD_TAG -cypress-eeacms" , returnStatus : true
50
- }
51
- }
52
- }
53
- }
54
- }
55
- }
56
-
57
- stage(' Run Cypress: volto-slate' ) {
58
- when {
59
- allOf {
60
- environment name : ' CHANGE_ID' , value : ' '
61
- not { branch ' master' }
62
- not { changelog ' .*^Automated release [0-9\\ .]+$' }
63
- not { buildingTag() }
64
- }
65
- }
66
- steps {
67
- node(label : ' docker' ) {
68
- script {
69
- try {
70
- sh ''' docker pull eeacms/eea-website-backend; docker run --rm -d --name="$BUILD_TAG-plone-slate" -e SITE="Plone" -e PROFILES="eea.kitkat:testing" eeacms/eea-website-backend'''
71
- sh ''' docker pull eeacms/volto-project-ci; docker run -i --name="$BUILD_TAG-cypress-slate" --link $BUILD_TAG-plone-slate:plone -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" -e DEPENDENCIES="$DEPENDENCIES" eeacms/volto-project-ci --config-file cypress.slate.json'''
72
- } finally {
73
- try {
74
- sh ''' rm -rf cypress-reports cypress-results'''
75
- sh ''' mkdir -p cypress-reports cypress-results'''
76
- sh ''' docker cp $BUILD_TAG-cypress-slate:/opt/frontend/my-volto-project/cypress/videos cypress-reports/'''
77
- sh ''' docker cp $BUILD_TAG-cypress-slate:/opt/frontend/my-volto-project/cypress/reports cypress-results/'''
78
- sh ''' touch empty_file; for ok_test in $(grep -E 'file=.*failures="0"' $(grep 'testsuites .*failures="0"' $(find cypress-results -name *.xml) empty_file | awk -F: '{print $1}') empty_file | sed 's/.* file="\\ (.*\\ )" time.*/\\ 1/' | sed 's#^node_modules/volto-slate/##g' | sed 's#^node_modules/@eeacms/##g'); do rm -f cypress-reports/videos/$ok_test.mp4; rm -f cypress-reports/$ok_test.mp4; done'''
79
- archiveArtifacts artifacts : ' cypress-reports/**/*.mp4' , fingerprint : true , allowEmptyArchive : true
80
- }
81
- finally {
82
- catchError(buildResult : ' SUCCESS' , stageResult : ' SUCCESS' ) {
83
- junit testResults : ' cypress-results/**/*.xml' , allowEmptyResults : true
84
- }
85
- sh script : " docker stop $BUILD_TAG -plone-slate" , returnStatus : true
86
- sh script : " docker rm -v $BUILD_TAG -plone-slate" , returnStatus : true
87
- sh script : " docker rm -v $BUILD_TAG -cypress-slate" , returnStatus : true
88
- }
89
- }
90
- }
91
- }
92
- }
93
- }
94
-
95
- stage(" Docker test build" ) {
96
- when {
97
- allOf {
98
- not { changelog ' .*^Automated release [0-9\\ .]+$' }
99
- not { environment name : ' CHANGE_ID' , value : ' ' }
100
- environment name : ' CHANGE_TARGET' , value : ' master'
101
- }
102
- }
103
- environment {
104
- IMAGE_NAME = BUILD_TAG . toLowerCase()
105
- }
106
- steps {
107
- node(label : ' docker-host' ) {
108
- script {
109
- checkout scm
110
- try {
111
- dockerImage = docker. build(" ${ IMAGE_NAME} " , " --no-cache ." )
112
- } finally {
113
- sh script : " docker rmi ${ IMAGE_NAME} " , returnStatus : true
114
- }
115
- }
116
- }
117
- }
118
- }
119
-
120
-
121
- }
122
- }
17
+ // stage('Integration tests') {
18
+ // parallel {
19
+ // stage('Run Cypress: @eeacms/volto-*') {
20
+ // when {
21
+ // allOf {
22
+ // environment name: 'CHANGE_ID', value: ''
23
+ // not { branch 'master' }
24
+ // not { changelog '.*^Automated release [0-9\\.]+$' }
25
+ // not { buildingTag() }
26
+ // }
27
+ // }
28
+ // steps {
29
+ // node(label: 'docker') {
30
+ // script {
31
+ // try {
32
+ // sh '''docker pull eeacms/eea-website-backend; docker run --rm -d --name="$BUILD_TAG-plone-eeacms" -e SITE="Plone" -e PROFILES="eea.kitkat:testing" eeacms/eea-website-backend'''
33
+ // sh '''docker pull eeacms/volto-project-ci; docker run -i --name="$BUILD_TAG-cypress-eeacms" --link $BUILD_TAG-plone-eeacms:plone -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" -e DEPENDENCIES="$DEPENDENCIES" eeacms/volto-project-ci --config-file cypress.eeacms.json'''
34
+ // } finally {
35
+ // try {
36
+ // sh '''rm -rf cypress-reports cypress-results'''
37
+ // sh '''mkdir -p cypress-reports cypress-results'''
38
+ // sh '''docker cp $BUILD_TAG-cypress-eeacms:/opt/frontend/my-volto-project/cypress/videos cypress-reports/'''
39
+ // sh '''docker cp $BUILD_TAG-cypress-eeacms:/opt/frontend/my-volto-project/cypress/reports cypress-results/'''
40
+ // sh '''touch empty_file; for ok_test in $(grep -E 'file=.*failures="0"' $(grep 'testsuites .*failures="0"' $(find cypress-results -name *.xml) empty_file | awk -F: '{print $1}') empty_file | sed 's/.* file="\\(.*\\)" time.*/\\1/' | sed 's#^node_modules/volto-slate/##g' | sed 's#^node_modules/@eeacms/##g'); do rm -f cypress-reports/videos/$ok_test.mp4; rm -f cypress-reports/$ok_test.mp4; done'''
41
+ // archiveArtifacts artifacts: 'cypress-reports/**/*.mp4', fingerprint: true, allowEmptyArchive: true
42
+ // }
43
+ // finally {
44
+ // catchError(buildResult: 'SUCCESS', stageResult: 'SUCCESS') {
45
+ // junit testResults: 'cypress-results/**/*.xml', allowEmptyResults: true
46
+ // }
47
+ // sh script: "docker stop $BUILD_TAG-plone-eeacms", returnStatus: true
48
+ // sh script: "docker rm -v $BUILD_TAG-plone-eeacms", returnStatus: true
49
+ // sh script: "docker rm -v $BUILD_TAG-cypress-eeacms", returnStatus: true
50
+ // }
51
+ // }
52
+ // }
53
+ // }
54
+ // }
55
+ // }
56
+
57
+ // stage('Run Cypress: volto-slate') {
58
+ // when {
59
+ // allOf {
60
+ // environment name: 'CHANGE_ID', value: ''
61
+ // not { branch 'master' }
62
+ // not { changelog '.*^Automated release [0-9\\.]+$' }
63
+ // not { buildingTag() }
64
+ // }
65
+ // }
66
+ // steps {
67
+ // node(label: 'docker') {
68
+ // script {
69
+ // try {
70
+ // sh '''docker pull eeacms/eea-website-backend; docker run --rm -d --name="$BUILD_TAG-plone-slate" -e SITE="Plone" -e PROFILES="eea.kitkat:testing" eeacms/eea-website-backend'''
71
+ // sh '''docker pull eeacms/volto-project-ci; docker run -i --name="$BUILD_TAG-cypress-slate" --link $BUILD_TAG-plone-slate:plone -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" -e DEPENDENCIES="$DEPENDENCIES" eeacms/volto-project-ci --config-file cypress.slate.json'''
72
+ // } finally {
73
+ // try {
74
+ // sh '''rm -rf cypress-reports cypress-results'''
75
+ // sh '''mkdir -p cypress-reports cypress-results'''
76
+ // sh '''docker cp $BUILD_TAG-cypress-slate:/opt/frontend/my-volto-project/cypress/videos cypress-reports/'''
77
+ // sh '''docker cp $BUILD_TAG-cypress-slate:/opt/frontend/my-volto-project/cypress/reports cypress-results/'''
78
+ // sh '''touch empty_file; for ok_test in $(grep -E 'file=.*failures="0"' $(grep 'testsuites .*failures="0"' $(find cypress-results -name *.xml) empty_file | awk -F: '{print $1}') empty_file | sed 's/.* file="\\(.*\\)" time.*/\\1/' | sed 's#^node_modules/volto-slate/##g' | sed 's#^node_modules/@eeacms/##g'); do rm -f cypress-reports/videos/$ok_test.mp4; rm -f cypress-reports/$ok_test.mp4; done'''
79
+ // archiveArtifacts artifacts: 'cypress-reports/**/*.mp4', fingerprint: true, allowEmptyArchive: true
80
+ // }
81
+ // finally {
82
+ // catchError(buildResult: 'SUCCESS', stageResult: 'SUCCESS') {
83
+ // junit testResults: 'cypress-results/**/*.xml', allowEmptyResults: true
84
+ // }
85
+ // sh script: "docker stop $BUILD_TAG-plone-slate", returnStatus: true
86
+ // sh script: "docker rm -v $BUILD_TAG-plone-slate", returnStatus: true
87
+ // sh script: "docker rm -v $BUILD_TAG-cypress-slate", returnStatus: true
88
+ // }
89
+ // }
90
+ // }
91
+ // }
92
+ // }
93
+ // }
94
+
95
+ // stage("Docker test build") {
96
+ // when {
97
+ // allOf {
98
+ // not { changelog '.*^Automated release [0-9\\.]+$' }
99
+ // not { environment name: 'CHANGE_ID', value: '' }
100
+ // environment name: 'CHANGE_TARGET', value: 'master'
101
+ // }
102
+ // }
103
+ // environment {
104
+ // IMAGE_NAME = BUILD_TAG.toLowerCase()
105
+ // }
106
+ // steps {
107
+ // node(label: 'docker-host') {
108
+ // script {
109
+ // checkout scm
110
+ // try {
111
+ // dockerImage = docker.build("${IMAGE_NAME}", "--no-cache .")
112
+ // } finally {
113
+ // sh script: "docker rmi ${IMAGE_NAME}", returnStatus: true
114
+ // }
115
+ // }
116
+ // }
117
+ // }
118
+ // }
119
+
120
+
121
+ // }
122
+ // }
123
123
124
124
125
125
stage(' Pull Request' ) {
0 commit comments