message: Updated python jenkins file
diff: @@ -33,6 +33,13 @@ try {
  }
  }
  + // 3. PUBLISH To Pypi
  + stage('Publish Pypi Files') {
  + node('ubuntu') {
  + publishToPypi()
  + }
  + }
  +
  } catch (e) {
  currentBuild.result = "FAILED"
  node('ubuntu-master') {
  @@ -124,3 +131,33 @@ def publishDebFiles() {
  step([$class: 'WsCleanup'])
  }
  }
  +
  +def publishToPypi() {
  + try {
  + echo 'Publish Deb files: Checkout csm'
  + checkout scm
  +
  + echo 'Publish Deb: Build docker image'
  + def testEnv = dockerHelpers.build(name, 'ci/python.dockerfile ci')
  +
  + testEnv.inside('-u 0:0') {
  +
  + withCredentials([file(credentialsId: 'pypi_credentials', variable: 'credentialsFile')]) {
  + sh 'cp $credentialsFile ./wrappers/python/'
  +
  + sh 'chmod -R 777 ./wrappers/python/ci'
  + sh "wrappers/python/ci/update-package-version.sh $env.BUILD_NUMBER"
  +
  + sh '''
  + cd wrappers/python
  + python3.6 setup.py sdist
  + python3.6 -m twine upload dist/* --config-file .pypirc
  + '''
  + }
  + }
  + }
  + finally {
  + echo 'Publish Deb: Cleanup'
  + step([$class: 'WsCleanup'])
  + }
  +}
  \ No newline at end of file
  