Kailash Khalasi | 8831df0 | 2018-05-31 10:11:13 -0700 | [diff] [blame] | 1 | --- |
| 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 Williams | 9b21af5 | 2018-08-30 15:36:39 -0700 | [diff] [blame] | 26 | build-timeout: '{build-timeout}' |
Kailash Khalasi | 8831df0 | 2018-05-31 10:11:13 -0700 | [diff] [blame] | 27 | jenkins-ssh-credential: '{jenkins-ssh-credential}' |
| 28 | |
| 29 | scm: |
Zack Williams | 9b21af5 | 2018-08-30 15:36:39 -0700 | [diff] [blame] | 30 | - cord-infra-gerrit-repo-scm: |
| 31 | manifest-url: '{gerrit-server-url}/{cord-repo-manifest}' |
Kailash Khalasi | 8831df0 | 2018-05-31 10:11:13 -0700 | [diff] [blame] | 32 | branch: '$GERRIT_BRANCH' |
Zack Williams | 9b21af5 | 2018-08-30 15:36:39 -0700 | [diff] [blame] | 33 | destination-dir: 'cord' |
Kailash Khalasi | 8831df0 | 2018-05-31 10:11:13 -0700 | [diff] [blame] | 34 | |
Zack Williams | 9b21af5 | 2018-08-30 15:36:39 -0700 | [diff] [blame] | 35 | node: '{build-node}' |
Kailash Khalasi | 8831df0 | 2018-05-31 10:11:13 -0700 | [diff] [blame] | 36 | project-type: freestyle |
| 37 | concurrent: true |
| 38 | |
| 39 | builders: |
Zack Williams | 9b21af5 | 2018-08-30 15:36:39 -0700 | [diff] [blame] | 40 | - 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 Khalasi | 8831df0 | 2018-05-31 10:11:13 -0700 | [diff] [blame] | 45 | - shell: | |
Zack Williams | 9b21af5 | 2018-08-30 15:36:39 -0700 | [diff] [blame] | 46 | #!/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 Khalasi | 8831df0 | 2018-05-31 10:11:13 -0700 | [diff] [blame] | 51 | |
| 52 | # setup virtual env |
Zack Williams | 9b21af5 | 2018-08-30 15:36:39 -0700 | [diff] [blame] | 53 | $XOS_DIR/scripts/setup_venv.sh |
| 54 | source "$WORKSPACE/venv-xos/bin/activate" |
| 55 | set -u |
Kailash Khalasi | 8831df0 | 2018-05-31 10:11:13 -0700 | [diff] [blame] | 56 | |
| 57 | # Run the tests |
Zack Williams | 9b21af5 | 2018-08-30 15:36:39 -0700 | [diff] [blame] | 58 | pushd "$WORKSPACE/cord/orchestration/xos-tosca" |
Kailash Khalasi | 8831df0 | 2018-05-31 10:11:13 -0700 | [diff] [blame] | 59 | make tests |
Zack Williams | 9b21af5 | 2018-08-30 15:36:39 -0700 | [diff] [blame] | 60 | 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 | |