openci: Fix the event origin in compose job
[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       - 'ericsson-build4-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       - workspace-cleanup
56
57     triggers:
58       - jms-messaging:
59           provider-name: openci.activemq
60           selector: JMSType = 'ArtifactPublishedEvent' and JMSOrigin = '{origin}'
61
62     builders:
63       - shell: |
64           #!/bin/bash
65
66           echo
67           echo "Triggered by $type"
68           echo "----------------------------------"
69           echo $CI_MESSAGE
70           echo "----------------------------------"
71       - shell:
72           !include-raw-escape: ./create-cde.sh
73
74 - job-template:
75     name: 'openci-opnfv-{scenario}-test-daily-{stream}'
76
77     disabled: '{obj:disabled}'
78
79     concurrent: false
80
81     parameters:
82       - string:
83           name: PUBLISH_EVENT_TYPE
84           default: ConfidenceLevelModifiedEvent
85           description: 'The type of the event this job publishes'
86       - string:
87           name: PUBLISH_EVENT_ORIGIN
88           default: OPNFV
89           description: 'Originating community'
90       - string:
91           name: DEPLOY_SCENARIO
92           default: '{scenario}'
93           description: 'The scenario that is composed'
94       - string:
95           name: SCENARIO_METADATA_LOCATION
96           default: https://url/to/scenario/metadata/on/opnfv/artifact/repo/$BUILD_NUMBER
97           description: 'The location of the scenario metadata'
98       - string:
99           name: CONFIDENCE_LEVEL
100           default: "'opnfvdaily': 'SUCCESS'"
101           description: 'The confidence level the published artifact gained'
102       - 'ericsson-build4-defaults'
103
104     wrappers:
105       - credentials-binding:
106           - username-password-separated:
107               credential-id: openci-connect-activemq
108               username: ACTIVEMQ_USER
109               password: ACTIVEMQ_PASSWORD
110       - workspace-cleanup
111
112     triggers:
113       - jms-messaging:
114           provider-name: openci.activemq
115           selector: JMSType = 'CompositionDefinedEvent' and JMSOrigin = 'OPNFV' and JMSScenario = '{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