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