--- - job-group: name: '{project-name}-python-jobs' # This job group contains all the recommended jobs that should be deployed # for any project ci that is using Gerrit. jobs: - gerrit-tox-verify - job-group: name: '{project-name}-github-python-jobs' # This job group contains all the recommended jobs that should be deployed # for any project ci that is using GitHub. jobs: - github-tox-verify ########## # Macros # ########## - builder: name: lf-infra-tox-install builders: - inject: properties-content: 'PYTHON_VERSION={python-version}' - shell: !include-raw-escape: ../shell/tox-install.sh ############## # Tox Verify # ############## - lf_tox_verify: &lf_tox_verify name: lf-tox-verify ###################### # Default parameters # ###################### branch: master build-days-to-keep: 7 build-timeout: 15 git-url: '$GIT_URL/$GERRIT_PROJECT' python-version: python2 stream: master submodule-recursive: true tox-dir: '' tox-envs: '' ##################### # Job Configuration # ##################### project-type: freestyle node: '{build-node}' concurrent: true properties: - lf-infra-properties: build-days-to-keep: '{build-days-to-keep}' 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}' wrappers: - lf-infra-wrappers: build-timeout: '{build-timeout}' jenkins-ssh-credential: '{jenkins-ssh-credential}' builders: - shell: !include-raw-escape: # Workaround issue where the tox run later breaks the lftools virtualenv. # Without running the install first the run in the publisher will fail # due to missing lftools because it gets installed into a tox venv. - ../shell/lftools-install.sh - lf-infra-tox-install: python-version: '{python-version}' - shell: !include-raw-escape: ../shell/tox-run.sh publishers: - lf-infra-publish - job-template: # Python projects typically use tox to run testing. name: '{project-name}-tox-verify-{stream}' id: gerrit-tox-verify <<: *lf_tox_verify ###################### # Default parameters # ###################### gerrit_verify_triggers: - patchset-created-event: exclude-drafts: true exclude-trivial-rebase: false exclude-no-code-change: false - draft-published-event - comment-added-contains-event: comment-contains-value: recheck$ ##################### # Job Configuration # ##################### scm: - lf-infra-gerrit-scm: jenkins-ssh-credential: '{jenkins-ssh-credential}' git-url: '{git-url}' refspec: '$GERRIT_REFSPEC' branch: '$GERRIT_BRANCH' submodule-recursive: '{submodule-recursive}' choosing-strategy: gerrit triggers: - gerrit: server-name: '{gerrit-server-name}' trigger-on: '{obj:gerrit_verify_triggers}' projects: - project-compare-type: ANT project-pattern: '{project}' branches: - branch-compare-type: ANT branch-pattern: '**/{branch}' - job-template: # Python projects typically use tox to run testing. name: '{project-name}-tox-verify-{stream}' id: github-tox-verify <<: *lf_tox_verify properties: - github: url: '{git-url}/{github-org}/{project}' scm: - lf-infra-github-scm: url: '{git-clone-url}{github-org}/{project}' refspec: '+refs/pull/*:refs/remotes/origin/pr/*' branch: '$sha1' submodule-recursive: '{submodule-recursive}' choosing-strategy: default jenkins-ssh-credential: '{jenkins-ssh-credential}' triggers: - github-pull-request: trigger-phrase: '^recheck$' only-trigger-phrase: false status-context: 'JJB Verify' permit-all: true github-hooks: true auto-close-on-fail: false