Skip to content

Commit

Permalink
Merge pull request #71 from eea/develop
Browse files Browse the repository at this point in the history
Update Jenkinsfile
  • Loading branch information
alecghica authored Oct 11, 2023
2 parents 3ea2004 + 7e34923 commit ba141ac
Show file tree
Hide file tree
Showing 17 changed files with 161 additions and 250 deletions.
36 changes: 26 additions & 10 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,32 @@ All notable changes to this project will be documented in this file. Dates are d

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

### [1.4.0](https://github.com/eea/advisory-board-frontend/compare/1.3.0...1.4.0) - 11 October 2023

#### :rocket: Dependency updates

- Release @eeacms/volto-climate-advisory-board-policy@0.1.44 [EEA Jenkins - [`5bddcc6`](https://github.com/eea/advisory-board-frontend/commit/5bddcc6efd663ab617dae17aa01da783b88d2f84)]
- Release @eeacms/volto-eea-design-system@1.18.3 [EEA Jenkins - [`3fe103d`](https://github.com/eea/advisory-board-frontend/commit/3fe103d5fda6a416c8a0d674f797a8ed3ff0ed41)]
- Release @eeacms/volto-resize-helper@1.3.4 [EEA Jenkins - [`8a230fc`](https://github.com/eea/advisory-board-frontend/commit/8a230fc6d96ca38facb5fcfd5452031e03d224be)]
- Release @eeacms/volto-nextcloud-video-block@0.4.5 [EEA Jenkins - [`1fe012f`](https://github.com/eea/advisory-board-frontend/commit/1fe012fee55de2ff45e12bf3664c9e985e335fac)]
- Release @eeacms/volto-eea-website-theme@1.22.1 [EEA Jenkins - [`d3b572f`](https://github.com/eea/advisory-board-frontend/commit/d3b572f1dfd306e9a411381b6294b040a3ce3d76)]
- Release @eeacms/volto-climate-advisory-board-policy@0.1.43 [EEA Jenkins - [`03b0771`](https://github.com/eea/advisory-board-frontend/commit/03b0771a9ed16a53b1e0ff22c5a814d45cc38dee)]

#### :house: Documentation changes


#### :hammer_and_wrench: Others

- fix cypress test [Cretu Mihaela - [`653a21e`](https://github.com/eea/advisory-board-frontend/commit/653a21e6df9dbedd860107f4f4fbbc06fae7a7f9)]
- fix cypress [Cretu Mihaela - [`8ba0c81`](https://github.com/eea/advisory-board-frontend/commit/8ba0c8109e73243e39bc0dbc950194a55f740817)]
- fix cypress [Cretu Mihaela - [`0779e33`](https://github.com/eea/advisory-board-frontend/commit/0779e3319d00c73cd4d8f4bf6ba36d156a7c0554)]
- modify cypress test and commands file [Cretu Mihaela - [`02da258`](https://github.com/eea/advisory-board-frontend/commit/02da25884077fb2b1869db741c2b970d0091c2f6)]
- fix cypress [Cretu Mihaela - [`dd312a9`](https://github.com/eea/advisory-board-frontend/commit/dd312a934e842ecec6c89ce1f4016eeb15a84eed)]
- fix cypress [Cretu Mihaela - [`93788bd`](https://github.com/eea/advisory-board-frontend/commit/93788bd73fb4739cdc9f7023867ec4705841bede)]
- fix cypress [Cretu Mihaela - [`557e299`](https://github.com/eea/advisory-board-frontend/commit/557e29953609c6be1eb902a05eba42d56059e969)]
- fix cypress [Cretu Mihaela - [`ded1b62`](https://github.com/eea/advisory-board-frontend/commit/ded1b62b494819d1815ba15ff2326913c7e81a26)]
- fix cypress [Cretu Mihaela - [`220eaa6`](https://github.com/eea/advisory-board-frontend/commit/220eaa61e76c86729f61b441ea5bc98517c94690)]
- Update Jenkinsfile [Alexandru Ghica - [`ccf8e38`](https://github.com/eea/advisory-board-frontend/commit/ccf8e382060468f1985e3b842510b27e700e7c0e)]
### [1.3.0](https://github.com/eea/advisory-board-frontend/compare/1.2.0...1.3.0) - 28 September 2023

#### :rocket: Dependency updates
Expand All @@ -15,7 +41,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### :house: Documentation changes

- docs: [JENKINS] Automated badge update of README.md [EEA Jenkins - [`d95c69e`](https://github.com/eea/advisory-board-frontend/commit/d95c69e6e4363756f577a76e881d3883f41656e6)]

### [1.2.0](https://github.com/eea/advisory-board-frontend/compare/1.1.0...1.2.0) - 20 September 2023

Expand All @@ -34,13 +59,11 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### :house: Documentation changes

- docs: [JENKINS] Automated badge update of README.md [EEA Jenkins - [`700d891`](https://github.com/eea/advisory-board-frontend/commit/700d89157c2873393ca5bf631177feb51438d79c)]

### [1.1.0](https://github.com/eea/advisory-board-frontend/compare/1.0.2...1.1.0) - 22 August 2023

#### :house: Documentation changes

- docs: [JENKINS] Automated badge update of README.md [EEA Jenkins - [`b77c902`](https://github.com/eea/advisory-board-frontend/commit/b77c90274759aca8528507c3ec8eb83ded1eb1f4)]

### [1.0.2](https://github.com/eea/advisory-board-frontend/compare/1.0.1...1.0.2) - 21 August 2023

Expand All @@ -54,12 +77,9 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### :house: Internal changes

- chore: [YARN] Automated update of yarn.lock [EEA Jenkins - [`5690794`](https://github.com/eea/advisory-board-frontend/commit/56907943bf28541a5df72f2cf26b7f3a5ee28a51)]

#### :house: Documentation changes

- docs: [JENKINS] Automated badge update of README.md [EEA Jenkins - [`5d961c7`](https://github.com/eea/advisory-board-frontend/commit/5d961c77f074434c90905086a55fa24ed7c7dacc)]
- docs: [JENKINS] Automated badge update of README.md [EEA Jenkins - [`6c87726`](https://github.com/eea/advisory-board-frontend/commit/6c87726ef580959f78d964ebad8b904254b6ad2c)]

#### :hammer_and_wrench: Others

Expand All @@ -76,11 +96,9 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### :house: Internal changes

- chore: [YARN] Automated update of yarn.lock [EEA Jenkins - [`5690794`](https://github.com/eea/advisory-board-frontend/commit/56907943bf28541a5df72f2cf26b7f3a5ee28a51)]

#### :house: Documentation changes

- docs: [JENKINS] Automated badge update of README.md [EEA Jenkins - [`6c87726`](https://github.com/eea/advisory-board-frontend/commit/6c87726ef580959f78d964ebad8b904254b6ad2c)]

### [0.53.0](https://github.com/eea/advisory-board-frontend/compare/0.52.0...0.53.0) - 8 August 2023

Expand All @@ -100,7 +118,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### :house: Documentation changes

- docs: [JENKINS] Automated badge update of README.md [EEA Jenkins - [`d5e2d63`](https://github.com/eea/advisory-board-frontend/commit/d5e2d6393af7a6f275c9158c1584c833324c7f3c)]

### [0.52.0](https://github.com/eea/advisory-board-frontend/compare/0.51.0...0.52.0) - 23 June 2023

Expand Down Expand Up @@ -130,7 +147,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### :house: Documentation changes

- docs: [JENKINS] Automated badge update of README.md [EEA Jenkins - [`6f374e2`](https://github.com/eea/advisory-board-frontend/commit/6f374e2df1b040ff41c4b2d2bc165c129e7fe4fd)]

#### :hammer_and_wrench: Others

Expand Down
106 changes: 53 additions & 53 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,62 +14,62 @@ pipeline {

stages {

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

// "Cypress": {
// node(label: 'docker') {
// script {
// try {
// sh '''docker pull eeacms/plone-backend; docker run --rm -d --name="$BUILD_TAG-plone" -e SITE="Plone" -e PROFILES="eea.kitkat:testing" eeacms/plone-backend'''
// sh '''docker pull eeacms/volto-project-ci; docker run -i --name="$BUILD_TAG-cypress" --link $BUILD_TAG-plone:plone -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" -e DEPENDENCIES="$DEPENDENCIES" eeacms/volto-project-ci'''
// } finally {
// try {
// sh '''rm -rf cypress-reports cypress-results cypress-coverage'''
// sh '''mkdir -p cypress-reports cypress-results cypress-coverage'''
// 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/'''
// coverage = sh script: '''docker cp $BUILD_TAG-cypress:/opt/frontend/my-volto-project/coverage cypress-coverage/''', returnStatus: true
// if ( coverage == 0 ) {
// publishHTML (target : [allowMissing: false,
// alwaysLinkToLastBuild: true,
// keepAll: true,
// reportDir: 'cypress-coverage/coverage/lcov-report',
// reportFiles: 'index.html',
// reportName: 'CypressCoverage',
// reportTitles: 'Integration Tests Code Coverage'])
// }
// 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#^cypress/integration/##g' | sed 's#^../../../node_modules/@eeacms/##g'); do rm -f cypress-reports/videos/$ok_test.mp4; rm -f cypress-reports/$ok_test.mp4; done'''
// archiveArtifacts artifacts: 'cypress-reports/**/*.mp4', fingerprint: true, allowEmptyArchive: true
// stash name: "cypress-coverage", includes: "cypress-coverage/**", allowEmpty: 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
"Cypress": {
node(label: 'docker') {
script {
try {
sh '''docker pull eeacms/plone-backend; docker run --rm -d --name="$BUILD_TAG-plone" -e SITE="Plone" -e PROFILES="eea.kitkat:testing" eeacms/plone-backend'''
sh '''docker pull eeacms/volto-project-ci; docker run -i --name="$BUILD_TAG-cypress" --link $BUILD_TAG-plone:plone -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" -e DEPENDENCIES="$DEPENDENCIES" eeacms/volto-project-ci'''
} finally {
try {
sh '''rm -rf cypress-reports cypress-results cypress-coverage'''
sh '''mkdir -p cypress-reports cypress-results cypress-coverage'''
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/'''
coverage = sh script: '''docker cp $BUILD_TAG-cypress:/opt/frontend/my-volto-project/coverage cypress-coverage/''', returnStatus: true
if ( coverage == 0 ) {
publishHTML (target : [allowMissing: false,
alwaysLinkToLastBuild: true,
keepAll: true,
reportDir: 'cypress-coverage/coverage/lcov-report',
reportFiles: 'index.html',
reportName: 'CypressCoverage',
reportTitles: 'Integration Tests Code Coverage'])
}
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#^cypress/integration/##g' | sed 's#^../../../node_modules/@eeacms/##g'); do rm -f cypress-reports/videos/$ok_test.mp4; rm -f cypress-reports/$ok_test.mp4; done'''
archiveArtifacts artifacts: 'cypress-reports/**/*.mp4', fingerprint: true, allowEmptyArchive: true
stash name: "cypress-coverage", includes: "cypress-coverage/**", allowEmpty: 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('Pull Request') {
when {
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![Release](https://img.shields.io/github/v/release/eea/advisory-board-frontend?sort=semver)](https://github.com/eea/advisory-board-frontend/releases)
[![Pipeline](https://ci.eionet.europa.eu/buildStatus/icon?job=volto%2Fadvisory-board-frontend%2Fmaster&subject=master)](https://ci.eionet.europa.eu/view/Github/job/volto/job/advisory-board-frontend/job/master/lastBuild/display/redirect)
[![Pipeline](https://ci.eionet.europa.eu/buildStatus/icon?job=volto%2Fadvisory-board-frontend%2Fdevelop&subject=develop)](https://ci.eionet.europa.eu/view/Github/job/volto/job/advisory-board-frontend/job/develop/lastBuild/display/redirect)
[![Release pipeline](https://ci.eionet.europa.eu/buildStatus/icon?job=volto%2Fadvisory-board-frontend%2F1.3.0&build=last&subject=release%20v1.3.0%20pipeline)](https://ci.eionet.europa.eu/view/Github/job/volto/job/advisory-board-frontend/job/1.3.0/lastBuild/display/redirect/)
[![Release pipeline](https://ci.eionet.europa.eu/buildStatus/icon?job=volto%2Fadvisory-board-frontend%2F1.4.0&build=last&subject=release%20v1.4.0%20pipeline)](https://ci.eionet.europa.eu/view/Github/job/volto/job/advisory-board-frontend/job/1.4.0/lastBuild/display/redirect/)


## Documentation
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/01-block-basics.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ describe('Blocks Tests', () => {

cy.get('.documentFirstHeading').contains('My Add-on Page');

cy.getSlate().click();
cy.getSlate().click({force: true});

// Add block
cy.get('.ui.basic.icon.button.block-add-button').first().click();
cy.get('.ui.basic.icon.button.block-add-button').first().click({force: true});
cy.get('.blocks-chooser .title').contains('Media').click();
cy.get('.content.active.media .button.image').contains('Image').click();

Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/01-block-columns.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ describe('Blocks Tests', () => {

cy.get('.documentFirstHeading').contains('My Add-on Page');

cy.getSlate().click();
cy.getSlate().click({force: true});

// Add block
cy.get('.ui.basic.icon.button.block-add-button').first().click();
cy.get('.ui.basic.icon.button.block-add-button').first().click({force: true});
cy.get('.blocks-chooser .title').contains('Common').click();
cy.get('.content.active.common .button.columnsBlock')
.contains('Columns')
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/01-block-group.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ describe('Blocks Tests', () => {

cy.get('.documentFirstHeading').contains('My Add-on Page');

cy.getSlate().click();
cy.getSlate().click({force: true});

// Add block
cy.get('.ui.basic.icon.button.block-add-button').first().click();
cy.get('.ui.basic.icon.button.block-add-button').first().click({force: true});
cy.get('.blocks-chooser .title').contains('Common').click();
cy.get('.content.active.common .button.group')
.contains('Section (Group)')
Expand Down
41 changes: 0 additions & 41 deletions cypress/e2e/01-block-slate-metadata-mentions.cy.js

This file was deleted.

8 changes: 4 additions & 4 deletions cypress/e2e/01-block-tabs.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ describe('Blocks Tests', () => {

cy.get('.documentFirstHeading').contains('My Add-on Page');

cy.getSlate().click();
cy.getSlate().click({force: true});

// Add block
cy.get('.ui.basic.icon.button.block-add-button').first().click();
cy.get('.ui.basic.icon.button.block-add-button').first().click({force: true});
cy.get('.blocks-chooser .title').contains('Media').click();
cy.get('.content.active.media .button.image').contains('Image').click();

cy.getSlate().click();

cy.get('.ui.basic.icon.button.block-add-button').first().click();
cy.get('.ui.basic.icon.button.block-add-button').first().click({force: true});
cy.get('.blocks-chooser .title').contains('Common').click();
cy.get('.content.active.common .button.tabs_block')
.contains('Tabs')
Expand All @@ -44,7 +44,7 @@ describe('Blocks Tests', () => {
cy.get('.tabs-block.edit [contenteditable=true]').first().type('Oxygen');

cy.getSlate().click();
cy.get('.ui.basic.icon.button.block-add-button').first().click();
cy.get('.ui.basic.icon.button.block-add-button').first().click({force: true});
cy.get('.blocks-chooser .title').contains('Common').click();
cy.get('.content.active.common .button.tabs_block')
.contains('Tabs')
Expand Down
12 changes: 6 additions & 6 deletions cypress/e2e/01-blocks-accordion.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ describe('Blocks Tests', () => {

cy.get('.documentFirstHeading').contains('My Add-on Page');

cy.getSlate().click();
cy.getSlate().click({force: true});

// Add metadata block
cy.get('.ui.basic.icon.button.block-add-button').first().click();
cy.get('.ui.basic.icon.button.block-add-button').first().click({force: true});
cy.get('.blocks-chooser .title').contains('Common').click();
cy.get('.content.active.common .button.accordion')
.contains('Accordion')
Expand All @@ -34,10 +34,10 @@ describe('Blocks Tests', () => {

cy.get('.documentFirstHeading').contains('My Add-on Page');

cy.getSlate().click();
cy.getSlate().click({force: true});

// Add accordion block
cy.get('.ui.basic.icon.button.block-add-button').first().click();
cy.get('.ui.basic.icon.button.block-add-button').first().click({force: true});
cy.get('.blocks-chooser .title').contains('Common').click();
cy.get('.content.active.common .button.accordion')
.contains('Accordion')
Expand Down Expand Up @@ -71,10 +71,10 @@ describe('Blocks Tests', () => {

cy.get('.documentFirstHeading').contains('My Add-on Page');

cy.getSlate().click();
cy.getSlate().click({force: true});

// Add block
cy.get('.ui.basic.icon.button.block-add-button').first().click();
cy.get('.ui.basic.icon.button.block-add-button').first().click({force: true});
cy.get('.blocks-chooser .title').contains('Common').click();
cy.get('.content.active.common .button.accordion')
.contains('Accordion')
Expand Down
Loading

0 comments on commit ba141ac

Please sign in to comment.