Skip to content

Commit

Permalink
Publish package using poetry instead of twine (#512)
Browse files Browse the repository at this point in the history
  • Loading branch information
ghisvail authored Nov 24, 2021
1 parent b7cd948 commit fc8fc93
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 41 deletions.
31 changes: 0 additions & 31 deletions .jenkins/scripts/generate_wheels.sh

This file was deleted.

15 changes: 5 additions & 10 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -330,25 +330,20 @@ pipeline {
CONDA_HOME = "$HOME/miniconda"
}
steps {
sh '''
source "${CONDA_HOME}/etc/profile.d/conda.sh"
conda create -p "${WORKSPACE}/env" python=3.8 poetry twine
conda activate "${WORKSPACE}/env"
cd "${WORKSPACE}/.jenkins/scripts"
./generate_wheels.sh
'''
withCredentials(
[
usernamePassword(
credentialsId: 'jenkins-pass-for-pypi-aramis',
credentialsId: 'jenkins-token-for-pypi-clinica',
usernameVariable: 'USERNAME',
passwordVariable: 'PASSWORD'
)
]
) {
sh '''
cd "${WORKSPACE}"
twine upload -u "${USERNAME}" -p "${PASSWORD}" ./dist/*
source "${CONDA_HOME}/etc/profile.d/conda.sh"
conda create -p "${WORKSPACE}/env" python=3.8 poetry
conda activate "${WORKSPACE}/env"
poetry publish --build -u "${USERNAME}" -p "${PASSWORD}"
'''
}
}
Expand Down

0 comments on commit fc8fc93

Please sign in to comment.