Merge "OPARENT-Refactor CLM project block"
[ci-management.git] / jjb / global-templates-python.yaml
1 ---
2 - job-template:
3     # Job template for python verify jobs
4     #
5     # The purpose of this job template is to run:
6     # 1. tox
7     #
8     # This job supports subprojects.
9     #
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
18     name: '{project-name}-{stream}-{subproject}-verify-python'
19     path: '$WORKSPACE'
20
21     project-type: freestyle
22     concurrent: true
23     node: '{build-node}'
24
25     properties:
26       - infra-properties:
27           build-days-to-keep: '{build-days-to-keep}'
28
29     parameters:
30       - infra-parameters:
31           project: '{project}'
32           branch: '{branch}'
33           refspec: 'refs/heads/{branch}'
34           artifacts: '{archive-artifacts}'
35       - maven-exec:
36           maven-version: '{maven-version}'
37
38     scm:
39       - gerrit-trigger-scm:
40           refspec: '$GERRIT_REFSPEC'
41           choosing-strategy: 'gerrit'
42           submodule-recursive: '{submodule-recursive}'
43
44     wrappers:
45       - infra-wrappers:
46           build-timeout: '{build-timeout}'
47
48     triggers:
49       - gerrit-trigger-patch-submitted:
50           server: '{server-name}'
51           project: '{project}'
52           branch: '{branch}'
53           files: '{pattern}'
54
55     builders:
56       - lf-infra-pre-build
57       - provide-maven-settings:
58           global-settings-file: 'global-settings'
59           settings-file: '{mvn-settings}'
60       - shell: |
61           #!/bin/bash
62           virtualenv $WORKSPACE/venv-tox
63           source $WORKSPACE/venv-tox/bin/activate
64           pip install --upgrade pip
65           pip install --upgrade tox argparse
66           pip freeze
67           cd $WORKSPACE/{path}
68           tox
69
70     publishers:
71       - infra-shiplogs:
72           maven-version: '{maven-version}'
73
74
75 - job-template:
76     # Job template for docker daily jobs for 3 SCMs
77     #
78     # The purpose of this job template is to run:
79     # 1. inject a version properties file
80     # 2. login into the docker registry
81     # 4. run a specified shell script
82     #
83     # Required Variables:
84     #     branch:    git branch (eg. stable/lithium or master)
85
86     name: '{project-name}-{stream}-3scm-docker-shell-daily'
87     project-type: freestyle
88     node: 'queue-docker-4c-4g'
89
90     properties:
91       - infra-properties:
92           build-days-to-keep: '{build-days-to-keep}'
93
94     parameters:
95       - infra-parameters:
96           project: '{project}'
97           branch: '{branch}'
98           refspec: 'refs/heads/{branch}'
99           artifacts: '{archive-artifacts}'
100       - maven-exec:
101           maven-version: '{maven-version}'
102
103     scm:
104       - gerrit-trigger-scm:
105           refspec: ''
106           choosing-strategy: 'default'
107           submodule-recursive: '{submodule-recursive}'
108       - git-extra-project:
109           project: '{extra-project1}'
110           refspec: '{extra-refspec1}'
111           branch: '{extra-branch1}'
112           checkout-dir: '{checkout-dir1}'
113       - git-extra-project:
114           project: '{extra-project2}'
115           refspec: '{extra-refspec2}'
116           branch: '{extra-branch2}'
117           checkout-dir: '{checkout-dir2}'
118       - git-extra-project:
119           project: '{extra-project3}'
120           refspec: '{extra-refspec3}'
121           branch: '{extra-branch3}'
122           checkout-dir: '{checkout-dir3}'
123
124     wrappers:
125       - infra-wrappers-docker-build:
126           build-timeout: '{build-timeout}'
127
128     triggers:
129       - timed: 'H */4 * * *'
130       - gerrit-trigger-release-manually:
131           server: '{server-name}'
132           project: '{project}'
133           branch: '{branch}'
134       - gerrit-trigger-patch-merged:
135           server: '{server-name}'
136           project: '{project}'
137           branch: '{branch}'
138           files: '**'
139
140     builders:
141       - lf-infra-pre-build
142       - provide-maven-settings:
143           global-settings-file: 'global-settings'
144           settings-file: '{mvn-settings}'
145       - inject:
146           properties-file: version.properties
147       - docker-login
148       - shell: '{script}'
149     publishers:
150       - infra-shiplogs:
151           maven-version: '{maven-version}'