blob: bfa7b6e1259bf0f9994358e191f16b0acaefc89d [file] [log] [blame]
Zack Williamsa9af8f02018-11-20 14:27:48 -07001---
2# verification jobs for 'sadis-server' repo
3
4- project:
5 name: sadis-server
6 project: '{name}'
7
8 jobs:
9 - 'verify-sadis-server-jobs':
10 branch-regexp: '{supported-branches-regexp}'
11
12- job-group:
13 name: 'verify-sadis-server-jobs'
14 jobs:
15 - 'verify-licensed'
Zack Williamsa9af8f02018-11-20 14:27:48 -070016 - 'sadis-server-tests':
Zack Williamsad92e6e2020-10-07 09:54:10 -070017 dependency-jobs: 'verify_sadis-server_tag-collision'
Zack Williamsa9af8f02018-11-20 14:27:48 -070018
19- job-template:
20 id: 'sadis-server-tests'
21 name: 'verify_{project}_tests'
22
23 description: |
24 Created by {id} job-template from ci-management/jjb/verify/sadis-server.yaml
25
26 triggers:
27 - cord-infra-gerrit-trigger-patchset:
28 gerrit-server-name: '{gerrit-server-name}'
29 project-regexp: '^{project}$'
30 branch-regexp: '{branch-regexp}'
31 dependency-jobs: '{dependency-jobs}'
32 file-include-regexp: '{all-files-regexp}'
33
34 properties:
35 - cord-infra-properties:
36 build-days-to-keep: '{build-days-to-keep}'
37 artifact-num-to-keep: '{artifact-num-to-keep}'
38
39 wrappers:
40 - lf-infra-wrappers:
41 build-timeout: 20
42 jenkins-ssh-credential: '{jenkins-ssh-credential}'
43
44 scm:
45 - cord-infra-gerrit-scm:
46 git-url: '$GIT_URL/$GERRIT_PROJECT'
47 refspec: '$GERRIT_REFSPEC'
48 branch: '$GERRIT_BRANCH'
49 submodule-recursive: 'false'
50 choosing-strategy: 'gerrit'
51 jenkins-ssh-credential: '{jenkins-ssh-credential}'
52 basedir: '{project}'
53
Hung-Wei Chiuf6cbde22021-04-22 22:15:23 -070054 node: 'ubuntu18.04-basebuild-1c-2g'
Zack Williamsa9af8f02018-11-20 14:27:48 -070055 project-type: freestyle
56 concurrent: true
57
58 builders:
59 - shell: |
60 #!/usr/bin/env bash
61 set -eux -o pipefail
62
63 export GOPATH=~/go
Zack Williamsc9abcdc2019-05-09 21:23:38 -070064 export PATH=$PATH:/usr/lib/go-1.12/bin:/usr/local/go/bin:~/go/bin
Zack Williamsa9af8f02018-11-20 14:27:48 -070065
66 # move code the proper location
67 mkdir -p $GOPATH/src/gerrit.opencord.org
68 mv sadis-server $GOPATH/src/gerrit.opencord.org/sadis-server
69
70 pushd $GOPATH/src/gerrit.opencord.org/sadis-server
71
Zack Williamsba147552018-11-20 15:33:42 -070072 dep ensure -v -update
73
Zack Williamsa9af8f02018-11-20 14:27:48 -070074 go build -v
75
76 go test -v ./...
77
78 # generate Jenkins report
79 go test -v ./... 2>&1 | go-junit-report > $WORKSPACE/junit-report.xml
80
81 # generate Jenkins coverage
82 go test -coverprofile=coverage.txt -covermode=count ./...
83 gocover-cobertura < coverage.txt > $WORKSPACE/coverage.xml
84
85 popd
86
87
88 publishers:
89 - junit:
90 results: "junit-report.xml"
91 allow-empty-results: true
92 - cobertura:
93 report-file: "coverage.xml"
94 targets:
95 - files:
96 healthy: 80
97 unhealthy: 0
98 failing: 0
99 - method:
100 healthy: 50
101 unhealthy: 0
102 failing: 0
Joey Armstrongaf679da2023-01-31 14:22:41 -0500103
104# [EOF]