78b2eb10ad5d7c4cf430fa06a2693f6d2afd6dab
[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       - workspace-cleanup
56
57     triggers:
58       - jms-messaging:
59           provider-name: openci.activemq
60           selector: JMSType = 'ArtifactPublishedEvent' and JMSOrigin = 'ODL'
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       - 'opnfv-build-defaults'
103
104     triggers:
105       - jms-messaging:
106           provider-name: openci.activemq
107           selector: CI_TYPE = 'custom'
108           checks:
109             - field: origin
110               expected-value: 'OPNFV'
111             - field: type
112               expected-value: 'CompositionDefinedEvent'
113             - field: scenario
114               expected-value: '{scenario}'
115
116     builders:
117       - shell: |
118           #!/bin/bash
119
120           echo
121           echo "Triggered by $type"
122           echo "----------------------------------"
123           echo $CI_MESSAGE
124           echo "----------------------------------"
125       - shell:
126           !include-raw-escape: ./create-clme.sh
127       - inject:
128           properties-file: "$WORKSPACE/event.properties"