blob: bf62c011e8c2aef805d38223701d5ce194d67b07 [file] [log] [blame]
pierventre65d85a22020-07-21 20:30:20 +02001---
2# Run Makefile targets and optionally collect unit test data
3
4- job-template:
5 id: 'private-make-test'
6 name: 'private-make-test{name-extension}_{project}'
7
8 description: |
9 Created by {id} job-template from ci-management/jjb/templates/private-make-test.yaml<br/>
10 Runs make with the following test targets - '{make-test-targets}' and with the<br/>
11 following env. variables - '{make-test-vars}'
12
13 triggers:
14 - onf-infra-gerrit-trigger-patchset:
15 gerrit-server-name: '{gerrit-server-name}'
16 project-regexp: '^{project}$'
17 branch-regexp: '{branch-regexp}'
18 dependency-jobs: '{dependency-jobs}'
19 file-include-regexp: '{all-files-regexp}'
20
21 properties:
22 - raw:
23 xml: |
24 <hudson.security.AuthorizationMatrixProperty>
25 <inheritanceStrategy class="org.jenkinsci.plugins.matrixauth.inheritance.NonInheritingStrategy"/>
26 <permission>com.cloudbees.plugins.credentials.CredentialsProvider.Create:JenkinsPowerusers</permission>
27 <permission>com.cloudbees.plugins.credentials.CredentialsProvider.Delete:JenkinsPowerusers</permission>
28 <permission>com.cloudbees.plugins.credentials.CredentialsProvider.ManageDomains:JenkinsPowerusers</permission>
29 <permission>com.cloudbees.plugins.credentials.CredentialsProvider.Update:JenkinsPowerusers</permission>
30 <permission>com.cloudbees.plugins.credentials.CredentialsProvider.View:JenkinsPowerusers</permission>
31 <permission>hudson.model.Item.Build:JenkinsPowerusers</permission>
32 <permission>hudson.model.Item.Cancel:JenkinsPowerusers</permission>
33 <permission>hudson.model.Item.Configure:JenkinsPowerusers</permission>
34 <permission>hudson.model.Item.Delete:JenkinsPowerusers</permission>
35 <permission>hudson.model.Item.Discover:JenkinsPowerusers</permission>
36 <permission>hudson.model.Item.Discover:ONFStaff</permission>
37 <permission>hudson.model.Item.ExtendedRead:JenkinsPowerusers</permission>
38 <permission>hudson.model.Item.Move:JenkinsPowerusers</permission>
39 <permission>hudson.model.Item.Read:JenkinsPowerusers</permission>
40 <permission>hudson.model.Item.Read:ONFStaff</permission>
41 <permission>hudson.model.Item.Workspace:JenkinsPowerusers</permission>
42 <permission>hudson.model.Run.Delete:JenkinsPowerusers</permission>
43 <permission>hudson.model.Run.Replay:JenkinsPowerusers</permission>
44 <permission>hudson.model.Run.Update:JenkinsPowerusers</permission>
45 </hudson.security.AuthorizationMatrixProperty>
46 - onf-infra-properties:
47 build-days-to-keep: '{build-days-to-keep}'
48 artifact-num-to-keep: '{artifact-num-to-keep}'
49
50 wrappers:
51 - lf-infra-wrappers:
52 build-timeout: '{build-timeout}'
53 jenkins-ssh-credential: '{jenkins-ssh-credential}'
54 - credentials-binding:
55 - username-password-separated:
56 credential-id: docker-artifact-push-credentials
57 username: DOCKERHUB_USERNAME
58 password: DOCKERHUB_PASSWORD
59 - text:
60 credential-id: 64fe2b1a-b33a-4f13-8442-ad8360434003
61 variable: OMECPROJECT_API
62
63 scm:
64 - onf-infra-gerrit-scm:
65 git-url: '$GIT_URL/$GERRIT_PROJECT'
66 refspec: '$GERRIT_REFSPEC'
67 branch: '$GERRIT_BRANCH'
68 submodule-recursive: '{submodule-recursive}'
69 choosing-strategy: gerrit
70 jenkins-ssh-credential: '{jenkins-ssh-credential}'
71 basedir: '{project}'
72
73 node: '{build-node}'
74 project-type: freestyle
75 concurrent: true
76
77 builders:
78 - inject:
79 properties-content: |
80 {make-test-vars}
81 DEST_GOPATH={dest-gopath}
82 MAKE_TEST_TARGETS={make-test-targets}
83 MAKE_TEST_KEEP_GOING={make-test-keep-going}
84 - shell: !include-raw-escape: ../shell/make-test.sh
85
86 publishers:
87 - junit:
88 results: "**/*results.xml,**/*report.xml"
89 allow-empty-results: '{junit-allow-empty-results}'
90 - cobertura:
91 report-file: "**/*coverage.xml"
92 targets:
93 - files:
94 healthy: 80
95 unhealthy: 0
96 failing: 0
97 - method:
98 healthy: 50
99 unhealthy: 0
100 failing: 0