Compare commits

...

3 Commits

Author SHA1 Message Date
cclecle
e9559e97fb fix: pypi upload 2023-03-21 23:38:02 +00:00
cclecle
158b85e29c add pypi publish 2023-03-21 23:27:28 +00:00
cclecle
d4545f999b test: fix doc 2023-03-20 09:04:41 +00:00
2 changed files with 12 additions and 1 deletions

12
Jenkinsfile vendored
View File

@@ -21,10 +21,12 @@ def _bDraft = false
// release content / changelog management
def _bAutoChangelog = true //Not supported yet
def _ReleaseContent_Title = "_CI/CD Automatic Release_"
def bPushMasterOnPypi = true
// full rebuild toogle
def _bFullRebuilt = true
def _MkDocsWebURL = "dabauto--mkdocs-web.dmz.chacha.home/mkdocs-web/"
def _MkDocsWebCredentials = "2c5b684e-3787-4b37-8aca-b3dd4a383fe2"
def _PypiCredentials = "Pypi"
// commands Helper: /!\ Made for GITEA /!\
String determineRepoUserName() {
@@ -131,7 +133,7 @@ pipeline {
sh(". ~/BUILD_ENV/bin/activate && pip install --upgrade setuptools build pip copier jinja2-slug toml")
sh(". ~/TOOLS_ENV/bin/activate && pip install simple_rest_client requests")
sh(". ~/TOOLS_ENV/bin/activate && pip install simple_rest_client requests twine")
script {
if(_PROJECT_NAME!="pygitversionhelper") {
@@ -554,6 +556,14 @@ pipeline {
|__EOWRAPPER__
""".stripMargin())
}
if((_GIT_BRANCH=="master") && (bPushMasterOnPypi)) {
withCredentials([string( credentialsId: _PypiCredentials, passwordVariable: 'PYPI_PASSWORD', usernameVariable: 'PYPI_USERNAME')]) {
sh(script: """#!/bin/sh -
|. ~/TOOLS_ENV/bin/activate
|exec twine twine upload -r ${PY_PROJECT_NAME} dist/* -u ${PYPI_USERNAME} -p ${PYPI_PASSWORD} --non-interactive --disable-progress-bar
""".stripMargin())
}
}
}
}
}

View File

@@ -97,6 +97,7 @@ class Test_gitversionhelper(unittest.TestCase):
self._test_version_readback_simple("1.1.1")
def test_nominal__version__auto_9(self):
self._test_version_readback_simple("1.2.1")
def test_nominal__version__auto_PEP440_post(self):
self._test_version_readback_simple("1.2.1.post1")
def test_nominal__version__auto_PEP440_pre(self):