瀏覽代碼

publish package on PyPI

Signed-off-by: Nicolas De Loof <[email protected]>
Nicolas De Loof 5 年之前
父節點
當前提交
31396786ba
共有 1 個文件被更改,包括 10 次插入2 次删除
  1. 10 2
      Release.Jenkinsfile

+ 10 - 2
Release.Jenkinsfile

@@ -178,9 +178,17 @@ pipeline {
                     steps {
                         checkout scm
                         withCredentials([[$class: "FileBinding", credentialsId: 'pypirc-docker-dsg-cibot', variable: 'PYPIRC']]) {
-                            sh './script/release/python-package'
+                            sh """
+                                virtualenv venv-publish
+                                source venv-publish/bin/activate
+                                python setup.py sdist bdist_wheel
+                                pip install twine
+                                twine upload --config-file ${PYPIRC} ./dist/docker-compose-${env.TAG_NAME}.tar.gz ./dist/docker_compose-${env.TAG_NAME}-py2.py3-none-any.whl
+                            """
                         }
-                        archiveArtifacts artifacts: 'dist/*', fingerprint: true
+                    }
+                    post {
+                        sh 'deactivate; rm -rf venv-publish'
                     }
                 }
             }