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

Commit

Permalink
Merge branch 'develop' into redesign
Browse files Browse the repository at this point in the history
  • Loading branch information
danielamormocea authored Nov 26, 2021
2 parents 889b6a2 + 56a6c7b commit ae235c9
Show file tree
Hide file tree
Showing 27 changed files with 871 additions and 590 deletions.
98 changes: 97 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,108 @@ 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.9](https://github.com/eea/volto-forests-theme/compare/0.1.8...0.1.9)
#### [0.1.20](https://github.com/eea/volto-forests-theme/compare/0.1.19...0.1.20)

- update logo, plotly colour scheme and theme colours [`#23`](https://github.com/eea/volto-forests-theme/pull/23)
- fix [`bd6b8b3`](https://github.com/eea/volto-forests-theme/commit/bd6b8b39b259e9b04d51111adf6df789908232d0)

#### [0.1.19](https://github.com/eea/volto-forests-theme/compare/0.1.18...0.1.19)

> 24 November 2021
- Develop [`#24`](https://github.com/eea/volto-forests-theme/pull/24)
- Prettier fix lint [`12bc882`](https://github.com/eea/volto-forests-theme/commit/12bc882f9cf9bca011bcf94f053c5e19914af678)
- Fix styles lint [`af7ed16`](https://github.com/eea/volto-forests-theme/commit/af7ed16718d8c5a60c63db61788563d63533c8f7)
- Add more color sets [`9375225`](https://github.com/eea/volto-forests-theme/commit/9375225921d889c5bd191cf35aaf015b560dfaf0)
- Refs #142010 - Optimize Volto-addons gitflow pipelines [`d81fb94`](https://github.com/eea/volto-forests-theme/commit/d81fb941ef732c980abdcc4111c8317062f13088)

#### [0.1.18](https://github.com/eea/volto-forests-theme/compare/0.1.17...0.1.18)

> 23 November 2021
- Develop [`#22`](https://github.com/eea/volto-forests-theme/pull/22)
- Add FISE colors in slate styles [`2921654`](https://github.com/eea/volto-forests-theme/commit/2921654debf224c8ffdaf325f3ca3180ee9dc323)
- More limits to Lead nav [`0b5a328`](https://github.com/eea/volto-forests-theme/commit/0b5a328ac6b00ff60f2d4fa894d5cf131f5ce6a2)

#### [0.1.17](https://github.com/eea/volto-forests-theme/compare/0.1.16...0.1.17)

> 23 November 2021
- More limits to Lead nav [`#21`](https://github.com/eea/volto-forests-theme/pull/21)

#### [0.1.16](https://github.com/eea/volto-forests-theme/compare/0.1.15...0.1.16)

> 22 November 2021
- Fill page width & lower limits on Lead Navigation [`#20`](https://github.com/eea/volto-forests-theme/pull/20)

#### [0.1.15](https://github.com/eea/volto-forests-theme/compare/0.1.14...0.1.15)

> 22 November 2021
- Show full page title on truncated text [`#19`](https://github.com/eea/volto-forests-theme/pull/19)

#### [0.1.14](https://github.com/eea/volto-forests-theme/compare/0.1.13...0.1.14)

> 19 November 2021
- Lead navigation responsive updates [`#18`](https://github.com/eea/volto-forests-theme/pull/18)
- NavigationLead variable items dep on width & fixed widths [`8283528`](https://github.com/eea/volto-forests-theme/commit/82835288bce93dc00f6ebb9f097f6675e4a74fe9)
- Lead nav w fixed items & dimensions [`a8c810e`](https://github.com/eea/volto-forests-theme/commit/a8c810efc9f6fa8f73b366750df41236798b6464)

#### [0.1.13](https://github.com/eea/volto-forests-theme/compare/0.1.12...0.1.13)

> 18 November 2021
- Lead Image updates [`#17`](https://github.com/eea/volto-forests-theme/pull/17)

#### [0.1.12](https://github.com/eea/volto-forests-theme/compare/0.1.11...0.1.12)

> 17 November 2021
- standalone slate-inline styles [`#16`](https://github.com/eea/volto-forests-theme/pull/16)
- Update README.md [`0423c59`](https://github.com/eea/volto-forests-theme/commit/0423c591edb17226d7b3c8d4781770f6af7b0463)
- use standalone slate-inline stlyes [`53422fe`](https://github.com/eea/volto-forests-theme/commit/53422fe68677953b0c46079c388e912968f18928)
- fix anchor color [`332d681`](https://github.com/eea/volto-forests-theme/commit/332d681a6e6683030cf02089aaa49d3fdb07c524)
- anchor color [`c981adb`](https://github.com/eea/volto-forests-theme/commit/c981adb70b34e526bc573d135c3b7999c1fe485e)

#### [0.1.11](https://github.com/eea/volto-forests-theme/compare/0.1.10...0.1.11)

> 16 November 2021
- fix issue in config [`#15`](https://github.com/eea/volto-forests-theme/pull/15)
- fix logo issue and nav block issue [`#10`](https://github.com/eea/volto-forests-theme/pull/10)
- Update package.json [`#14`](https://github.com/eea/volto-forests-theme/pull/14)
- fix source formatting color of <a> in slate inline style [`1128f18`](https://github.com/eea/volto-forests-theme/commit/1128f18e7ba439f321100d63d163fb5585e74579)
- cy: more fixes [`0b48880`](https://github.com/eea/volto-forests-theme/commit/0b488801aafaed393a0c3c2ae16d237e9122319d)
- fix tests [`5c8d3c1`](https://github.com/eea/volto-forests-theme/commit/5c8d3c1f4bfedba9df337f8a1bd728b224cdf207)
- load addon in config [`c8fd0dc`](https://github.com/eea/volto-forests-theme/commit/c8fd0dc5af9f3433156c14857b54ef68f4b84bd4)
- fix config resolving [`dbb965c`](https://github.com/eea/volto-forests-theme/commit/dbb965cd53570b4b16c309f97ed6ad5f1d536597)
- remove volto-addons-forest [`53a0d65`](https://github.com/eea/volto-forests-theme/commit/53a0d65a1b0b5415449633fcaf24bfa85cb361b0)
- relative import [`8ccb73b`](https://github.com/eea/volto-forests-theme/commit/8ccb73b44e706a630455765015d5cd23a093987a)
- support runtime vars in addon itself [`29ce50f`](https://github.com/eea/volto-forests-theme/commit/29ce50f8486a3930a47fccd4078607a06f660dd1)
- fix cypress [`57a3005`](https://github.com/eea/volto-forests-theme/commit/57a30053c76260f70fe4e99f311c77ae5ca113c1)
- add required env vars [`59ae093`](https://github.com/eea/volto-forests-theme/commit/59ae093410487f59cda9561633c416deee0d2216)
- also run cypress [`378720d`](https://github.com/eea/volto-forests-theme/commit/378720d0d7e9e3b70dd418ea98f046559fd2c625)
- fix bugs [`553baab`](https://github.com/eea/volto-forests-theme/commit/553baab27881d9b0845b38e8ad2ae92bc602e2cd)
- prettier [`07d7ef0`](https://github.com/eea/volto-forests-theme/commit/07d7ef0639c135241196fa844a1e30a3c3ba0ec5)

#### [0.1.10](https://github.com/eea/volto-forests-theme/compare/0.1.9...0.1.10)

> 11 November 2021
- `volto-slate="*"` [`#13`](https://github.com/eea/volto-forests-theme/pull/13)
- Update package.json [`e86518b`](https://github.com/eea/volto-forests-theme/commit/e86518b11b3716750eddf3158bc2b5ed7b22c455)
- update volto-slate [`7248c0f`](https://github.com/eea/volto-forests-theme/commit/7248c0f0db2916f3a98d2f360e0da462545c49a9)
- remove api_path [`99418ac`](https://github.com/eea/volto-forests-theme/commit/99418ac02dfb0adb6af39c5e4a1e64a928070748)
- api_path [`1542048`](https://github.com/eea/volto-forests-theme/commit/1542048c90ee77e9ffc92a87f64856adad981af0)

#### [0.1.9](https://github.com/eea/volto-forests-theme/compare/0.1.8...0.1.9)

> 11 November 2021
- use latest volto-slate [`#12`](https://github.com/eea/volto-forests-theme/pull/12)

#### [0.1.8](https://github.com/eea/volto-forests-theme/compare/0.1.7...0.1.8)

> 10 November 2021
Expand Down
171 changes: 97 additions & 74 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,20 @@ pipeline {
environment {
GIT_NAME = "volto-forests-theme"
NAMESPACE = "@eeacms"
SONARQUBE_TAGS = "volto.eea.europa.eu"
SONARQUBE_TAGS = "volto.eea.europa.eu,forest.eea.europa.eu"
DEPENDENCIES = ""
}

stages {

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

Expand All @@ -36,6 +43,13 @@ pipeline {
}

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

Expand Down Expand Up @@ -74,77 +88,86 @@ pipeline {
}
}

// stage('Integration tests') {
// steps {
// parallel(

// "Cypress": {
// node(label: 'docker') {
// script {
// try {
// sh '''docker pull plone; docker run -d --name="$BUILD_TAG-plone" -e SITE="Plone" -e PROFILES="profile-plone.restapi:blocks" plone fg'''
// sh '''docker pull plone/volto-addon-ci; docker run -i --name="$BUILD_TAG-cypress" --link $BUILD_TAG-plone:plone -e NAMESPACE="$NAMESPACE" -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" -e DEPENDENCIES="$DEPENDENCIES" plone/volto-addon-ci cypress'''
// } 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/src/addons/$GIT_NAME/cypress/videos cypress-reports/'''
// sh '''docker cp $BUILD_TAG-cypress:/opt/frontend/my-volto-project/src/addons/$GIT_NAME/cypress/reports cypress-results/'''
// coverage = sh script: '''docker cp $BUILD_TAG-cypress:/opt/frontend/my-volto-project/src/addons/$GIT_NAME/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'])
// }
// archiveArtifacts artifacts: 'cypress-reports/videos/*.mp4', fingerprint: 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('Report to SonarQube') {
// // Exclude Pull-Requests
// when {
// allOf {
// environment name: 'CHANGE_ID', value: ''
// }
// }
// steps {
// node(label: 'swarm') {
// script{
// checkout scm
// unstash "xunit-reports"
// unstash "cypress-coverage"
// def scannerHome = tool 'SonarQubeScanner';
// def nodeJS = tool 'NodeJS11';
// withSonarQubeEnv('Sonarqube') {
// sh '''sed -i "s#/opt/frontend/my-volto-project/src/addons/${GIT_NAME}/##g" xunit-reports/coverage/lcov.info'''
// sh "export PATH=$PATH:${scannerHome}/bin:${nodeJS}/bin; sonar-scanner -Dsonar.javascript.lcov.reportPaths=./xunit-reports/coverage/lcov.info,./cypress-coverage/coverage/lcov.info -Dsonar.sources=./src -Dsonar.projectKey=$GIT_NAME-$BRANCH_NAME -Dsonar.projectVersion=$BRANCH_NAME-$BUILD_NUMBER"
// sh '''try=2; while [ \$try -gt 0 ]; do curl -s -XPOST -u "${SONAR_AUTH_TOKEN}:" "${SONAR_HOST_URL}api/project_tags/set?project=${GIT_NAME}-${BRANCH_NAME}&tags=${SONARQUBE_TAGS},${BRANCH_NAME}" > set_tags_result; if [ \$(grep -ic error set_tags_result ) -eq 0 ]; then try=0; else cat set_tags_result; echo "... Will retry"; sleep 60; try=\$(( \$try - 1 )); fi; done'''
// }
// }
// }
// }
// }
stage('Integration tests') {
when {
allOf {
environment name: 'CHANGE_ID', value: ''
not { branch 'master' }
not { changelog '.*^Automated release [0-9\\.]+$' }
}
}
steps {
parallel(

"Cypress": {
node(label: 'docker') {
script {
try {
sh '''docker pull plone; docker run -d --name="$BUILD_TAG-plone" -e SITE="Plone" -e PROFILES="profile-plone.restapi:blocks" plone fg'''
sh '''docker pull plone/volto-addon-ci; docker run -i --name="$BUILD_TAG-cypress" --link $BUILD_TAG-plone:plone -e NAMESPACE="$NAMESPACE" -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" -e DEPENDENCIES="$DEPENDENCIES" plone/volto-addon-ci cypress'''
} 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/src/addons/$GIT_NAME/cypress/videos cypress-reports/'''
sh '''docker cp $BUILD_TAG-cypress:/opt/frontend/my-volto-project/src/addons/$GIT_NAME/cypress/reports cypress-results/'''
coverage = sh script: '''docker cp $BUILD_TAG-cypress:/opt/frontend/my-volto-project/src/addons/$GIT_NAME/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'])
}
archiveArtifacts artifacts: 'cypress-reports/videos/*.mp4', fingerprint: 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('Report to SonarQube') {
when {
environment name: 'CHANGE_ID', value: ''
anyOf {
branch 'master'
branch 'develop'
}
not { changelog '.*^Automated release [0-9\\.]+$' }
}
steps {
node(label: 'swarm') {
script{
checkout scm
unstash "xunit-reports"
unstash "cypress-coverage"
def scannerHome = tool 'SonarQubeScanner';
def nodeJS = tool 'NodeJS11';
withSonarQubeEnv('Sonarqube') {
sh '''sed -i "s#/opt/frontend/my-volto-project/src/addons/${GIT_NAME}/##g" xunit-reports/coverage/lcov.info'''
sh "export PATH=$PATH:${scannerHome}/bin:${nodeJS}/bin; sonar-scanner -Dsonar.javascript.lcov.reportPaths=./xunit-reports/coverage/lcov.info,./cypress-coverage/coverage/lcov.info -Dsonar.sources=./src -Dsonar.projectKey=$GIT_NAME-$BRANCH_NAME -Dsonar.projectVersion=$BRANCH_NAME-$BUILD_NUMBER"
sh '''try=2; while [ \$try -gt 0 ]; do curl -s -XPOST -u "${SONAR_AUTH_TOKEN}:" "${SONAR_HOST_URL}api/project_tags/set?project=${GIT_NAME}-${BRANCH_NAME}&tags=${SONARQUBE_TAGS},${BRANCH_NAME}" > set_tags_result; if [ \$(grep -ic error set_tags_result ) -eq 0 ]; then try=0; else cat set_tags_result; echo "... Will retry"; sleep 60; try=\$(( \$try - 1 )); fi; done'''
}
}
}
}
}

stage('Pull Request') {
when {
Expand All @@ -156,8 +179,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 Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

[Volto](https://github.com/plone/volto) add-on

## Features
## Features![Screenshot 2021-11-17 at 13 27 10](https://user-images.githubusercontent.com/22280901/142159402-5da2e87d-5784-4155-8a8b-de3162d8939a.png)


Demo GIF

## Getting started

Expand Down
8 changes: 5 additions & 3 deletions cypress/integration/block-basics.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,17 @@ describe('Blocks Tests', () => {

// Add block
cy.get('.ui.basic.icon.button.block-add-button').first().click();
cy.get('.blocks-chooser .title').contains('Media').click();
cy.get('.content.active.media .button.image').contains('Image').click();
//cy.get('.blocks-chooser .title').contains('Common Blocks').click();
cy.get('.content.active.common_blocks .button.image')
.contains('Image')
.click();

// Save
cy.get('#toolbar-save').click();
cy.url().should('eq', Cypress.config().baseUrl + '/cypress/my-page');

// then the page view should contain our changes
cy.contains('My Add-on Page');
cy.contains('My Page');
cy.get('.block.image');
});
});
2 changes: 1 addition & 1 deletion cypress/support/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const setupBeforeEach = () => {
path: 'cypress',
});
cy.visit('/cypress/my-page');
cy.waitForResourceToLoad('@navigation');
//cy.waitForResourceToLoad('@navigation');
cy.waitForResourceToLoad('@breadcrumbs');
cy.waitForResourceToLoad('@actions');
cy.waitForResourceToLoad('@types');
Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@eeacms/volto-forests-theme",
"version": "0.1.9",
"version": "0.1.20",
"description": "@eeacms/volto-forests-theme: Volto add-on",
"main": "src/index.js",
"author": "European Environment Agency: IDM2 A-Team",
Expand All @@ -18,8 +18,8 @@
},
"addons": [
"@eeacms/volto-plotlycharts",
"@eeacms/volto-addons-forest",
"@eeacms/volto-datablocks",
"@eeacms/volto-addons-forest",
"@eeacms/volto-matomo"
],
"dependencies": {
Expand All @@ -36,7 +36,6 @@
"react-lazy-load-image-component": "^1.5.0",
"react-stickynode": "^2.1.1",
"react-toastify": "^5.3.2",
"volto-slate": "4.2.1",
"webpack-bundle-analyzer": "^3.6.0"
},
"devDependencies": {
Expand Down
Loading

0 comments on commit ae235c9

Please sign in to comment.