3 name: '{project-name}-python-jobs'
5 # This job group contains all the recommended jobs that should be deployed
6 # for any project ci that is using Gerrit.
12 name: '{project-name}-github-python-jobs'
14 # This job group contains all the recommended jobs that should be deployed
15 # for any project ci that is using GitHub.
24 - lf_tox_verify: &lf_tox_verify
27 # Tox runner to verify a project
29 # Runs tox to verify a project.
31 # Required Parameters:
33 # :build-node: The node to run build on.
34 # :jenkins-ssh-credential: Credential to use for SSH. (Generally should
35 # be configured in defaults.yaml)
37 # Optional Parameters:
39 # :branch: The branch to build against. (default: master)
40 # :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
41 # :build-timeout: Timeout in seconds before aborting build. (default: 10)
42 # :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
43 # :stream: Keyword that can be used to represent a release code-name.
44 # Often the same as the branch. (default: master)
45 # :submodule-recursive: Whether to checkout submodules recursively.
47 # :tox-dir: Directory containing the project's tox.ini relative to
48 # the workspace. Empty works if tox.ini is at project root.
50 # :tox-envs: Tox environments to run. If blank run everything described
51 # in tox.ini. (default: '')
53 ######################
54 # Default parameters #
55 ######################
60 git-url: '$GIT_URL/$GERRIT_PROJECT'
62 submodule-recursive: true
70 project-type: freestyle
75 - lf-infra-properties:
76 build-days-to-keep: '{build-days-to-keep}'
79 - lf-infra-parameters:
83 lftools-version: '{lftools-version}'
84 - lf-infra-tox-parameters:
86 tox-envs: '{tox-envs}'
90 build-timeout: '{build-timeout}'
91 jenkins-ssh-credential: '{jenkins-ssh-credential}'
94 - shell: !include-raw-escape:
95 # Workaround issue where the tox run later breaks the lftools virtualenv.
96 # Without running the install first the run in the publisher will fail
97 # due to missing lftools because it gets installed into a tox venv.
98 - ../shell/lftools-install.sh
99 - shell: !include-raw-escape:
100 - ../shell/tox-install.sh
101 - ../shell/tox-run.sh
107 # Python projects typically use tox to run testing.
108 name: '{project-name}-tox-verify-{stream}'
109 id: gerrit-tox-verify
112 ######################
113 # Default parameters #
114 ######################
116 gerrit_verify_triggers:
117 - patchset-created-event:
119 exclude-trivial-rebase: false
120 exclude-no-code-change: false
121 - draft-published-event
122 - comment-added-contains-event:
123 comment-contains-value: recheck$
125 #####################
126 # Job Configuration #
127 #####################
130 - lf-infra-gerrit-scm:
131 jenkins-ssh-credential: '{jenkins-ssh-credential}'
133 refspec: '$GERRIT_REFSPEC'
134 branch: '$GERRIT_BRANCH'
135 submodule-recursive: '{submodule-recursive}'
136 choosing-strategy: gerrit
140 server-name: '{gerrit-server-name}'
141 trigger-on: '{obj:gerrit_verify_triggers}'
143 - project-compare-type: ANT
144 project-pattern: '{project}'
146 - branch-compare-type: ANT
147 branch-pattern: '**/{branch}'
150 # Python projects typically use tox to run testing.
151 name: '{project-name}-tox-verify-{stream}'
152 id: github-tox-verify
157 url: '{git-url}/{github-org}/{project}'
160 - lf-infra-github-scm:
161 url: '{git-clone-url}{github-org}/{project}'
162 refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
164 submodule-recursive: '{submodule-recursive}'
165 choosing-strategy: default
166 jenkins-ssh-credential: '{jenkins-ssh-credential}'
169 - github-pull-request:
170 trigger-phrase: '^recheck$'
171 only-trigger-phrase: false
172 status-context: 'JJB Verify'
175 auto-close-on-fail: false