8332f5bb4284e0a4d9ffd5e919598f330fe19274
[releng.git] / jjb / releng / testapi-automate.yml
1 - project:
2     name: testapi-automate
3     stream:
4         - master:
5             branch: '{stream}'
6             gs-pathname: ''
7     jobs:
8         - 'testapi-automate-{stream}'
9         - 'testapi-verify-{stream}'
10
11     project: 'releng'
12
13 - job:
14     name: 'testapi-mongodb-backup'
15
16     slave-label: 'testresults'
17
18     scm:
19         - git-scm
20
21     triggers:
22         - timed: '@weekly'
23
24     builders:
25         - mongodb-backup
26
27 - job-template:
28     name: 'testapi-verify-{stream}'
29
30     parameters:
31         - project-parameter:
32             project: '{project}'
33         - gerrit-parameter:
34             branch: '{branch}'
35         - 'opnfv-build-ubuntu-defaults'
36
37     scm:
38         - git-scm-gerrit
39
40     triggers:
41         - gerrit:
42             server-name: 'gerrit.opnfv.org'
43             trigger-on:
44                 - patchset-created-event:
45                     exclude-drafts: 'false'
46                     exclude-trivial-rebase: 'false'
47                     exclude-no-code-change: 'false'
48                 - draft-published-event
49                 - comment-added-contains-event:
50                     comment-contains-value: 'recheck'
51                 - comment-added-contains-event:
52                     comment-contains-value: 'reverify'
53             projects:
54               - project-compare-type: 'ANT'
55                 project-pattern: '{project}'
56                 branches:
57                   - branch-compare-type: 'ANT'
58                     branch-pattern: '**/{branch}'
59                 file-paths:
60                   - compare-type: 'ANT'
61                     pattern: 'utils/test/testapi/**'
62
63     builders:
64         - run-unit-tests
65
66     publishers:
67         - junit:
68             results: nosetests.xml
69         - cobertura:
70             report-file: "coverage.xml"
71             only-stable: "true"
72             health-auto-update: "false"
73             stability-auto-update: "false"
74             zoom-coverage-chart: "true"
75             targets:
76                 - files:
77                     healthy: 10
78                     unhealthy: 20
79                     failing: 30
80                 - method:
81                     healthy: 50
82                     unhealthy: 40
83                     failing: 30
84
85 - job-template:
86     name: 'testapi-automate-{stream}'
87
88     parameters:
89         - project-parameter:
90             project: '{project}'
91         - gerrit-parameter:
92             branch: '{branch}'
93         - string:
94             name: DOCKER_TAG
95             default: "latest"
96             description: "Tag name for testapi docker image"
97         - 'opnfv-build-defaults'
98
99     scm:
100         - git-scm
101
102     triggers:
103         - gerrit:
104             server-name: 'gerrit.opnfv.org'
105             trigger-on:
106                 - change-merged-event
107                 - comment-added-contains-event:
108                     comment-contains-value: 'remerge'
109             projects:
110               - project-compare-type: 'ANT'
111                 project-pattern: '{project}'
112                 branches:
113                   - branch-compare-type: 'ANT'
114                     branch-pattern: '**/{branch}'
115                 file-paths:
116                   - compare-type: 'ANT'
117                     pattern: 'utils/**'
118
119     builders:
120         - docker-update
121         - testapi-doc-build
122         - upload-doc-artifact
123
124 ################################
125 # job builders
126 ################################
127 - builder:
128     name: mongodb-backup
129     builders:
130         - shell: |
131             bash ./jjb/releng/testapi-backup-mongodb.sh
132
133 - builder:
134     name: run-unit-tests
135     builders:
136         - shell: |
137             bash ./utils/test/testapi/run_test.sh
138
139 - builder:
140     name: docker-update
141     builders:
142         - shell: |
143             bash ./jjb/releng/testapi-docker-update.sh
144
145 - builder:
146     name: testapi-doc-build
147     builders:
148         - shell: |
149             bash ./utils/test/testapi/htmlize/doc-build.sh
150
151 - builder:
152     name: upload-doc-artifact
153     builders:
154         - shell: |
155             bash ./utils/test/testapi/htmlize/push-doc-artifact.sh