Skip to content

Commit

Permalink
Merge pull request #14 from eea/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
nileshgulia1 authored Dec 10, 2021
2 parents efe13ee + df88624 commit ba5ccbb
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).

#### [4.3.2](https://github.com/eea/volto-group-block/compare/4.3.1...4.3.2)

- Correct Cypress tests [`#13`](https://github.com/eea/volto-group-block/pull/13)
- Refs #142010 - Optimize Volto-addons gitflow pipelines [`bc36cf5`](https://github.com/eea/volto-group-block/commit/bc36cf58c39e2b43c2fbf5189df6ddefc1260857)

#### [4.3.1](https://github.com/eea/volto-group-block/compare/4.3.0...4.3.1)

> 11 October 2021
- Possibility to ignore spaces with maxChars [`#11`](https://github.com/eea/volto-group-block/pull/11)
- No space count [`#10`](https://github.com/eea/volto-group-block/pull/10)

#### [4.3.0](https://github.com/eea/volto-group-block/compare/4.2.3...4.3.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-group-block"
NAMESPACE = "@eeacms"
SONARQUBE_TAGS = "volto.eea.europa.eu,forest.eea.europa.eu,www.eea.europa.eu-ims,climate-energy.eea.europa.eu,sustainability.eionet.europa.eu,biodiversity.europa.eu"
SONARQUBE_TAGS = "volto.eea.europa.eu,forest.eea.europa.eu,www.eea.europa.eu-ims,climate-energy.eea.europa.eu,sustainability.eionet.europa.eu,biodiversity.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-group-block",
"version": "4.3.1",
"version": "4.3.2",
"description": "volto-group-block: Volto block to be used to group other blocks",
"main": "src/index.js",
"author": "European Environment Agency: IDM2 A-Team",
Expand Down

0 comments on commit ba5ccbb

Please sign in to comment.