blob: a2db6dad8b228edb41babe7dd0a1b19fe9b9953c [file] [log] [blame]
Andrew Grimbergebc710a2017-01-30 12:59:38 -08001---
2- job-template:
3 # Job template for python verify jobs
4 #
Jessica Wagantalla0b80c62017-12-21 12:10:19 -08005 # The purpose of this job template is to run:
6 # 1. tox
7 #
8 # This job supports subprojects.
Andrew Grimbergebc710a2017-01-30 12:59:38 -08009 #
10 # Required Variables:
11 # branch: git branch (eg. stable/lithium or master)
12 # Optional Variables:
13 # path: directory containing the project's tox.ini relative to
14 # the workspace. The default is the project root.
15 # pattern: ant file-path pattern relative to the workspace used to
16 # trigger the job
17
Andrew Grimbergc1f3caf2023-05-03 09:25:07 -070018 name: "{project-name}-{stream}-{subproject}-verify-python"
19 path: "$WORKSPACE"
Andrew Grimbergebc710a2017-01-30 12:59:38 -080020
21 project-type: freestyle
22 concurrent: true
Andrew Grimbergc1f3caf2023-05-03 09:25:07 -070023 node: "{build-node}"
Andrew Grimbergebc710a2017-01-30 12:59:38 -080024
Andrew Grimberg94ef33d2017-01-31 05:16:56 -080025 properties:
Andrew Grimberg4307a1c2017-03-16 13:00:00 -070026 - infra-properties:
Andrew Grimbergc1f3caf2023-05-03 09:25:07 -070027 build-days-to-keep: "{build-days-to-keep}"
Andrew Grimberg94ef33d2017-01-31 05:16:56 -080028
Andrew Grimbergebc710a2017-01-30 12:59:38 -080029 parameters:
Andrew Grimberg4307a1c2017-03-16 13:00:00 -070030 - infra-parameters:
Andrew Grimbergc1f3caf2023-05-03 09:25:07 -070031 project: "{project}"
32 branch: "{branch}"
33 refspec: "refs/heads/{branch}"
34 artifacts: "{archive-artifacts}"
Andrew Grimbergdcdce332017-02-24 11:27:09 -080035 - maven-exec:
Andrew Grimbergc1f3caf2023-05-03 09:25:07 -070036 maven-version: "{maven-version}"
Andrew Grimbergebc710a2017-01-30 12:59:38 -080037
38 scm:
39 - gerrit-trigger-scm:
Andrew Grimbergc1f3caf2023-05-03 09:25:07 -070040 refspec: "$GERRIT_REFSPEC"
41 choosing-strategy: "gerrit"
42 submodule-recursive: "{submodule-recursive}"
Andrew Grimbergebc710a2017-01-30 12:59:38 -080043
44 wrappers:
Andrew Grimberg4307a1c2017-03-16 13:00:00 -070045 - infra-wrappers:
Andrew Grimbergc1f3caf2023-05-03 09:25:07 -070046 build-timeout: "{build-timeout}"
Andrew Grimbergebc710a2017-01-30 12:59:38 -080047
48 triggers:
Andrew Grimberg94ef33d2017-01-31 05:16:56 -080049 - gerrit-trigger-patch-submitted:
Andrew Grimbergc1f3caf2023-05-03 09:25:07 -070050 server: "{server-name}"
51 project: "{project}"
52 branch: "{branch}"
53 files: "{pattern}"
Andrew Grimbergebc710a2017-01-30 12:59:38 -080054
55 builders:
Jessica Wagantall05ae7da2018-10-22 17:32:33 -070056 - lf-infra-pre-build
Andrew Grimbergd5410d12017-02-10 10:44:11 -080057 - provide-maven-settings:
Andrew Grimbergc1f3caf2023-05-03 09:25:07 -070058 global-settings-file: "global-settings"
59 settings-file: "{mvn-settings}"
Andrew Grimbergebc710a2017-01-30 12:59:38 -080060 - shell: |
Andrew Grimberg673c9632017-02-16 06:21:00 -080061 #!/bin/bash
Matthew Watkins1a16d1d2022-12-06 10:37:59 +000062 # shellcheck disable=SC1090
63 source ~/lf-env.sh
64
65 lf-activate-venv --python python3.8 --venv-file /tmp/.toxenv \
Matthew Watkinsaeea34a2023-04-26 11:44:01 +010066 tox virtualenv argparse webtest
Matthew Watkins1a16d1d2022-12-06 10:37:59 +000067
68 if [[ -d /opt/pyenv ]]; then
69 echo "---> Setting up pyenv"
70 export PYENV_ROOT="/opt/pyenv"
71 export PATH="$PYENV_ROOT/bin:$PATH"
72 PYTHONPATH="$(pwd)"
73 export PYTHONPATH
74 export TOX_TESTENV_PASSENV=PYTHONPATH
75 fi
76
Matthew Watkinsd2ad4722023-01-24 10:21:32 +000077 python -m pip install --upgrade pip
Matthew Watkinsd2ad4722023-01-24 10:21:32 +000078
Matthew Watkins1a16d1d2022-12-06 10:37:59 +000079 # Useful debugging
80 python --version
Matthew Watkinsd2ad4722023-01-24 10:21:32 +000081 python -m pip freeze
Matthew Watkins1a16d1d2022-12-06 10:37:59 +000082 tox --version
83
Matthew Watkinsd2ad4722023-01-24 10:21:32 +000084 cd $WORKSPACE/{path}
Andrew Grimbergebc710a2017-01-30 12:59:38 -080085 tox
86
Andrew Grimberg4ecb8f22017-04-06 13:57:46 -070087 publishers:
Jessica Wagantall2a6a3802021-01-14 12:19:17 -080088 - lf-infra-publish
Jerry Floodffab4f72017-05-02 16:00:03 -040089
90- job-template:
Jessica Wagantalla0b80c62017-12-21 12:10:19 -080091 # Job template for docker daily jobs for 3 SCMs
92 #
93 # The purpose of this job template is to run:
94 # 1. inject a version properties file
95 # 2. login into the docker registry
96 # 4. run a specified shell script
97 #
98 # Required Variables:
99 # branch: git branch (eg. stable/lithium or master)
100
Andrew Grimbergc1f3caf2023-05-03 09:25:07 -0700101 name: "{project-name}-{stream}-3scm-docker-shell-daily"
Jerry Floodffab4f72017-05-02 16:00:03 -0400102 project-type: freestyle
Andrew Grimbergc1f3caf2023-05-03 09:25:07 -0700103 node: "queue-docker-4c-4g"
Jerry Floodffab4f72017-05-02 16:00:03 -0400104
105 properties:
106 - infra-properties:
Andrew Grimbergc1f3caf2023-05-03 09:25:07 -0700107 build-days-to-keep: "{build-days-to-keep}"
Jerry Floodffab4f72017-05-02 16:00:03 -0400108
109 parameters:
110 - infra-parameters:
Andrew Grimbergc1f3caf2023-05-03 09:25:07 -0700111 project: "{project}"
112 branch: "{branch}"
113 refspec: "refs/heads/{branch}"
114 artifacts: "{archive-artifacts}"
Jerry Floodffab4f72017-05-02 16:00:03 -0400115 - maven-exec:
Andrew Grimbergc1f3caf2023-05-03 09:25:07 -0700116 maven-version: "{maven-version}"
Jerry Floodffab4f72017-05-02 16:00:03 -0400117 scm:
118 - gerrit-trigger-scm:
Andrew Grimbergc1f3caf2023-05-03 09:25:07 -0700119 refspec: ""
120 choosing-strategy: "default"
121 submodule-recursive: "{submodule-recursive}"
Jerry Floodffab4f72017-05-02 16:00:03 -0400122
123 wrappers:
gwuadeda5a2018-07-17 14:12:09 -0700124 - infra-wrappers-docker-build:
Andrew Grimbergc1f3caf2023-05-03 09:25:07 -0700125 build-timeout: "{build-timeout}"
Jerry Floodffab4f72017-05-02 16:00:03 -0400126
127 triggers:
Andrew Grimbergc1f3caf2023-05-03 09:25:07 -0700128 - timed: "H */4 * * *"
Jerry Floodffab4f72017-05-02 16:00:03 -0400129 - gerrit-trigger-release-manually:
Andrew Grimbergc1f3caf2023-05-03 09:25:07 -0700130 server: "{server-name}"
131 project: "{project}"
132 branch: "{branch}"
Gary Wu601a2ff2018-07-30 17:50:12 -0700133 - gerrit-trigger-patch-merged:
Andrew Grimbergc1f3caf2023-05-03 09:25:07 -0700134 server: "{server-name}"
135 project: "{project}"
136 branch: "{branch}"
137 files: "**"
Jerry Floodffab4f72017-05-02 16:00:03 -0400138
139 builders:
Jessica Wagantall05ae7da2018-10-22 17:32:33 -0700140 - lf-infra-pre-build
Jerry Floodffab4f72017-05-02 16:00:03 -0400141 - provide-maven-settings:
Andrew Grimbergc1f3caf2023-05-03 09:25:07 -0700142 global-settings-file: "global-settings"
143 settings-file: "{mvn-settings}"
Jerry Floodffab4f72017-05-02 16:00:03 -0400144 - inject:
145 properties-file: version.properties
Jerry Floodffab4f72017-05-02 16:00:03 -0400146 - docker-login
Andrew Grimbergc1f3caf2023-05-03 09:25:07 -0700147 - shell: "{script}"
Jessica Wagantall2a6a3802021-01-14 12:19:17 -0800148
Jerry Floodffab4f72017-05-02 16:00:03 -0400149 publishers:
Jessica Wagantall2a6a3802021-01-14 12:19:17 -0800150 - lf-infra-publish