Skip to content

Commit

Permalink
Merge pull request #2 from eea/develop
Browse files Browse the repository at this point in the history
Added eprtr blocks and more
  • Loading branch information
razvanMiu committed Nov 1, 2021
2 parents 01a3e7c + f53985a commit 3ce621a
Show file tree
Hide file tree
Showing 256 changed files with 27,100 additions and 519 deletions.
22 changes: 19 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Changelog
### Changelog

## 0.1.0
All notable changes to this project will be documented in this file. Dates are displayed in UTC.

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

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

- Commented cypress [`80eb317`](https://github.com/eea/volto-industry-theme/commit/80eb317730e92feef27316f87ba4f6080e5fa7fd)
- Use latest addons versions [`384cd34`](https://github.com/eea/volto-industry-theme/commit/384cd34d51b8debb1444cb241576149e4abfe432)
- Stylelint fix [`19ef60c`](https://github.com/eea/volto-industry-theme/commit/19ef60c117e427fa7f1df4ced8a9686e88b19c72)
- Added eprtr blocks and more [`0ad23d2`](https://github.com/eea/volto-industry-theme/commit/0ad23d2e17fafff396137e53b5903b3b0b4b41e8)
- Improved Header & Footer [`cdbedcf`](https://github.com/eea/volto-industry-theme/commit/cdbedcf4cc75f71c8c892042db2d814f210348f0)
- Theme override [`c31ef7e`](https://github.com/eea/volto-industry-theme/commit/c31ef7e694b310508bace3b43a6ea2db142b7a54)
- Run bootstrap [`16b42cc`](https://github.com/eea/volto-industry-theme/commit/16b42cc3b48907fb0c803f256b549c034ca90d96)

#### 0.1.0

> 1 November 2021
- Initial commit [`01a3e7c`](https://github.com/eea/volto-industry-theme/commit/01a3e7ce3982eb7e5eefb3d57dfa18bf3c622b93)
12 changes: 6 additions & 6 deletions DEVELOP.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# volto-addon-template
# volto-industry-theme

## Develop

Expand All @@ -10,15 +10,15 @@ Before starting make sure your development environment is properly set. See [Vol

1. Create new volto app

yo @plone/volto my-volto-project --addon @eeacms/volto-addon-template --skip-install
yo @plone/volto my-volto-project --addon @eeacms/volto-industry-theme --skip-install
cd my-volto-project

1. Add the following to `mrs.developer.json`:

{
"volto-addon-template": {
"url": "https://github.com/eea/volto-addon-template.git",
"package": "@eeacms/volto-addon-template",
"volto-industry-theme": {
"url": "https://github.com/eea/volto-industry-theme.git",
"package": "@eeacms/volto-industry-theme",
"branch": "develop",
"path": "src"
}
Expand Down Expand Up @@ -48,4 +48,4 @@ Before starting make sure your development environment is properly set. See [Vol

1. Happy hacking!

cd src/addons/volto-addon-template/
cd src/addons/volto-industry-theme/
51 changes: 0 additions & 51 deletions DEVELOP.md.tpl

This file was deleted.

99 changes: 50 additions & 49 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ pipeline {
agent any

environment {
GIT_NAME = "volto-addon-template"
GIT_NAME = "volto-industry-theme"
NAMESPACE = "@eeacms"
SONARQUBE_TAGS = "volto.eea.europa.eu"
DEPENDENCIES = ""
Expand Down Expand Up @@ -74,52 +74,52 @@ 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('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
Expand All @@ -133,12 +133,13 @@ pipeline {
script{
checkout scm
unstash "xunit-reports"
unstash "cypress-coverage"
// 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 "export PATH=$PATH:${scannerHome}/bin:${nodeJS}/bin; sonar-scanner -Dsonar.javascript.lcov.reportPaths=./xunit-reports/coverage/lcov.info -Dsonar.sources=./src -Dsonar.projectKey=$GIT_NAME-$BRANCH_NAME -Dsonar.projectVersion=$BRANCH_NAME-$BUILD_NUMBER"
// 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'''
}
}
Expand Down
Loading

0 comments on commit 3ce621a

Please sign in to comment.