blob: 557673db684dd136073007416d2ffd7cedf46b12 [file] [log] [blame]
---
# Job definition Anchors
- _pypi_job_boiler_plate: &pypi_job_boiler_plate
name: pypi_job_boiler_plate
#####################
# Job Variables #
#####################
gerrit_merge_triggers:
- change-merged-event
- comment-added-contains-event:
comment-contains-value: pypi-remerge$
gerrit_release_trigger:
- comment-added-contains-event:
comment-contains-value: pypi-release$
gerrit_trigger_file_paths:
- compare-type: ANT
pattern: "**"
submodule-disable: false
submodule-timeout: 10
#####################
# Job Configuration #
#####################
project-type: freestyle
node: "{build-node}"
parameters:
- lf-infra-parameters:
project: "{project}"
branch: "{branch}"
stream: "{stream}"
lftools-version: "{lftools-version}"
- lf-infra-tox-parameters:
tox-dir: "{tox-dir}"
tox-envs: "{tox-envs}"
properties:
- lf-infra-properties:
build-days-to-keep: "{build-days-to-keep}"
scm:
- lf-infra-gerrit-scm:
jenkins-ssh-credential: "{jenkins-ssh-credential}"
git-url: "$GIT_URL/$PROJECT"
refspec: "$GERRIT_REFSPEC"
branch: "$GERRIT_BRANCH"
submodule-recursive: true
submodule-timeout: "{submodule-timeout}"
submodule-disable: "{submodule-disable}"
choosing-strategy: default
wrappers:
- lf-infra-wrappers:
build-timeout: "{build-timeout}"
jenkins-ssh-credential: "{jenkins-ssh-credential}"
publishers:
- lf-infra-publish
- job-template:
name: "{project-name}-python-staging-{stream}"
# Job template for PyPI staging jobs
# Daily Builds
<<: *pypi_job_boiler_plate
triggers:
- gerrit:
server-name: "{gerrit-server-name}"
trigger-on: "{obj:gerrit_merge_triggers}"
projects:
- project-compare-type: ANT
project-pattern: "{project}"
branches:
- branch-compare-type: ANT
branch-pattern: "**/{branch}"
file-paths: "{obj:gerrit_trigger_file_paths}"
builders:
- lf-infra-tox-install:
python-version: "{python-version}"
- shell: !include-raw-escape: ../global-jjb/shell/tox-run.sh
- config-file-provider:
files:
- file-id: pypirc
target: "$HOME/.pypirc"
- shell: !include-raw-escape: ../../shell/pypi-dist-build.sh
- publish-pypi:
pypi-server: staging
- job-template:
name: "{project-name}-python-release-{stream}"
# Job template for PyPI release jobs
<<: *pypi_job_boiler_plate
triggers:
- gerrit:
server-name: "{gerrit-server-name}"
trigger-on: "{obj:gerrit_release_trigger}"
projects:
- project-compare-type: ANT
project-pattern: "{project}"
branches:
- branch-compare-type: ANT
branch-pattern: "**/{branch}"
file-paths: "{obj:gerrit_trigger_file_paths}"
builders:
- lf-infra-tox-install:
python-version: "{python-version}"
- shell: !include-raw-escape: ../global-jjb/shell/tox-run.sh
- config-file-provider:
files:
- file-id: pypirc
target: "$HOME/.pypirc"
- shell: !include-raw-escape: ../../shell/pypi-dist-build.sh
- publish-pypi:
pypi-server: release
- job-template:
name: "{project-name}-{subproject}-python-staging-{stream}"
# Job template for PyPI staging jobs
# Daily Builds
<<: *pypi_job_boiler_plate
triggers:
- gerrit:
server-name: "{gerrit-server-name}"
trigger-on: "{obj:gerrit_merge_triggers}"
projects:
- project-compare-type: ANT
project-pattern: "{project}"
branches:
- branch-compare-type: ANT
branch-pattern: "**/{branch}"
file-paths: "{obj:gerrit_trigger_file_paths}"
builders:
- lf-infra-tox-install:
python-version: "{python-version}"
- shell: !include-raw-escape: ../global-jjb/shell/tox-run.sh
- config-file-provider:
files:
- file-id: pypirc
target: "$HOME/.pypirc"
- shell: !include-raw-escape: ../../shell/pypi-dist-build.sh
- publish-pypi:
pypi-server: staging
- job-template:
name: "{project-name}-{subproject}-python-release-{stream}"
# Job template for PyPI release jobs
<<: *pypi_job_boiler_plate
triggers:
- gerrit:
server-name: "{gerrit-server-name}"
trigger-on: "{obj:gerrit_release_trigger}"
projects:
- project-compare-type: ANT
project-pattern: "{project}"
branches:
- branch-compare-type: ANT
branch-pattern: "**/{branch}"
file-paths: "{obj:gerrit_trigger_file_paths}"
builders:
- lf-infra-tox-install:
python-version: "{python-version}"
- shell: !include-raw-escape: ../global-jjb/shell/tox-run.sh
- config-file-provider:
files:
- file-id: pypirc
target: "$HOME/.pypirc"
- shell: !include-raw-escape: ../../shell/pypi-dist-build.sh
- publish-pypi:
pypi-server: release