blob: 173ba4cf7e75f6c5e4a6fd9f88b592dd9bc4ca43 [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 Grimbergebc710a2017-01-30 12:59:38 -080033
34 scm:
35 - gerrit-trigger-scm:
36 refspec: '$GERRIT_REFSPEC'
37 choosing-strategy: 'gerrit'
38
39 wrappers:
40 - ecomp-infra-wrappers:
41 build-timeout: '{build-timeout}'
42
43 triggers:
Andrew Grimberg94ef33d2017-01-31 05:16:56 -080044 - gerrit-trigger-patch-submitted:
45 server: '{server-name}'
46 project: '{project}'
Andrew Grimbergebc710a2017-01-30 12:59:38 -080047 branch: '{branch}'
Andrew Grimberg94ef33d2017-01-31 05:16:56 -080048 files: '{pattern}'
Andrew Grimbergebc710a2017-01-30 12:59:38 -080049
50 builders:
Andrew Grimbergd5410d12017-02-10 10:44:11 -080051 - provide-maven-settings:
52 global-settings-file: 'global-settings'
53 settings-file: '{mvn-settings}'
Andrew Grimbergebc710a2017-01-30 12:59:38 -080054 - shell: |
Andrew Grimberg673c9632017-02-16 06:21:00 -080055 #!/bin/bash
Andrew Grimbergebc710a2017-01-30 12:59:38 -080056 virtualenv $WORKSPACE/venv-tox
57 source $WORKSPACE/venv-tox/bin/activate
58 pip install --upgrade pip
59 pip install --upgrade tox argparse
60 pip freeze
61 cd $WORKSPACE/{path}
62 tox
63
Andrew Grimberg83f7ebf2017-01-31 04:44:44 -080064# publishers:
65# - ecomp-infra-shiplogs:
66# maven-version: 'mvn33'
DR695Hf68e9192017-02-20 17:06:47 -050067
68- job-template:
69 name: '{project-name}-{stream}-docker-shell-daily'
70 project-type: freestyle
71 node: 'ubuntu1604-docker-8c-8g'
72
73 properties:
74 - ecomp-infra-properties:
75 build-days-to-keep: '{build-days-to-keep}'
76
77 parameters:
78 - ecomp-infra-parameters:
79 project: '{project}'
80 branch: '{branch}'
81 refspec: 'refs/heads/{branch}'
82 artifacts: '{archive-artifacts}'
83
84 scm:
85 - gerrit-trigger-scm:
86 refspec: ''
87 choosing-strategy: 'default'
88
89 wrappers:
90 - ecomp-infra-wrappers:
91 build-timeout: '{build-timeout}'
92
93 triggers:
94 # 12 AM UTC
95 - timed: 'H 12 * * *'
96 - gerrit-trigger-release-manually:
97 server: '{server-name}'
98 project: '{project}'
99 branch: '{branch}'
100
101 builders:
102
103 - provide-maven-settings:
104 global-settings-file: 'global-settings'
105 settings-file: '{mvn-settings}'
106
107 - docker-login
108
DR695Hb6c0b2f2017-02-23 09:38:37 -0500109 - shell: |
110 cp $WORKSPACE/docker/* .
DR695H70135c12017-02-23 15:03:02 -0500111 docker -D build -t openecomp/testsuite .
DR695Hb6c0b2f2017-02-23 09:38:37 -0500112 export DOCKER_REPOSITORY="nexus3.openecomp.org:10003"
DR695H70135c12017-02-23 15:03:02 -0500113 docker tag openecomp/testsuite:latest $DOCKER_REPOSITORY/openecomp/testsuite:latest
jf9860f9cfaf42017-02-23 19:39:39 -0500114 docker push $DOCKER_REPOSITORY/openecomp/testsuite:latest
115
116- job-template:
117 name: '{project-name}-{stream}-2scm-docker-shell-daily'
118 project-type: freestyle
119 node: 'ubuntu1604-docker-8c-8g'
120
121 properties:
122 - ecomp-infra-properties:
123 build-days-to-keep: '{build-days-to-keep}'
124
125 parameters:
126 - ecomp-infra-parameters:
127 project: '{project}'
128 branch: '{branch}'
129 refspec: 'refs/heads/{branch}'
130 artifacts: '{archive-artifacts}'
131
132 scm:
133 - gerrit-trigger-scm:
134 refspec: ''
135 choosing-strategy: 'default'
136 - git-extra-project:
137 project: '{extra-project1}'
138 refspec: '{extra-refspec1}'
139 branch: '{extra-branch1}'
140 checkout-dir: '{checkout-dir1}'
141 - git-extra-project:
142 project: '{extra-project2}'
143 refspec: '{extra-refspec2}'
144 branch: '{extra-branch2}'
145 checkout-dir: '{checkout-dir2}'
146
147 wrappers:
148 - ecomp-infra-wrappers:
149 build-timeout: '{build-timeout}'
150
151 triggers:
152 # 12 AM UTC
153 - timed: 'H 12 * * *'
154 - gerrit-trigger-release-manually:
155 server: '{server-name}'
156 project: '{project}'
157 branch: '{branch}'
158
159 builders:
160
161 - provide-maven-settings:
162 global-settings-file: 'global-settings'
163 settings-file: '{mvn-settings}'
164
165 - docker-login
166
167 - shell: |
168 cp $WORKSPACE/docker/* .
169 docker -D build -t openecomp/testsuite .
170 export DOCKER_REPOSITORY="nexus3.openecomp.org:10003"
171 docker tag openecomp/testsuite:latest $DOCKER_REPOSITORY/openecomp/testsuite:latest
DR695H70135c12017-02-23 15:03:02 -0500172 docker push $DOCKER_REPOSITORY/openecomp/testsuite:latest