blob: 48ef46a29121b25150b2b78e318e33ca233c49da [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:
24 - ecomp-infra-properties:
25 build-days-to-keep: '{build-days-to-keep}'
26
Andrew Grimbergebc710a2017-01-30 12:59:38 -080027 parameters:
28 - ecomp-infra-parameters:
29 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:
42 - ecomp-infra-wrappers:
43 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 Grimberg83f7ebf2017-01-31 04:44:44 -080066# publishers:
67# - ecomp-infra-shiplogs:
Andrew Grimberge2465882017-02-24 12:38:05 -080068# 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:
76 - ecomp-infra-properties:
77 build-days-to-keep: '{build-days-to-keep}'
78
79 parameters:
80 - ecomp-infra-parameters:
81 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:
94 - ecomp-infra-wrappers:
95 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 .
DR695Hb6c0b2f2017-02-23 09:38:37 -0500116 export DOCKER_REPOSITORY="nexus3.openecomp.org:10003"
DR695H70135c12017-02-23 15:03:02 -0500117 docker tag openecomp/testsuite:latest $DOCKER_REPOSITORY/openecomp/testsuite:latest
jf9860f9cfaf42017-02-23 19:39:39 -0500118 docker push $DOCKER_REPOSITORY/openecomp/testsuite:latest
119
120- job-template:
121 name: '{project-name}-{stream}-2scm-docker-shell-daily'
122 project-type: freestyle
123 node: 'ubuntu1604-docker-8c-8g'
124
125 properties:
126 - ecomp-infra-properties:
127 build-days-to-keep: '{build-days-to-keep}'
128
129 parameters:
130 - ecomp-infra-parameters:
131 project: '{project}'
132 branch: '{branch}'
133 refspec: 'refs/heads/{branch}'
134 artifacts: '{archive-artifacts}'
Andrew Grimbergdcdce332017-02-24 11:27:09 -0800135 - maven-exec:
Andrew Grimberge2465882017-02-24 12:38:05 -0800136 maven-version: '{maven-version}'
jf9860f9cfaf42017-02-23 19:39:39 -0500137
138 scm:
139 - gerrit-trigger-scm:
140 refspec: ''
141 choosing-strategy: 'default'
142 - git-extra-project:
143 project: '{extra-project1}'
144 refspec: '{extra-refspec1}'
145 branch: '{extra-branch1}'
146 checkout-dir: '{checkout-dir1}'
147 - git-extra-project:
148 project: '{extra-project2}'
149 refspec: '{extra-refspec2}'
150 branch: '{extra-branch2}'
151 checkout-dir: '{checkout-dir2}'
152
153 wrappers:
154 - ecomp-infra-wrappers:
155 build-timeout: '{build-timeout}'
156
157 triggers:
158 # 12 AM UTC
159 - timed: 'H 12 * * *'
160 - gerrit-trigger-release-manually:
161 server: '{server-name}'
162 project: '{project}'
163 branch: '{branch}'
164
165 builders:
166
167 - provide-maven-settings:
168 global-settings-file: 'global-settings'
169 settings-file: '{mvn-settings}'
170
171 - docker-login
172
173 - shell: |
174 cp $WORKSPACE/docker/* .
175 docker -D build -t openecomp/testsuite .
176 export DOCKER_REPOSITORY="nexus3.openecomp.org:10003"
177 docker tag openecomp/testsuite:latest $DOCKER_REPOSITORY/openecomp/testsuite:latest
Andrew Grimbergdcdce332017-02-24 11:27:09 -0800178 docker push $DOCKER_REPOSITORY/openecomp/testsuite:latest