Skip to content

Commit

Permalink
Merge pull request #8 from eea/develop
Browse files Browse the repository at this point in the history
91577 use customized jqueryui in eea context ( exists eea.design)
  • Loading branch information
avoinea authored Mar 14, 2018
2 parents 7c73204 + d5e11f0 commit 2caee99
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 78 deletions.
136 changes: 61 additions & 75 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,117 +6,74 @@ 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(

"JS Hint": {
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'''
}
}
}
Expand All @@ -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'''
}
}
}
Expand All @@ -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'''
}
}
}
Expand All @@ -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'''
}
}
}
Expand All @@ -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 {
Expand Down
9 changes: 7 additions & 2 deletions docs/HISTORY.txt
Original file line number Diff line number Diff line change
@@ -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]

Expand Down
3 changes: 3 additions & 0 deletions eea/app/visualization/browser/zpt/view.pt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
i18n:domain="eea">

<metal:jsslot fill-slot="javascript_head_slot">
<script type="text/javascript" tal:attributes="src string:${portal_url}/collective.js.jqueryui.custom.min.eea.js" tal:condition="exists:context/design.js"></script>

<tal:headers repeat="header view/headers">
<tal:header replace="structure header" />
</tal:headers>
Expand Down Expand Up @@ -124,3 +126,4 @@
</body>
</html>
</tal:html>

2 changes: 1 addition & 1 deletion eea/app/visualization/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
11.7.dev0
11.8

0 comments on commit 2caee99

Please sign in to comment.