Merge "Use publisher in OPNFV compose daily jobs"
[releng.git] / jjb / openci / openci-opnfv-daily-jobs.yaml
1 ---
2 - project:
3     name: openci-opnfv
4
5     project: '{name}'
6
7     stream:
8       - master:
9           branch: '{stream}'
10           gs-pathname: ''
11           disabled: false
12
13     scenario:
14       - 'os-odl-nofeature-ha':
15           origin: ODL
16       - 'k8-nosdn-onap-ha':
17           origin: ONAP
18
19     jobs:
20       - 'openci-opnfv-{scenario}-compose-daily-{stream}'
21       - 'openci-opnfv-{scenario}-test-daily-{stream}'
22
23 - job-template:
24     name: 'openci-opnfv-{scenario}-compose-daily-{stream}'
25
26     disabled: '{obj:disabled}'
27
28     concurrent: false
29
30     parameters:
31       - string:
32           name: PUBLISH_EVENT_TYPE
33           default: CompositionDefinedEvent
34           description: 'The type of the event this job publishes'
35       - string:
36           name: PUBLISH_EVENT_ORIGIN
37           default: OPNFV
38           description: 'Originating community'
39       - string:
40           name: DEPLOY_SCENARIO
41           default: '{scenario}'
42           description: 'The scenario that is composed'
43       - string:
44           name: SCENARIO_METADATA_LOCATION
45           default: https://url/to/scenario/metadata/on/opnfv/artifact/repo/$BUILD_NUMBER
46           description: 'The location of the scenario metadata'
47       - 'opnfv-build-defaults'
48
49     wrappers:
50       - credentials-binding:
51           - username-password-separated:
52               credential-id: openci-connect-activemq
53               username: ACTIVEMQ_USER
54               password: ACTIVEMQ_PASSWORD
55
56     triggers:
57       - jms-messaging:
58           provider-name: openci.activemq
59           selector: JMSType = 'ArtifactPublishedEvent' and JMSOrigin = 'ODL'
60
61     builders:
62       - shell: |
63           #!/bin/bash
64
65           echo
66           echo "Triggered by $type"
67           echo "----------------------------------"
68           echo $CI_MESSAGE
69           echo "----------------------------------"
70       - shell:
71           !include-raw-escape: ./create-cde.sh
72       - inject:
73           properties-file: "$WORKSPACE/event.properties"
74
75 - job-template:
76     name: 'openci-opnfv-{scenario}-test-daily-{stream}'
77
78     disabled: '{obj:disabled}'
79
80     concurrent: false
81
82     parameters:
83       - string:
84           name: PUBLISH_EVENT_TYPE
85           default: ConfidenceLevelModifiedEvent
86           description: 'The type of the event this job publishes'
87       - string:
88           name: PUBLISH_EVENT_ORIGIN
89           default: OPNFV
90           description: 'Originating community'
91       - string:
92           name: DEPLOY_SCENARIO
93           default: '{scenario}'
94           description: 'The scenario that is composed'
95       - string:
96           name: SCENARIO_METADATA_LOCATION
97           default: https://url/to/scenario/metadata/on/opnfv/artifact/repo/$BUILD_NUMBER
98           description: 'The location of the scenario metadata'
99       - string:
100           name: CONFIDENCE_LEVEL
101           default: "'opnfvdaily': 'SUCCESS'"
102           description: 'The confidence level the published artifact gained'
103       - 'opnfv-build-defaults'
104
105     triggers:
106       - jms-messaging:
107           provider-name: openci.activemq
108           selector: CI_TYPE = 'custom'
109           checks:
110             - field: origin
111               expected-value: 'OPNFV'
112             - field: type
113               expected-value: 'CompositionDefinedEvent'
114             - field: scenario
115               expected-value: '{scenario}'
116
117     builders:
118       - shell: |
119           #!/bin/bash
120
121           echo
122           echo "Triggered by $type"
123           echo "----------------------------------"
124           echo $CI_MESSAGE
125           echo "----------------------------------"
126       - shell:
127           !include-raw-escape: ./create-clme.sh
128       - inject:
129           properties-file: "$WORKSPACE/event.properties"
130
131     publishers:
132       - jms-messaging:
133           provider-name: openci.activemq
134           msg-type: Custom
135           msg-props: |
136             type=$type
137             origin=$origin
138             scenario=$scenario
139           msg-content:
140             $eventBody