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

Commit

Permalink
Merge pull request #9 from eea/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
tiberiuichim committed Dec 10, 2021
2 parents 70f3ec7 + 1617cea commit 0e7e65e
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 34 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,16 @@ 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).

#### [3.0.2](https://github.com/eea/volto-widgets-view/compare/3.0.1...3.0.2)

- Correct Cypress tests [`#8`](https://github.com/eea/volto-widgets-view/pull/8)
- Refs #142010 - Optimize Volto-addons gitflow pipelines [`1820d1b`](https://github.com/eea/volto-widgets-view/commit/1820d1b968813be6510243468dd6df430a8655d1)

#### [3.0.1](https://github.com/eea/volto-widgets-view/compare/3.0.0...3.0.1)

> 19 October 2021
- Consider dateLocale config. [`#7`](https://github.com/eea/volto-widgets-view/pull/7)
- Add date locale config settings [`f425e19`](https://github.com/eea/volto-widgets-view/commit/f425e1980697f519cd8b0a26ae6945fbcbfc821d)

### [3.0.0](https://github.com/eea/volto-widgets-view/compare/2.1.2...3.0.0)
Expand Down
67 changes: 44 additions & 23 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,37 @@ pipeline {
environment {
GIT_NAME = "volto-widgets-view"
NAMESPACE = "@eeacms"
SONARQUBE_TAGS = "volto.eea.europa.eu,forest.eea.europa.eu,biodiversity.europa.eu,www.eea.europa.eu-ims,climate-energy.eea.europa.eu,sustainability.eionet.europa.eu,clms.land.copernicus.eu"
SONARQUBE_TAGS = "volto.eea.europa.eu,forest.eea.europa.eu,biodiversity.europa.eu,www.eea.europa.eu-ims,climate-energy.eea.europa.eu,sustainability.eionet.europa.eu,clms.land.copernicus.eu,industry.eea.europa.eu"
DEPENDENCIES = ""
}

stages {

stage('Release') {
when {
allOf {
environment name: 'CHANGE_ID', value: ''
branch 'master'
}
}
steps {
node(label: 'docker') {
withCredentials([string(credentialsId: 'eea-jenkins-token', variable: 'GITHUB_TOKEN'),string(credentialsId: 'eea-jenkins-npm-token', variable: 'NPM_TOKEN')]) {
sh '''docker pull eeacms/gitflow'''
sh '''docker run -i --rm --name="$BUILD_TAG-gitflow-master" -e GIT_BRANCH="$BRANCH_NAME" -e GIT_NAME="$GIT_NAME" -e GIT_TOKEN="$GITHUB_TOKEN" -e NPM_TOKEN="$NPM_TOKEN" -e LANGUAGE=javascript eeacms/gitflow'''
}
}
}
}

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

Expand All @@ -36,6 +60,12 @@ pipeline {
}

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

Expand Down Expand Up @@ -75,6 +105,12 @@ pipeline {
}

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

Expand Down Expand Up @@ -122,11 +158,13 @@ pipeline {
}

stage('Report to SonarQube') {
// Exclude Pull-Requests
when {
allOf {
environment name: 'CHANGE_ID', value: ''
}
anyOf {
branch 'master'
branch 'develop'
}
not { changelog '.*^Automated release [0-9\\.]+$' }
}
steps {
node(label: 'swarm') {
Expand Down Expand Up @@ -156,8 +194,8 @@ pipeline {
steps {
node(label: 'docker') {
script {
if ( env.CHANGE_BRANCH != "develop" && !( env.CHANGE_BRANCH.startsWith("hotfix")) ) {
error "Pipeline aborted due to PR not made from develop or hotfix branch"
if ( env.CHANGE_BRANCH != "develop" ) {
error "Pipeline aborted due to PR not made from develop branch"
}
withCredentials([string(credentialsId: 'eea-jenkins-token', variable: 'GITHUB_TOKEN')]) {
sh '''docker pull eeacms/gitflow'''
Expand All @@ -168,23 +206,6 @@ pipeline {
}
}

stage('Release') {
when {
allOf {
environment name: 'CHANGE_ID', value: ''
branch 'master'
}
}
steps {
node(label: 'docker') {
withCredentials([string(credentialsId: 'eea-jenkins-token', variable: 'GITHUB_TOKEN'),string(credentialsId: 'eea-jenkins-npm-token', variable: 'NPM_TOKEN')]) {
sh '''docker pull eeacms/gitflow'''
sh '''docker run -i --rm --name="$BUILD_TAG-gitflow-master" -e GIT_BRANCH="$BRANCH_NAME" -e GIT_NAME="$GIT_NAME" -e GIT_TOKEN="$GITHUB_TOKEN" -e NPM_TOKEN="$NPM_TOKEN" -e LANGUAGE=javascript eeacms/gitflow'''
}
}
}
}

}

post {
Expand Down
19 changes: 10 additions & 9 deletions cypress/integration/block-basics.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,17 @@ describe('Blocks Tests', () => {
afterEach(tearDownAfterEach);

it('Add Block: Empty', () => {
// without this the clear command below does nothing sometimes
cy.wait(500);

// Change page title
cy.get('.documentFirstHeading > .public-DraftStyleDefault-block')
.clear()
.type('My Add-on Page')
.get('.documentFirstHeading span[data-text]')
.contains('My Add-on Page');

cy.get('.documentFirstHeading > .public-DraftStyleDefault-block').type(
'{enter}',
);
cy.get('[contenteditable=true]').first().clear();

cy.get('[contenteditable=true]').first().type('My Add-on Page');

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

cy.get('[contenteditable=true]').first().type('{enter}');

// Add block
cy.get('.ui.basic.icon.button.block-add-button').first().click();
Expand Down
2 changes: 1 addition & 1 deletion cypress/support/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const setupBeforeEach = () => {
cy.waitForResourceToLoad('@types');
cy.waitForResourceToLoad('my-page');
cy.navigate('/cypress/my-page/edit');
cy.get(`.block.title [data-contents]`);
cy.get(`.block.title h1`);
};

export const tearDownAfterEach = () => {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@eeacms/volto-widgets-view",
"version": "3.0.1",
"version": "3.0.2",
"description": "Volto Widgets in View mode",
"main": "src/index.js",
"author": "European Environment Agency: IDM2 A-Team",
Expand Down

0 comments on commit 0e7e65e

Please sign in to comment.