blob: 2259350a9966b2dc270712b83eefc453c0448d28 [file] [log] [blame]
Kailash Khalasi8831df02018-05-31 10:11:13 -07001---
2# xos tosca unit test
3
4- job-template:
5 id: 'xos-tosca-unit-test'
6 name: 'verify_{project}_unit-test'
7
8 description: |
9 Created by {id} job-template from ci-management/jjb/xos-tosca-unit.yaml
10
11 triggers:
12 - cord-infra-gerrit-trigger-patchset:
13 gerrit-server-name: '{gerrit-server-name}'
14 project-regexp: '^{project}$'
15 branch-regexp: '{branch-regexp}'
16 dependency-jobs: '{dependency-jobs}'
17 file-include-regexp: '{all-files-regexp}'
18
19 properties:
20 - cord-infra-properties:
21 build-days-to-keep: '{build-days-to-keep}'
22 artifact-num-to-keep: '{artifact-num-to-keep}'
23
24 wrappers:
25 - lf-infra-wrappers:
Zack Williams9b21af52018-08-30 15:36:39 -070026 build-timeout: '{build-timeout}'
Kailash Khalasi8831df02018-05-31 10:11:13 -070027 jenkins-ssh-credential: '{jenkins-ssh-credential}'
28
29 scm:
Zack Williams9b21af52018-08-30 15:36:39 -070030 - cord-infra-gerrit-repo-scm:
31 manifest-url: '{gerrit-server-url}/{cord-repo-manifest}'
Kailash Khalasi8831df02018-05-31 10:11:13 -070032 branch: '$GERRIT_BRANCH'
Zack Williams9b21af52018-08-30 15:36:39 -070033 destination-dir: 'cord'
Kailash Khalasi8831df02018-05-31 10:11:13 -070034
Zack Williams9b21af52018-08-30 15:36:39 -070035 node: '{build-node}'
Kailash Khalasi8831df02018-05-31 10:11:13 -070036 project-type: freestyle
37 concurrent: true
38
39 builders:
Zack Williams9b21af52018-08-30 15:36:39 -070040 - cord-infra-gerrit-repo-patch:
41 destination-dir: 'cord'
42 project: '$GERRIT_PROJECT'
43 change-number: '$GERRIT_CHANGE_NUMBER'
44 patchset-number: '$GERRIT_PATCHSET_NUMBER'
Kailash Khalasi8831df02018-05-31 10:11:13 -070045 - shell: |
Zack Williams9b21af52018-08-30 15:36:39 -070046 #!/usr/bin/env bash
47 set -ex -o pipefail
48
49 export XOS_DIR=$WORKSPACE/cord/orchestration/xos
50 export TOSCA_DIR=$WORKSPACE/cord/orchestration/xos-tosca
Kailash Khalasi8831df02018-05-31 10:11:13 -070051
52 # setup virtual env
Zack Williams9b21af52018-08-30 15:36:39 -070053 $XOS_DIR/scripts/setup_venv.sh
54 source "$WORKSPACE/venv-xos/bin/activate"
55 set -u
Kailash Khalasi8831df02018-05-31 10:11:13 -070056
57 # Run the tests
Zack Williams9b21af52018-08-30 15:36:39 -070058 pushd "$WORKSPACE/cord/orchestration/xos-tosca"
Kailash Khalasi8831df02018-05-31 10:11:13 -070059 make tests
Zack Williams9b21af52018-08-30 15:36:39 -070060 popd
61
62 publishers:
63 - junit:
64 results: "**/nose2-junit.xml"
65 - cobertura:
66 report-file: "**/coverage.xml"
67 targets:
68 - files:
69 healthy: 80
70 unhealthy: 0
71 failing: 0
72 - method:
73 healthy: 50
74 unhealthy: 0
75 failing: 0
76