Move views declarations to projects folders
[releng/builder.git] / jjb / openci / openci-odl-daily-jobs.yaml
1 ---
2 - project:
3     name: openci-odl
4
5     project: '{name}'
6
7     stream:
8       - master:
9           branch: '{stream}'
10           gs-pathname: ''
11           disabled: false
12
13     jobs:
14       - 'openci-odl-autorelease-daily-{stream}'
15       - 'openci-odl-promote-daily-{stream}'
16
17 # This job gets triggered manually for the demo purposes.
18 #
19 # In prototype, either what this job does needs to be integrated to
20 # ODL autorelease job or triggered by the upstream autorelease job.
21 - job-template:
22     name: 'openci-odl-autorelease-daily-{stream}'
23
24     disabled: '{obj:disabled}'
25
26     concurrent: false
27
28     build-node: centos7-builder-2c-2g
29
30     parameters:
31       - string:
32           name: PUBLISH_EVENT_TYPE
33           default: ArtifactPublishedEvent
34           description: 'The type of the event this job publishes'
35       - string:
36           name: PUBLISH_EVENT_ORIGIN
37           default: ODL
38           description: 'Originating community'
39       - string:
40           name: ARTIFACT_LOCATION
41           default: https://url/to/artifact/on/odl/nexus/$BUILD_NUMBER
42           description: 'The location of the artifact on ODL Nexus'
43       - string:
44           name: CONFIDENCE_LEVEL
45           default: "'autorelease': 'SUCCESS'"
46           description: 'The confidence level the published artifact gained'
47
48     builders:
49       # first build step in the job executes create-ape.sh to construct the
50       # ArtifactPublishedEvent (ape)
51       - shell:
52           !include-raw-escape: ./create-ape.sh
53       # constructed event gets injected into environment so JME Messaging
54       # plugin can publish the event and its properties in post-build step
55       - inject:
56           properties-file: "$WORKSPACE/event.properties"
57
58     publishers:
59       - jms-messaging:
60           provider-name: openci.activemq
61           msg-type: Custom
62           msg-props: |
63             type=$type
64             origin=$origin
65           msg-content:
66             $eventBody
67
68 # This job gets triggered by a ConfidenceLevelModifiedEvent published
69 # by OPNFV jobs so ODL can promote the autorelease artifact even further.
70 #
71 # This job is created for the demo purposes and might not be there for
72 # the prototype.
73 - job-template:
74     name: 'openci-odl-promote-daily-{stream}'
75
76     disabled: '{obj:disabled}'
77
78     concurrent: false
79
80     build-node: centos7-builder-2c-2g
81
82     triggers:
83       - jms-messaging:
84           provider-name: openci.activemq
85           selector: CI_TYPE = 'custom'
86           checks:
87             - field: origin
88               expected-value: 'OPNFV'
89             - field: type
90               expected-value: 'ConfidenceLevelModifiedEvent'
91             - field: scenario
92               expected-value: 'os-odl-nofeature'
93
94     builders:
95       - shell: |
96           #!/bin/bash
97
98           echo
99           echo "Triggered by $type"
100           echo "----------------------------------"
101           echo $CI_MESSAGE
102           echo "----------------------------------"
103           echo " Promoted ODL Autorelease artifact as release candidate!"
104
105 - view:
106     name: openci
107     description: 'List of openci jobs'
108     regex: '^openci-.*'
109     <<: *releng_view_common