Zack Williams | 5aa37e1 | 2019-02-13 13:28:29 -0700 | [diff] [blame] | 1 | --- |
| 2 | # publishing Python modules to PyPI |
| 3 | |
| 4 | - project: |
| 5 | name: pypi-publisher |
| 6 | |
| 7 | branch-regexp: '{modern-branches-regexp}' |
| 8 | project-regexp: '{pypi-projects-regexp}' |
| 9 | |
| 10 | # wait to run pypi-publish job until version-tag job has tagged the repo |
| 11 | jobs: |
| 12 | - 'pypi-publish': |
| 13 | dependency-jobs: 'version-tag' |
| 14 | |
| 15 | - job-template: |
| 16 | id: pypi-publish |
| 17 | name: '{id}' |
| 18 | description: | |
| 19 | Created by {id} job-template from ci-management/jjb/pypi-publish.yaml |
| 20 | When a patch is merged, publish python modules to PyPI |
| 21 | |
| 22 | triggers: |
| 23 | - cord-infra-gerrit-trigger-merge: |
| 24 | gerrit-server-name: '{gerrit-server-name}' |
| 25 | project-regexp: '{project-regexp}' |
| 26 | branch-regexp: '{branch-regexp}' |
| 27 | file-include-regexp: '{all-files-regexp}' |
| 28 | dependency-jobs: '{dependency-jobs}' |
| 29 | |
| 30 | properties: |
| 31 | - cord-infra-properties: |
| 32 | build-days-to-keep: '{build-days-to-keep}' |
| 33 | artifact-num-to-keep: '{artifact-num-to-keep}' |
| 34 | |
| 35 | wrappers: |
| 36 | - cord-pypi-wrapper: |
| 37 | build-timeout: '{build-timeout}' |
| 38 | jenkins-ssh-credential: '{gerrit-ssh-credential}' |
| 39 | |
| 40 | scm: |
| 41 | - lf-infra-gerrit-scm: |
| 42 | git-url: '$GIT_URL/$GERRIT_PROJECT' |
| 43 | refspec: '' |
| 44 | branch: '$GERRIT_BRANCH' |
| 45 | submodule-recursive: 'false' |
| 46 | choosing-strategy: 'gerrit' |
| 47 | jenkins-ssh-credential: '{jenkins-ssh-credential}' |
| 48 | |
| 49 | node: '{build-node}' |
| 50 | project-type: freestyle |
| 51 | concurrent: true |
| 52 | |
| 53 | builders: |
| 54 | - inject: |
| 55 | properties-content: |
| 56 | PYPI_INDEX={pypi-index} |
| 57 | PYPI_MODULE_DIRS={pypi-module-dirs} |
| 58 | |
| 59 | - shell: !include-raw-escape: shell/pypi-publish.sh |
| 60 | |
| 61 | |
| 62 | |