diff --git a/Jenkinsfile b/Jenkinsfile index 00d02b1..d6ff7e0 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -6,105 +6,64 @@ pipeline { } stages { - stage('Tests') { + + stage('Code') { steps { parallel( - "WWW": { + "ZPT Lint": { node(label: 'docker-1.13') { - script { - try { - sh '''docker run -i --name="$BUILD_TAG-www" -e GIT_NAME="$GIT_NAME" -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" eeacms/www-devel /debug.sh bin/test -v -vv -s $GIT_NAME''' - } finally { - sh '''docker rm -v $BUILD_TAG-www''' - } - } + sh '''docker run -i --rm --name="$BUILD_TAG-zptlint" -e GIT_BRANCH="$BRANCH_NAME" -e ADDONS="$GIT_NAME" -e DEVELOP="src/$GIT_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" eeacms/plone-test:4 zptlint''' } }, - "KGS": { + "JS Lint": { node(label: 'docker-1.13') { - script { - try { - sh '''docker run -i --name="$BUILD_TAG-kgs" -e GIT_NAME="$GIT_NAME" -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" eeacms/kgs-devel /debug.sh bin/test --test-path /plone/instance/src/$GIT_NAME -v -vv -s $GIT_NAME''' - } finally { - sh '''docker rm -v $BUILD_TAG-kgs''' - } - } + sh '''docker run -i --rm --name="$BUILD_TAG-jslint" -e GIT_SRC="https://github.com/eea/$GIT_NAME.git" -e GIT_NAME="$GIT_NAME" -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" eeacms/jslint4java''' } }, - "Plone4": { + "PyFlakes": { node(label: 'docker-1.13') { - script { - try { - sh '''docker run -i --name="$BUILD_TAG-plone4" -e GIT_BRANCH="$BRANCH_NAME" -e ADDONS="$GIT_NAME" -e DEVELOP="src/$GIT_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" eeacms/plone-test:4 -v -vv -s $GIT_NAME''' - } finally { - sh '''docker rm -v $BUILD_TAG-plone4''' - } - } + sh '''docker run -i --rm --name="$BUILD_TAG-pyflakes" -e GIT_SRC="https://github.com/eea/$GIT_NAME.git" -e GIT_NAME="$GIT_NAME" -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" eeacms/pyflakes''' + } + }, + + "i18n": { + node(label: 'docker-1.13') { + sh '''docker run -i --rm --name=$BUILD_TAG-i18n -e GIT_SRC="https://github.com/eea/$GIT_NAME.git" -e GIT_NAME="$GIT_NAME" -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" eeacms/i18ndude''' } } ) } } - stage('Code Analysis') { + stage('Tests') { steps { parallel( - "ZPT Lint": { - node(label: 'docker-1.13') { - script { - try { - sh '''docker run -i --name="$BUILD_TAG-zptlint" -e GIT_BRANCH="$BRANCH_NAME" -e ADDONS="$GIT_NAME" -e DEVELOP="src/$GIT_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" eeacms/plone-test:4 zptlint''' - } finally { - sh '''docker rm -v $BUILD_TAG-zptlint''' - } - } - } - }, - - "JS Lint": { + "WWW": { node(label: 'docker-1.13') { - script { - try { - sh '''docker run -i --name="$BUILD_TAG-jslint" -e GIT_SRC="https://github.com/eea/$GIT_NAME.git" -e GIT_NAME="$GIT_NAME" -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" eeacms/jslint4java''' - } finally { - sh '''docker rm -v $BUILD_TAG-jslint''' - } - } + sh '''docker run -i --rm --name="$BUILD_TAG-www" -e GIT_NAME="$GIT_NAME" -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" eeacms/www-devel /debug.sh bin/test -v -vv -s $GIT_NAME''' } }, - "PyFlakes": { + "KGS": { node(label: 'docker-1.13') { - script { - try { - sh '''docker run -i --name="$BUILD_TAG-pyflakes" -e GIT_SRC="https://github.com/eea/$GIT_NAME.git" -e GIT_NAME="$GIT_NAME" -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" eeacms/pyflakes''' - } finally { - sh '''docker rm -v $BUILD_TAG-pyflakes''' - } - } + sh '''docker run -i --rm --name="$BUILD_TAG-kgs" -e GIT_NAME="$GIT_NAME" -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" eeacms/kgs-devel /debug.sh bin/test --test-path /plone/instance/src/$GIT_NAME -v -vv -s $GIT_NAME''' } }, - "i18n": { + "Plone4": { node(label: 'docker-1.13') { - script { - try { - sh '''docker run -i --name=$BUILD_TAG-i18n -e GIT_SRC="https://github.com/eea/$GIT_NAME.git" -e GIT_NAME="$GIT_NAME" -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" eeacms/i18ndude''' - } finally { - sh '''docker rm -v $BUILD_TAG-i18n''' - } - } + sh '''docker run -i --rm --name="$BUILD_TAG-plone4" -e GIT_BRANCH="$BRANCH_NAME" -e ADDONS="$GIT_NAME" -e DEVELOP="src/$GIT_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" eeacms/plone-test:4 -v -vv -s $GIT_NAME''' } } ) } } - stage('Code Syntax') { + stage('Cosmetics') { steps { parallel( @@ -112,11 +71,9 @@ pipeline { node(label: 'docker-1.13') { script { try { - sh '''docker run -i --name="$BUILD_TAG-jshint" -e GIT_SRC="https://github.com/eea/$GIT_NAME.git" -e GIT_NAME="$GIT_NAME" -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" eeacms/jshint''' + sh '''docker run -i --rm --name="$BUILD_TAG-jshint" -e GIT_SRC="https://github.com/eea/$GIT_NAME.git" -e GIT_NAME="$GIT_NAME" -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" eeacms/jshint''' } catch (err) { echo "Unstable: ${err}" - } finally { - sh '''docker rm -v $BUILD_TAG-jshint''' } } } @@ -126,11 +83,9 @@ pipeline { node(label: 'docker-1.13') { script { try { - sh '''docker run -i --name="$BUILD_TAG-csslint" -e GIT_SRC="https://github.com/eea/$GIT_NAME.git" -e GIT_NAME="$GIT_NAME" -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" eeacms/csslint''' + sh '''docker run -i --rm --name="$BUILD_TAG-csslint" -e GIT_SRC="https://github.com/eea/$GIT_NAME.git" -e GIT_NAME="$GIT_NAME" -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" eeacms/csslint''' } catch (err) { echo "Unstable: ${err}" - } finally { - sh '''docker rm -v $BUILD_TAG-csslint''' } } } @@ -140,11 +95,9 @@ pipeline { node(label: 'docker-1.13') { script { try { - sh '''docker run -i --name="$BUILD_TAG-pep8" -e GIT_SRC="https://github.com/eea/$GIT_NAME.git" -e GIT_NAME="$GIT_NAME" -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" eeacms/pep8''' + sh '''docker run -i --rm --name="$BUILD_TAG-pep8" -e GIT_SRC="https://github.com/eea/$GIT_NAME.git" -e GIT_NAME="$GIT_NAME" -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" eeacms/pep8''' } catch (err) { echo "Unstable: ${err}" - } finally { - sh '''docker rm -v $BUILD_TAG-pep8''' } } } @@ -154,11 +107,9 @@ pipeline { node(label: 'docker-1.13') { script { try { - sh '''docker run -i --name="$BUILD_TAG-pylint" -e GIT_SRC="https://github.com/eea/$GIT_NAME.git" -e GIT_NAME="$GIT_NAME" -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" eeacms/pylint''' + sh '''docker run -i --rm --name="$BUILD_TAG-pylint" -e GIT_SRC="https://github.com/eea/$GIT_NAME.git" -e GIT_NAME="$GIT_NAME" -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" eeacms/pylint''' } catch (err) { echo "Unstable: ${err}" - } finally { - sh '''docker rm -v $BUILD_TAG-pylint''' } } } @@ -168,6 +119,41 @@ pipeline { } } + stage('Pull Request') { + when { + not { + environment name: 'CHANGE_ID', value: '' + } + environment name: 'CHANGE_TARGET', value: 'master' + } + steps { + node(label: 'docker-1.13') { + script { + if ( env.CHANGE_BRANCH != "develop" && !( env.CHANGE_BRANCH.startsWith("hotfix")) ) { + error "Pipeline aborted due to PR not made from develop or hotfix branch" + } + sh '''docker run -i --rm --name="$BUILD_TAG-gitflow-pr" -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" -e GIT_ORG="$GIT_ORG" -e GIT_NAME="$GIT_NAME" eeacms/gitflow''' + } + } + } + } + + stage('Release') { + when { + allOf { + environment name: 'CHANGE_ID', value: '' + branch 'master' + } + } + steps { + node(label: 'docker-1.13') { + withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'eea-jenkins', usernameVariable: 'EGGREPO_USERNAME', passwordVariable: 'EGGREPO_PASSWORD'],string(credentialsId: 'eea-jenkins-token', variable: 'GITHUB_TOKEN'),[$class: 'UsernamePasswordMultiBinding', credentialsId: 'pypi-jenkins', usernameVariable: 'PYPI_USERNAME', passwordVariable: 'PYPI_PASSWORD']]) { + sh '''docker run -i --rm --name="$BUILD_TAG-gitflow-master" -e GIT_BRANCH="$BRANCH_NAME" -e EGGREPO_USERNAME="$EGGREPO_USERNAME" -e EGGREPO_PASSWORD="$EGGREPO_PASSWORD" -e GIT_NAME="$GIT_NAME" -e PYPI_USERNAME="$PYPI_USERNAME" -e PYPI_PASSWORD="$PYPI_PASSWORD" -e GIT_ORG="$GIT_ORG" -e GIT_TOKEN="$GITHUB_TOKEN" eeacms/gitflow''' + } + } + } + } + } post { diff --git a/docs/HISTORY.txt b/docs/HISTORY.txt index dd19dbb..2350d77 100644 --- a/docs/HISTORY.txt +++ b/docs/HISTORY.txt @@ -1,8 +1,13 @@ Changelog ========= -11.7.dev0 - (unreleased) ------------------------- +11.8 - (2018-03-14) +------------------- +* Change: load customized collective.js.jqueryui on eea context for view pages + [ichim-david refs #91577] + +11.7 - (2017-12-12) +------------------- * Change: Replace eeacms/zptlint with eeacms/plone-test:4 zptlint [avoinea refs #90415] diff --git a/eea/app/visualization/browser/zpt/view.pt b/eea/app/visualization/browser/zpt/view.pt index 5074de1..8f62f6a 100644 --- a/eea/app/visualization/browser/zpt/view.pt +++ b/eea/app/visualization/browser/zpt/view.pt @@ -9,6 +9,8 @@ i18n:domain="eea"> + + @@ -124,3 +126,4 @@ + diff --git a/eea/app/visualization/version.txt b/eea/app/visualization/version.txt index 8446e6b..62ed2b4 100644 --- a/eea/app/visualization/version.txt +++ b/eea/app/visualization/version.txt @@ -1 +1 @@ -11.7.dev0 \ No newline at end of file +11.8