From 48376762f7bbf290e4d355b8aaf029f25f04bc75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Doumouro?= Date: Fri, 28 Apr 2017 17:34:50 +0200 Subject: [PATCH 1/3] Fix jenkins file --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index fedd9456b..7987df851 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,6 +1,7 @@ def branchName = "${env.BRANCH_NAME}" def packagePath = "snips_nlu" def VENV = ". venv/bin/activate" +def credentials = "${env.NEXUS_USERNAME_PYPI}:${env.NEXUS_PASSWORD_PYPI}" def version(path) { readFile("${path}/__version__").split("\n")[0] @@ -15,7 +16,6 @@ node('jenkins-slave-generic') { } stage('Setup') { - def credentials = "${env.NEXUS_USERNAME_PYPI}:${env.NEXUS_PASSWORD_PYPI}" sh "virtualenv venv" sh """ ${VENV} From 4a340fc2547f00168b71a941074c3f6535942f92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Doumouro?= Date: Fri, 28 Apr 2017 17:42:43 +0200 Subject: [PATCH 2/3] Fix setup.py --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 6a9fce02d..ce8f7d276 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ PACKAGE_PATH = os.path.join(ROOT_PATH, PACKAGE_NAME) VERSION = "__version__" -with io.open(os.path.join(PACKAGE_PATH, VERSION))as f: +with io.open(os.path.join(PACKAGE_PATH, VERSION)) as f: version = f.readline().strip() required = [ From c7ae4d3d7cb9d513c4977e46b7dac5f0319c9d4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Doumouro?= Date: Fri, 28 Apr 2017 18:23:16 +0200 Subject: [PATCH 3/3] Fix jenkins file --- Jenkinsfile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 7987df851..5781c76b0 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,7 +1,7 @@ def branchName = "${env.BRANCH_NAME}" def packagePath = "snips_nlu" def VENV = ". venv/bin/activate" -def credentials = "${env.NEXUS_USERNAME_PYPI}:${env.NEXUS_PASSWORD_PYPI}" + def version(path) { readFile("${path}/__version__").split("\n")[0] @@ -17,6 +17,7 @@ node('jenkins-slave-generic') { stage('Setup') { sh "virtualenv venv" + def credentials = "${env.NEXUS_USERNAME_PYPI}:${env.NEXUS_PASSWORD_PYPI}" sh """ ${VENV} echo "[global]\nindex = https://${credentials}@nexus-repository.snips.ai/repository/pypi-internal/pypi\nindex-url = https://pypi.python.org/simple/\nextra-index-url = https://${credentials}@nexus-repository.snips.ai/repository/pypi-internal/simple" >> venv/pip.conf @@ -38,6 +39,7 @@ node('jenkins-slave-generic') { checkout scm def rootPath = pwd() def path = "${rootPath}/${packagePath}" + def credentials = "${env.NEXUS_USERNAME_PYPI}:${env.NEXUS_PASSWORD_PYPI}" sh "git submodule update --init --recursive" sh """ virtualenv venv @@ -46,6 +48,10 @@ node('jenkins-slave-generic') { pip install . python setup.py bdist_wheel upload -r pypisnips git tag ${version(path)} + git remote rm origin + git remote add origin 'git@github.com:snipsco/snips-nlu.git' + git config --global user.email 'jenkins@snips.ai' + git config --global user.name 'Jenkins' git push --tags """ default: