2 # This file contains job templates for Maven projects.
5 name: '{project-name}-maven-jobs'
7 # This job group contains all the recommended jobs that should be deployed
11 - gerrit-maven-release
14 name: '{project-name}-github-maven-jobs'
16 # This job group contains all the recommended jobs that should be deployed
17 # for any project ci that is using github.
20 - github-maven-release
25 - lf_maven_release: &lf_maven_release
26 name: lf-maven-release
28 # Produces a release candidate by creating a staging repo in Nexus.
30 # Runs a Maven build and deploys to $WORKSPACE/m2repo directory. This
31 # directory can then be reused later to deploy to Nexus.
33 # Required parameters:
34 # build-node: The node to run build on.
35 # jenkins-ssh-credential: Credential to use for SSH. (Generally should
36 # be configured in defaults.yaml)
37 # settings-file: The name of settings file containing credentials for
39 # global-settings-file: The name of the Maven global settings to use for
40 # Maven configuration.
41 # staging-profile-id: Profile ID of the project's Nexus staging profile.
43 project-type: freestyle
47 ######################
48 # Default parameters #
49 ######################
53 git-url: '$GIT_URL/$PROJECT'
54 global-settings-file: global-settings
55 java-version: openjdk8
59 submodule-recursive: true
66 - lf-infra-properties:
67 # Keep around for 30 days in case a release takes long to get approved.
68 build-days-to-keep: 30
71 - lf-infra-parameters:
74 - lf-infra-maven-parameters:
75 mvn-opts: '{mvn-opts}'
76 mvn-params: '{mvn-params}'
77 mvn-version: '{mvn-version}'
78 staging-profile-id: '{staging-profile-id}'
82 build-timeout: '{build-timeout}'
83 jenkins-ssh-credential: '{jenkins-ssh-credential}'
86 - lf-jacoco-nojava-workaround
88 mvn-version: '{mvn-version}'
89 - lf-provide-maven-settings:
90 global-settings-file: '{global-settings-file}'
91 settings-file: '{settings-file}'
92 - lf-infra-create-netrc:
93 server-id: opendaylight-staging
94 - shell: !include-raw-escape:
95 - ../shell/lftools-install.sh
96 - ../shell/common-variables.sh
97 - ../shell/maven-patch-release.sh
98 - ../shell/maven-build.sh
99 - ../shell/maven-stage.sh
100 - lf-provide-maven-settings-cleanup
103 # TODO: Make email notification work.
104 # - lf-infra-email-notify:
105 # email-recipients: '{email-recipients}'
106 # email-prefix: '[releng]'
115 name: '{project-name}-maven-release-{stream}'
116 id: gerrit-maven-release
117 <<: *lf_maven_release
120 - lf-infra-gerrit-scm:
121 jenkins-ssh-credential: '{jenkins-ssh-credential}'
123 refspec: '$GERRIT_REFSPEC'
124 branch: '$GERRIT_BRANCH'
125 submodule-recursive: '{submodule-recursive}'
126 choosing-strategy: gerrit
129 name: '{project-name}-maven-release-{stream}'
130 id: github-maven-release
131 <<: *lf_maven_release
135 url: '{git-url}/{github-org}/{project}'
138 - lf-infra-github-scm:
139 url: '{git-clone-url}{github-org}/{project}'
140 refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
142 submodule-recursive: '{submodule-recursive}'
143 choosing-strategy: default
144 jenkins-ssh-credential: '{jenkins-ssh-credential}'