-
Notifications
You must be signed in to change notification settings - Fork 513
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #190 from snipsco/release/0.3.2
Release/0.3.2
- Loading branch information
Showing
2 changed files
with
8 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ def branchName = "${env.BRANCH_NAME}" | |
def packagePath = "snips_nlu" | ||
def VENV = ". venv/bin/activate" | ||
|
||
|
||
def version(path) { | ||
readFile("${path}/__version__").split("\n")[0] | ||
} | ||
|
@@ -15,8 +16,8 @@ node('jenkins-slave-generic') { | |
} | ||
|
||
stage('Setup') { | ||
def credentials = "${env.NEXUS_USERNAME_PYPI}:${env.NEXUS_PASSWORD_PYPI}" | ||
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 '[email protected]:snipsco/snips-nlu.git' | ||
git config --global user.email '[email protected]' | ||
git config --global user.name 'Jenkins' | ||
git push --tags | ||
""" | ||
default: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters