Merge "Add Oxygen stream for OpFlex release job."
[releng/builder.git] / jjb / opflex / opflex.yaml
1 ---
2 - project:
3     name: opflex-release
4     jobs:
5       - 'opflex-release-{stream}'
6
7     stream:
8       - oxygen:
9           branch: 'master'
10           jdk: 'openjdk8'
11       - nitrogen:
12           branch: 'stable/nitrogen'
13           jdk: openjdk8
14       - carbon:
15           branch: 'stable/carbon'
16           jdk: openjdk8
17       - boron:
18           branch: 'stable/boron'
19           jdk: openjdk8
20
21     project: 'opflex'
22     project-name: 'opflex'
23
24     branch: master
25     global-settings-file: global-settings
26     settings-file: opflex-settings
27     group-id: org.opendaylight.opflex
28     upload-files-dir: "$WORKSPACE/upload_files"
29
30     # Used by the release job
31     staging-profile-id: 906b0d53d714e
32
33
34 - builder:
35     name: opflex-deploy-maven-file
36     # Todo: Remove this builder when the generic version of the builder is
37     # available in global-jjb. Change no: 5753
38     # Deploy artifacts to a repository.
39     #
40     # The builder requires passing the following parameters
41     # REPO_ID:           Repository ID
42     # GROUP_ID:          Group ID of the repository
43     # UPLOAD_FILES_PATH: Path to directory containing one or more files
44     builders:
45       - lf-maven-install:
46           mvn-version: '{mvn-version}'
47       - lf-provide-maven-settings:
48           global-settings-file: '{global-settings-file}'
49           settings-file: '{settings-file}'
50       - inject:
51           properties-content: |
52               MAVEN_REPO_URL=file://$WORKSPACE/m2repo
53               REPO_ID={repo-id}
54               GROUP_ID={group-id}
55               UPLOAD_FILES_PATH={upload-files-dir}
56       - shell: !include-raw-escape:
57           - ../global-jjb/shell/lftools-install.sh
58           - ../global-jjb/shell/common-variables.sh
59           - deploy-opflex.sh
60
61 - builder:
62     name: opflex-maven-stage
63     # Todo: Migrate to the generic version of the builders available in
64     # global-jjb. Change no: 5753
65     # Stage files to Nexus repository.
66     #
67     # The builder requires passing the following parameters
68     # REPO_ID             : Repository ID
69     # GROUP_ID            : Group ID of the repository
70     # UPLOAD_FILES_PATH   : Path to directory containing one or more files
71     # STAGING_PROFILE_ID  : Staging profile id created on Nexus
72     builders:
73       - lf-provide-maven-settings:
74           global-settings-file: '{global-settings-file}'
75           settings-file: '{settings-file}'
76       - lf-infra-create-netrc:
77           server-id: opendaylight-staging
78       - inject:
79           properties-content: |
80               STAGING_PROFILE_ID={staging-profile-id}
81       - shell: !include-raw-escape:
82           - ../global-jjb/shell/lftools-install.sh
83           - ../global-jjb/shell/maven-stage.sh
84
85 - job-template:
86     name: 'opflex-release-{stream}'
87
88     node: centos7-java-builder-2c-8g
89     jdk: '{jdk}'
90
91     ######################
92     # Default parameters #
93     ######################
94
95     build-timeout: 30
96     java-version: openjdk8
97     mvn-opts: ''
98     mvn-params: ''
99     mvn-version: mvn33
100     stream: master
101
102     properties:
103       - opendaylight-infra-properties:
104           build-days-to-keep: '{build-days-to-keep}'
105
106     parameters:
107       - opendaylight-infra-parameters:
108           os-cloud: '{os-cloud}'
109           project: '{project}'
110           branch: '{branch}'
111           refspec: 'refs/heads/{branch}'
112           artifacts: ''
113       - lf-infra-maven-parameters:
114           mvn-opts: '{mvn-opts}'
115           mvn-params: '{mvn-params}'
116           mvn-version: '{mvn-version}'
117           staging-profile-id: '{staging-profile-id}'
118
119     scm:
120       - gerrit-trigger-scm:
121           refspec: ''
122           choosing-strategy: 'default'
123
124     wrappers:
125       - opendaylight-infra-wrappers:
126           build-timeout: '{build-timeout}'
127
128     builders:
129       - opflex-build:
130           mvn33: '{mvn-version}'
131           stream: '{stream}'
132       # todo: replace the builder with generic version in global-jjb
133       - opflex-deploy-maven-file:
134           global-settings-file: '{global-settings-file}'
135           settings-file: '{settings-file}'
136           mvn-version: '{mvn-version}'
137           repo-id: '{staging-profile-id}'
138           group-id: '{group-id}'
139           upload-files-dir: '{upload-files-dir}'
140       - lf-infra-create-netrc:
141           server-id: opendaylight-staging
142       # todo: replace the builder with generic version in global-jjb
143       - opflex-maven-stage:
144           global-settings-file: '{global-settings-file}'
145           settings-file: '{settings-file}'
146           staging-profile-id: '{staging-profile-id}'
147       - lf-provide-maven-settings-cleanup
148
149     publishers:
150       - email-notification:
151           email-recipients: '{email-recipients}'
152           email-prefix: '[opflex]'
153       - lf-infra-publish