Page tree
Skip to end of metadata
Go to start of metadata



Run a local Jenkins: docker run -p 8080:8080 -p 50000:50000 -v jenkins_home:/var/jenkins_home jenkins/jenkins:lts

Jenkins doesn't come with the necessary plugins OOTB, there's one that needs to be installed, look it up in MPL's README.

Once that's done, add both MPL (general framework) and the test-mpl-nested-library (for Magnolia specifics) as shared libraries.


Override a step

Build.groovy is overriden in the override branch of the test-mpl-project by using the following path: .jenkins/modules/Build/Build.groovy

Run Maven/JS projects with the same pipeline

The js branch of the test-mpl-project will run a Node build thanks to the logic in:

The advantage when all builds run the same pipeline (rather than a couple of templates as we do it currently) is that:

  • setup steps (such as downloading the build scripts, mounting the AWS volume),
  • settings,
  • and even 'business logic' (JIRA health check, binary compatibility, etc.)

do not need to be copy-pasted, but can simply be turned on/off on demand.

Examples of customization (non-exhaustive list)

Disable steps from the project pipeline:

NestedPipeline {
  modules.BinaryCompatibility = null

Tweak steps thanks to MPL configuration (not my example):

@Library('mpl') _

// Use default master pipeline
MPLPipeline {
  // Pipeline configuration override here
  // Example: (check available options in the pipeline definition)
  agent_label = 'LS'                     // Set agent label
  modules.Build.tool_version = 'Maven 2' // Change tool for build stage


The framework comes with helper methods and examples that allow to easily write tests like the following:

This is a big advantage over our current implementation where we have no visibility once we push changes.

  • No labels