Skip to content

Commit

Permalink
Merge pull request #17 from eea/develop
Browse files Browse the repository at this point in the history
Develop #95849
  • Loading branch information
avoinea authored Jun 22, 2018
2 parents a0d4f08 + 2d51f10 commit 4209c44
Show file tree
Hide file tree
Showing 5 changed files with 88 additions and 90 deletions.
159 changes: 74 additions & 85 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,162 +3,114 @@ pipeline {

environment {
GIT_NAME = "sparql-client"
GIT_VERSIONFILE = "version.txt"
}

stages {
stage('Tests') {

stage('Code') {
steps {
parallel(

"WWW": {
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'''
}
}
"ZPT Lint": {
node(label: 'docker') {
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": {
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'''
}
}
"JS Lint": {
node(label: 'docker') {
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": {
node(label: 'docker-1.13') {
script {
try {
sh '''docker run -i --name="$BUILD_TAG-plone4" -e GIT_BRANCH="$BRANCH_NAME" -e ADDONS="${GIT_NAME}[test]" -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'''
}
}
"PyFlakes": {
node(label: 'docker') {
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') {
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": {
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'''
}
}
"WWW": {
node(label: 'docker') {
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": {
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'''
}
}
"KGS": {
node(label: 'docker') {
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": {
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'''
}
}
"Plone4": {
node(label: 'docker') {
sh '''docker run -i --rm --name="$BUILD_TAG-plone4" -e GIT_BRANCH="$BRANCH_NAME" -e ADDONS="$GIT_NAME[test]" -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') {
node(label: 'docker') {
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'''
}
}
}
},

"CSS Lint": {
node(label: 'docker-1.13') {
node(label: 'docker') {
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'''
}
}
}
},

"PEP8": {
node(label: 'docker-1.13') {
node(label: 'docker') {
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'''
}
}
}
},

"PyLint": {
node(label: 'docker-1.13') {
node(label: 'docker') {
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 +120,43 @@ pipeline {
}
}

stage('Pull Request') {
when {
not {
environment name: 'CHANGE_ID', value: ''
}
environment name: 'CHANGE_TARGET', value: 'master'
}
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"
}
withCredentials([string(credentialsId: 'eea-jenkins-token', variable: 'GITHUB_TOKEN')]) {
sh '''docker run -i --rm --name="$BUILD_TAG-gitflow-pr" -e GIT_CHANGE_BRANCH="$CHANGE_BRANCH" -e GIT_CHANGE_AUTHOR="$CHANGE_AUTHOR" -e GIT_CHANGE_TITLE="$CHANGE_TITLE" -e GIT_TOKEN="$GITHUB_TOKEN" -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" -e GIT_ORG="$GIT_ORG" -e GIT_NAME="$GIT_NAME" -e GIT_VERSIONFILE="$GIT_VERSIONFILE" eeacms/gitflow'''
}
}
}
}
}

stage('Release') {
when {
allOf {
environment name: 'CHANGE_ID', value: ''
branch 'master'
}
}
steps {
node(label: 'docker') {
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" -e GIT_VERSIONFILE="$GIT_VERSIONFILE" eeacms/gitflow'''
}
}
}
}

}

post {
Expand Down
8 changes: 6 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
**************************
SPARQL HTTP client library
**************************
.. image:: http://ci.eionet.europa.eu/job/eea/job/sparql-client/job/master/badge/icon
:target: http://ci.eionet.europa.eu/job/eea/job/sparql-client/job/master/display/redirect
.. image:: https://ci.eionet.europa.eu/buildStatus/icon?job=eea/sparql-client/develop
:target: https://ci.eionet.europa.eu/job/eea/job/sparql-client/job/develop/display/redirect
:alt: develop
.. image:: https://ci.eionet.europa.eu/buildStatus/icon?job=eea/sparql-client/master
:target: https://ci.eionet.europa.eu/job/eea/job/sparql-client/job/master/display/redirect
:alt: master

`sparql-client` is a library to query a SPARQL endpoint. It will automatically
convert literals to the coresponding Python types.
Expand Down
7 changes: 6 additions & 1 deletion docs/HISTORY.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
Changelog
=========

3.1.dev0 - (unreleased)
3.2 - (2018-06-22)
-----------------------
* Change: updated URLs pointing to eea.europa.eu with https://
[alecghica refs #95849]

3.1 - (2017-12-12)
------------------
* Change: Replace eeacms/zptlint with eeacms/plone-test:4 zptlint
[avoinea refs #90415]

Expand Down
2 changes: 1 addition & 1 deletion sparql.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
except Exception:
__version__ = "2.6"

USER_AGENT = "sparql-client/%s +http://www.eionet.europa.eu/software/sparql-client/" % __version__
USER_AGENT = "sparql-client/%s +https://www.eionet.europa.eu/software/sparql-client/" % __version__

CONTENT_TYPE = {
'turtle' : "application/turtle" ,
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.1.dev0
3.2

0 comments on commit 4209c44

Please sign in to comment.