blob: 63f6131f8a919e34cd913f7b298f80c9062c997b [file] [log] [blame]
Andrew Grimbergebc710a2017-01-30 12:59:38 -08001---
2- job-template:
3 # Job template for python verify jobs
4 #
5 # The purpose of this job template is to run tox for projects using this
6 # template.
7 #
8 # Required Variables:
9 # branch: git branch (eg. stable/lithium or master)
10 # Optional Variables:
11 # path: directory containing the project's tox.ini relative to
12 # the workspace. The default is the project root.
13 # pattern: ant file-path pattern relative to the workspace used to
14 # trigger the job
15
Andrew Grimbergce2286c2017-01-31 05:50:39 -080016 name: '{project-name}-{stream}-{subproject}-verify-python'
Andrew Grimbergebc710a2017-01-30 12:59:38 -080017 path: '$WORKSPACE'
18
19 project-type: freestyle
20 concurrent: true
21 node: '{build-node}'
22
Andrew Grimberg94ef33d2017-01-31 05:16:56 -080023 properties:
Andrew Grimberg4307a1c2017-03-16 13:00:00 -070024 - infra-properties:
Andrew Grimberg94ef33d2017-01-31 05:16:56 -080025 build-days-to-keep: '{build-days-to-keep}'
26
Andrew Grimbergebc710a2017-01-30 12:59:38 -080027 parameters:
Andrew Grimberg4307a1c2017-03-16 13:00:00 -070028 - infra-parameters:
Andrew Grimbergebc710a2017-01-30 12:59:38 -080029 project: '{project}'
30 branch: '{branch}'
31 refspec: 'refs/heads/{branch}'
Andrew Grimberg597853d2017-01-31 05:28:25 -080032 artifacts: '{archive-artifacts}'
Andrew Grimbergdcdce332017-02-24 11:27:09 -080033 - maven-exec:
Andrew Grimberge2465882017-02-24 12:38:05 -080034 maven-version: '{maven-version}'
Andrew Grimbergebc710a2017-01-30 12:59:38 -080035
36 scm:
37 - gerrit-trigger-scm:
38 refspec: '$GERRIT_REFSPEC'
39 choosing-strategy: 'gerrit'
40
41 wrappers:
Andrew Grimberg4307a1c2017-03-16 13:00:00 -070042 - infra-wrappers:
Andrew Grimbergebc710a2017-01-30 12:59:38 -080043 build-timeout: '{build-timeout}'
44
45 triggers:
Andrew Grimberg94ef33d2017-01-31 05:16:56 -080046 - gerrit-trigger-patch-submitted:
47 server: '{server-name}'
48 project: '{project}'
Andrew Grimbergebc710a2017-01-30 12:59:38 -080049 branch: '{branch}'
Andrew Grimberg94ef33d2017-01-31 05:16:56 -080050 files: '{pattern}'
Andrew Grimbergebc710a2017-01-30 12:59:38 -080051
52 builders:
Andrew Grimbergd5410d12017-02-10 10:44:11 -080053 - provide-maven-settings:
54 global-settings-file: 'global-settings'
55 settings-file: '{mvn-settings}'
Andrew Grimbergebc710a2017-01-30 12:59:38 -080056 - shell: |
Andrew Grimberg673c9632017-02-16 06:21:00 -080057 #!/bin/bash
Andrew Grimbergebc710a2017-01-30 12:59:38 -080058 virtualenv $WORKSPACE/venv-tox
59 source $WORKSPACE/venv-tox/bin/activate
60 pip install --upgrade pip
61 pip install --upgrade tox argparse
62 pip freeze
63 cd $WORKSPACE/{path}
64 tox
65
Andrew Grimberg4ecb8f22017-04-06 13:57:46 -070066 publishers:
67 - infra-shiplogs:
68 maven-version: '{maven-version}'
DR695Hf68e9192017-02-20 17:06:47 -050069
70- job-template:
71 name: '{project-name}-{stream}-docker-shell-daily'
72 project-type: freestyle
73 node: 'ubuntu1604-docker-8c-8g'
74
75 properties:
Andrew Grimberg4307a1c2017-03-16 13:00:00 -070076 - infra-properties:
DR695Hf68e9192017-02-20 17:06:47 -050077 build-days-to-keep: '{build-days-to-keep}'
78
79 parameters:
Andrew Grimberg4307a1c2017-03-16 13:00:00 -070080 - infra-parameters:
DR695Hf68e9192017-02-20 17:06:47 -050081 project: '{project}'
82 branch: '{branch}'
83 refspec: 'refs/heads/{branch}'
84 artifacts: '{archive-artifacts}'
Andrew Grimbergdcdce332017-02-24 11:27:09 -080085 - maven-exec:
Andrew Grimberge2465882017-02-24 12:38:05 -080086 maven-version: '{maven-version}'
DR695Hf68e9192017-02-20 17:06:47 -050087
88 scm:
89 - gerrit-trigger-scm:
90 refspec: ''
91 choosing-strategy: 'default'
92
93 wrappers:
Andrew Grimberg4307a1c2017-03-16 13:00:00 -070094 - infra-wrappers:
DR695Hf68e9192017-02-20 17:06:47 -050095 build-timeout: '{build-timeout}'
96
97 triggers:
98 # 12 AM UTC
99 - timed: 'H 12 * * *'
100 - gerrit-trigger-release-manually:
101 server: '{server-name}'
102 project: '{project}'
103 branch: '{branch}'
104
105 builders:
106
107 - provide-maven-settings:
108 global-settings-file: 'global-settings'
109 settings-file: '{mvn-settings}'
110
111 - docker-login
112
DR695Hb6c0b2f2017-02-23 09:38:37 -0500113 - shell: |
114 cp $WORKSPACE/docker/* .
DR695H70135c12017-02-23 15:03:02 -0500115 docker -D build -t openecomp/testsuite .
Jeremy Phelps48028ab2017-03-28 15:38:24 -0500116 export REPO="nexus3.onap.org:10003"
Jerry Floodb7e2fe22017-03-24 14:26:37 -0400117 docker tag openecomp/testsuite:latest $REPO/openecomp/testsuite:1.0-STAGING-latest
Jerry Flood4b202392017-03-24 11:33:32 -0400118 docker push $REPO/openecomp/testsuite:1.0-STAGING-latest
jf9860f9cfaf42017-02-23 19:39:39 -0500119
Andrew Grimberg4ecb8f22017-04-06 13:57:46 -0700120 publishers:
121 - infra-shiplogs:
122 maven-version: '{maven-version}'
123
jf9860f9cfaf42017-02-23 19:39:39 -0500124- job-template:
125 name: '{project-name}-{stream}-2scm-docker-shell-daily'
126 project-type: freestyle
127 node: 'ubuntu1604-docker-8c-8g'
128
129 properties:
Andrew Grimberg4307a1c2017-03-16 13:00:00 -0700130 - infra-properties:
jf9860f9cfaf42017-02-23 19:39:39 -0500131 build-days-to-keep: '{build-days-to-keep}'
132
133 parameters:
Andrew Grimberg4307a1c2017-03-16 13:00:00 -0700134 - infra-parameters:
jf9860f9cfaf42017-02-23 19:39:39 -0500135 project: '{project}'
136 branch: '{branch}'
137 refspec: 'refs/heads/{branch}'
138 artifacts: '{archive-artifacts}'
Andrew Grimbergdcdce332017-02-24 11:27:09 -0800139 - maven-exec:
Andrew Grimberge2465882017-02-24 12:38:05 -0800140 maven-version: '{maven-version}'
jf9860f9cfaf42017-02-23 19:39:39 -0500141
142 scm:
143 - gerrit-trigger-scm:
144 refspec: ''
145 choosing-strategy: 'default'
146 - git-extra-project:
147 project: '{extra-project1}'
148 refspec: '{extra-refspec1}'
149 branch: '{extra-branch1}'
150 checkout-dir: '{checkout-dir1}'
151 - git-extra-project:
152 project: '{extra-project2}'
153 refspec: '{extra-refspec2}'
154 branch: '{extra-branch2}'
155 checkout-dir: '{checkout-dir2}'
156
157 wrappers:
Andrew Grimberg4307a1c2017-03-16 13:00:00 -0700158 - infra-wrappers:
jf9860f9cfaf42017-02-23 19:39:39 -0500159 build-timeout: '{build-timeout}'
160
161 triggers:
162 # 12 AM UTC
163 - timed: 'H 12 * * *'
164 - gerrit-trigger-release-manually:
165 server: '{server-name}'
166 project: '{project}'
167 branch: '{branch}'
168
169 builders:
170
171 - provide-maven-settings:
172 global-settings-file: 'global-settings'
173 settings-file: '{mvn-settings}'
174
Jerry Floodb6850ad2017-03-29 09:36:25 -0400175 - inject:
176 properties-file: version.properties
177
jf9860f9cfaf42017-02-23 19:39:39 -0500178 - docker-login
179
180 - shell: |
181 cp $WORKSPACE/docker/* .
182 docker -D build -t openecomp/testsuite .
Jeremy Phelps48028ab2017-03-28 15:38:24 -0500183 export REPO="nexus3.onap.org:10003"
Jerry Floodb6850ad2017-03-29 09:36:25 -0400184 for tag in $tags
185 do
186 docker tag openecomp/testsuite:latest $REPO/openecomp/testsuite:$tag
187 docker push $REPO/openecomp/testsuite:$tag
188 done
Andrew Grimberg4ecb8f22017-04-06 13:57:46 -0700189
190 publishers:
191 - infra-shiplogs:
192 maven-version: '{maven-version}'