blob: dcc59855c33def6f28a2c33ae8e6f8b36a8548f2 [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 Grimbergce2286c2017-01-31 05:50:39 -080018 name: '{project-name}-{stream}-{subproject}-verify-python'
Andrew Grimbergebc710a2017-01-30 12:59:38 -080019 path: '$WORKSPACE'
20
21 project-type: freestyle
22 concurrent: true
23 node: '{build-node}'
24
Andrew Grimberg94ef33d2017-01-31 05:16:56 -080025 properties:
Andrew Grimberg4307a1c2017-03-16 13:00:00 -070026 - infra-properties:
Andrew Grimberg94ef33d2017-01-31 05:16:56 -080027 build-days-to-keep: '{build-days-to-keep}'
28
Andrew Grimbergebc710a2017-01-30 12:59:38 -080029 parameters:
Andrew Grimberg4307a1c2017-03-16 13:00:00 -070030 - infra-parameters:
Andrew Grimbergebc710a2017-01-30 12:59:38 -080031 project: '{project}'
32 branch: '{branch}'
33 refspec: 'refs/heads/{branch}'
Andrew Grimberg597853d2017-01-31 05:28:25 -080034 artifacts: '{archive-artifacts}'
Andrew Grimbergdcdce332017-02-24 11:27:09 -080035 - maven-exec:
Andrew Grimberge2465882017-02-24 12:38:05 -080036 maven-version: '{maven-version}'
Andrew Grimbergebc710a2017-01-30 12:59:38 -080037
38 scm:
39 - gerrit-trigger-scm:
40 refspec: '$GERRIT_REFSPEC'
41 choosing-strategy: 'gerrit'
Jeremy Phelps11f5d412017-06-30 13:56:19 -050042 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 Grimbergebc710a2017-01-30 12:59:38 -080046 build-timeout: '{build-timeout}'
47
48 triggers:
Andrew Grimberg94ef33d2017-01-31 05:16:56 -080049 - gerrit-trigger-patch-submitted:
50 server: '{server-name}'
51 project: '{project}'
Andrew Grimbergebc710a2017-01-30 12:59:38 -080052 branch: '{branch}'
Andrew Grimberg94ef33d2017-01-31 05:16:56 -080053 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:
58 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 \
Kevin Sandie5364852022-12-14 06:47:45 -060066 tox==3.27.1 tox-pyenv virtualenv
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
77 # Useful debugging
78 python --version
79 tox --version
80
Andrew Grimbergebc710a2017-01-30 12:59:38 -080081 tox
82
Andrew Grimberg4ecb8f22017-04-06 13:57:46 -070083 publishers:
Jessica Wagantall2a6a3802021-01-14 12:19:17 -080084 - lf-infra-publish
Jerry Floodffab4f72017-05-02 16:00:03 -040085
86- job-template:
Jessica Wagantalla0b80c62017-12-21 12:10:19 -080087 # Job template for docker daily jobs for 3 SCMs
88 #
89 # The purpose of this job template is to run:
90 # 1. inject a version properties file
91 # 2. login into the docker registry
92 # 4. run a specified shell script
93 #
94 # Required Variables:
95 # branch: git branch (eg. stable/lithium or master)
96
Jerry Floodffab4f72017-05-02 16:00:03 -040097 name: '{project-name}-{stream}-3scm-docker-shell-daily'
98 project-type: freestyle
gwud0b160d2018-07-17 09:46:52 -070099 node: 'queue-docker-4c-4g'
Jerry Floodffab4f72017-05-02 16:00:03 -0400100
101 properties:
102 - infra-properties:
103 build-days-to-keep: '{build-days-to-keep}'
104
105 parameters:
106 - infra-parameters:
107 project: '{project}'
108 branch: '{branch}'
109 refspec: 'refs/heads/{branch}'
110 artifacts: '{archive-artifacts}'
111 - maven-exec:
112 maven-version: '{maven-version}'
Jerry Floodffab4f72017-05-02 16:00:03 -0400113 scm:
114 - gerrit-trigger-scm:
115 refspec: ''
116 choosing-strategy: 'default'
Jeremy Phelps11f5d412017-06-30 13:56:19 -0500117 submodule-recursive: '{submodule-recursive}'
Jerry Floodffab4f72017-05-02 16:00:03 -0400118
119 wrappers:
gwuadeda5a2018-07-17 14:12:09 -0700120 - infra-wrappers-docker-build:
121 build-timeout: '{build-timeout}'
Jerry Floodffab4f72017-05-02 16:00:03 -0400122
123 triggers:
Gary Wu6b702fe2018-07-18 10:32:17 -0700124 - timed: 'H */4 * * *'
Jerry Floodffab4f72017-05-02 16:00:03 -0400125 - gerrit-trigger-release-manually:
126 server: '{server-name}'
127 project: '{project}'
128 branch: '{branch}'
Gary Wu601a2ff2018-07-30 17:50:12 -0700129 - gerrit-trigger-patch-merged:
130 server: '{server-name}'
131 project: '{project}'
132 branch: '{branch}'
133 files: '**'
Jerry Floodffab4f72017-05-02 16:00:03 -0400134
135 builders:
Jessica Wagantall05ae7da2018-10-22 17:32:33 -0700136 - lf-infra-pre-build
Jerry Floodffab4f72017-05-02 16:00:03 -0400137 - provide-maven-settings:
138 global-settings-file: 'global-settings'
139 settings-file: '{mvn-settings}'
Jerry Floodffab4f72017-05-02 16:00:03 -0400140 - inject:
141 properties-file: version.properties
Jerry Floodffab4f72017-05-02 16:00:03 -0400142 - docker-login
Jerry Floodffab4f72017-05-02 16:00:03 -0400143 - shell: '{script}'
Jessica Wagantall2a6a3802021-01-14 12:19:17 -0800144
Jerry Floodffab4f72017-05-02 16:00:03 -0400145 publishers:
Jessica Wagantall2a6a3802021-01-14 12:19:17 -0800146 - lf-infra-publish