Add fixes in openci 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       - 'opnfv-build-defaults'
48
49     wrappers:
50       - workspace-cleanup
51
52     triggers:
53       - jms-messaging:
54           provider-name: openci.activemq
55           selector: JMSType = 'ArtifactPublishedEvent' and JMSOrigin = 'ODL'
56
57     builders:
58       - shell: |
59           #!/bin/bash
60
61           echo
62           echo "Triggered by $type"
63           echo "----------------------------------"
64           echo $CI_MESSAGE
65           echo "----------------------------------"
66       - shell:
67           !include-raw-escape: ./create-cde.sh
68       - inject:
69           properties-file: "$WORKSPACE/event.properties"
70
71 - job-template:
72     name: 'openci-opnfv-{scenario}-test-daily-{stream}'
73
74     disabled: '{obj:disabled}'
75
76     concurrent: false
77
78     parameters:
79       - string:
80           name: PUBLISH_EVENT_TYPE
81           default: ConfidenceLevelModifiedEvent
82           description: 'The type of the event this job publishes'
83       - string:
84           name: PUBLISH_EVENT_ORIGIN
85           default: OPNFV
86           description: 'Originating community'
87       - string:
88           name: DEPLOY_SCENARIO
89           default: '{scenario}'
90           description: 'The scenario that is composed'
91       - string:
92           name: SCENARIO_METADATA_LOCATION
93           default: https://url/to/scenario/metadata/on/opnfv/artifact/repo/$BUILD_NUMBER
94           description: 'The location of the scenario metadata'
95       - string:
96           name: CONFIDENCE_LEVEL
97           default: "'opnfvdaily': 'SUCCESS'"
98           description: 'The confidence level the published artifact gained'
99       - 'opnfv-build-defaults'
100
101     triggers:
102       - jms-messaging:
103           provider-name: openci.activemq
104           selector: CI_TYPE = 'custom'
105           checks:
106             - field: origin
107               expected-value: 'OPNFV'
108             - field: type
109               expected-value: 'CompositionDefinedEvent'
110             - field: scenario
111               expected-value: '{scenario}'
112
113     builders:
114       - shell: |
115           #!/bin/bash
116
117           echo
118           echo "Triggered by $type"
119           echo "----------------------------------"
120           echo $CI_MESSAGE
121           echo "----------------------------------"
122       - shell:
123           !include-raw-escape: ./create-clme.sh
124       - inject:
125           properties-file: "$WORKSPACE/event.properties"
126
127     publishers:
128       - jms-messaging:
129           provider-name: openci.activemq
130           msg-type: Custom
131           msg-props: |
132             type=$type
133             origin=$origin
134             scenario=$scenario
135           msg-content:
136             $eventBody