Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #4

Merged
merged 12 commits into from
Dec 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,23 @@ 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).

#### [0.1.3](https://github.com/eea/volto-depiction/compare/0.1.2...0.1.3)

- Correct Cypress tests [`#3`](https://github.com/eea/volto-depiction/pull/3)
- Refs #142010 - Optimize Volto-addons gitflow pipelines [`74874a6`](https://github.com/eea/volto-depiction/commit/74874a699443900f265cb8835d54ea07cfce3008)

#### [0.1.2](https://github.com/eea/volto-depiction/compare/0.1.1...0.1.2)

- Fix README [`dafdaf9`](https://github.com/eea/volto-depiction/commit/dafdaf9600d0297475658ba0ac23a7e4feaaeab1)
> 17 June 2021

- Fix README [`#2`](https://github.com/eea/volto-depiction/pull/2)

#### [0.1.1](https://github.com/eea/volto-depiction/compare/0.1.0...0.1.1)

> 17 June 2021

- Add depiction express-middleware [`#1`](https://github.com/eea/volto-depiction/pull/1)
- [JENKINS] - Fix package.json [`fa4a077`](https://github.com/eea/volto-depiction/commit/fa4a077cb25afcd5988c3120802fd4a633637a04)
- [JENKINS] - Fix pipeline [`ea864c1`](https://github.com/eea/volto-depiction/commit/ea864c12b49affd3b8696f5db03ea8e364d1e62f)
- Fix README [`1f43cb0`](https://github.com/eea/volto-depiction/commit/1f43cb0dfe8c693abf68ce5b981ed5af0d93d3db)
- yarn bootstrap [`ecae0bf`](https://github.com/eea/volto-depiction/commit/ecae0bf1b11b5d5c00d6600524ff38f5923aab35)
- Bump release to 1.0.0 [`5a84a5d`](https://github.com/eea/volto-depiction/commit/5a84a5d1d976e09b08633e504e2812843fd217b6)

#### 0.1.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-depiction"
NAMESPACE = "@eeacms"
SONARQUBE_TAGS = "volto.eea.europa.eu"
SONARQUBE_TAGS = "volto.eea.europa.eu,www.eea.europa.eu-ims,climate-energy.eea.europa.eu,sustainability.eionet.europa.eu,forest.eea.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-depiction",
"version": "0.1.2",
"version": "0.1.3",
"description": "@eeacms/volto-depiction: Volto add-on",
"main": "src/index.js",
"author": "European Environment Agency: IDM2 A-Team",
Expand Down