Adding a new verification job for testapi UI.
[releng.git] / jjb / releng / testresults-verify.yaml
1 ---
2 - project:
3     name: testresults-verify
4     stream:
5       - master:
6           branch: '{stream}'
7
8     module:
9       - 'testapi'
10       - 'reporting'
11
12     jobs:
13       - '{module}-verify-{stream}'
14       - '{module}-client-verify-{stream}'
15       - '{module}-ui-verify-{stream}'
16
17     project: 'releng-testresults'
18
19 - job-template:
20     name: '{module}-verify-{stream}'
21
22     parameters:
23       - project-parameter:
24           project: '{project}'
25           branch: '{branch}'
26       - 'opnfv-build-ubuntu-defaults'
27
28     scm:
29       - git-scm-gerrit
30
31     triggers:
32       - gerrit-trigger-patchset-created:
33           server: 'gerrit.opnfv.org'
34           project: '{project}'
35           branch: '{branch}'
36           files: '{module}/**'
37
38     builders:
39       - shell: |
40           cd {module}/
41           tox
42           if [ -e *.xml ];then
43               cp *.xml $WORKSPACE
44           fi
45
46     publishers:
47       - publish-coverage
48       - email-jenkins-admins-on-failure
49
50 - job-template:
51     name: '{module}-client-verify-{stream}'
52
53     parameters:
54       - project-parameter:
55           project: '{project}'
56           branch: '{branch}'
57       - 'opnfv-build-ubuntu-defaults'
58
59     scm:
60       - git-scm-gerrit
61
62     triggers:
63       - gerrit-trigger-patchset-created:
64           server: 'gerrit.opnfv.org'
65           project: '{project}'
66           branch: '{branch}'
67           files: '{module}/{module}-client/**'
68
69     builders:
70       - shell: |
71           cd {module}/{module}-client
72           tox
73           if [ -e *.xml ];then
74               cp *.xml $WORKSPACE
75           fi
76
77     publishers:
78       - publish-coverage
79       - email-jenkins-admins-on-failure
80
81 - job-template:
82     name: '{module}-ui-verify-{stream}'
83
84     parameters:
85       - project-parameter:
86           project: '{project}'
87           branch: '{branch}'
88       - 'opnfv-build-ubuntu-defaults'
89
90     scm:
91       - git-scm-gerrit
92
93     wrappers:
94       - nodejs-installator:
95           name: "testapi node"
96
97     triggers:
98       - gerrit-trigger-patchset-created:
99           server: 'gerrit.opnfv.org'
100           project: '{project}'
101           branch: '{branch}'
102           files: '{module}/opnfv_testapi/ui/**'
103
104     builders:
105       - shell: |
106           set -e
107
108           if ! which google-chrome > /dev/null; then
109               #Install Google Chrome
110               wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
111               echo 'deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main' | sudo tee \
112                   /etc/apt/sources.list.d/google-chrome.list
113               sudo apt-get update
114               sudo apt-get install -y google-chrome-stable
115           fi
116
117           npm -v
118           node -v
119           cd ./{module}/opnfv_testapi/ui/
120           npm install -g grunt-cli
121           npm install
122           grunt e2e
123           mv ../tests/UI/coverage/cobertura-coverage.xml ../../../coverage.xml # Moving coverage \
124              # xml to workspace as required by publish-coverage publisher.
125
126     publishers:
127       - text-finder-failures
128       - publish-coverage
129       - email-jenkins-admins-on-failure
130
131 - publisher:
132     name: 'text-finder-failures'
133     publishers:
134       - text-finder:
135           regexp: " 0 failures"
136           also-check-console-output: true
137           succeed-if-found: true