Skip to content

apache/maven-jenkins-lib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

216 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Apache Maven Jenkins Shared Library

This repository contains the Jenkins shared library that defines the standard build process for Apache Maven subprojects. It consist of two different entry points (custom steps) which can be referenced from Maven repo’s Jenkinsfile:

asfMavenTlpPlgnBuild() (building Maven plugins)

Accepted parameters:

  • os: array of possible os to build projects (default: ['linux'])

  • jdks: array of jdks used for the build (default: ['8','11','17', '21'])

  • maven: array of maven versions used for build (default: ['3.6.x', '3.9.x'])

  • siteJdk: array of jdks used for the site build (default: [11'])

  • siteMvn: jdk used to build the site (default: 3.9.x)

  • tmpWs: boolean to shorten working directory on windows platform

  • fetchDepth: optional git fetch depth for checkout; values > 0 enable shallow checkout with that depth, values ⇐ 0 force non-shallow checkout. When not set the organization value is used.

  • branchesToNotify: array of branches to send notifications of the build (default: ['master', 'main'])

Example to use a specific set of jdks and maven core

asfMavenTlpPlgnBuild(jdks:[ "8", "11" ], maven: ["3.8.x"])

// checkout with explicit non-shallow clone
asfMavenTlpPlgnBuild(fetchDepth: 0)

asfMavenTlpStdBuild() (building Other projects)

Accepted parameters:

  • os: array of possible os to build projects (default: ['linux'])

  • jdks: array of jdks used for the build (default: ['8','11','17', '21'])

  • maven: maven versions used for build (default: 3.9.x)

  • tmpWs: boolean to shorten working directory on windows platform

  • fetchDepth: optional git fetch depth for checkout; values > 0 enable shallow checkout with that depth, values ⇐ 0 force non-shallow checkout. When not set the organization value is used.

  • branchesToNotify: array of branches to send notifications of the build and deploy artifacts (default: ['master', 'main'])

Example to use a specific set of jdks and maven core

asfMavenTlpStdBuild(jdks:[ "8", "11" ], maven: "3.6.x")

// checkout with explicit non-shallow clone
asfMavenTlpStdBuild(fetchDepth: 0)

Configuration in Jenkins

This library is configured globally in ci-maven.apache.org system settings with name maven-jenkins-lib.

The master branch is loaded implicitly. You can reference another branch via @Library('maven-jenkins-lib@mybranch') _.

Downstream Dependencies

This library uses custom steps provided by Apache Maven Jenkins Environment Shared Library which helps referencing proper JDK/Maven installations available in Jenkins.

About

Jenkins shared library for Apache Maven CI pipelines

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages