Skip to content

piperLoadGlobalExtensions

Description

This step is part of the step setupCommonPipelineEnvironment and should not be used outside independently in a custom pipeline. This step allows users to define extensions (https://sap.github.io/jenkins-library/extensibility/#1-extend-individual-stages) globally instead of in each repository. Instead of defining the extensions in the .pipeline folder the extensions are defined in another repository. You can also place a file called extension_configuration.yml in this repository. Configuration defined in this file will be treated as default values with a lower precedence then custom defaults defined in the project configuration. You can also define additional Jenkins libraries these extensions depend on using a yaml file called sharedLibraries.yml: Example: - name: my-extension-dependency version: git-tag

Parameters

name mandatory default possible values
customDefaults no
customDefaultsFromFiles no
globalExtensionsDirectory no .pipeline/tmp/global_extensions/
globalExtensionsRepository no
globalExtensionsRepositoryCredentialsId no
globalExtensionsVersion no
script yes
  • customDefaults - This step will reinitialize the defaults. Make sure to pass the same customDefaults as to the step setupCommonPipelineEnvironment
  • customDefaultsFromFiles - This step will reinitialize the defaults. Make sure to pass the same customDefaultsFromFiles as to the step setupCommonPipelineEnvironment
  • globalExtensionsDirectory - Directory where the extensions are cloned to
  • globalExtensionsRepository - Git url of the repository containing the extensions
  • globalExtensionsRepositoryCredentialsId - Credentials required to clone the repository
  • globalExtensionsVersion - Version of the extensions which should be used, e.g. the tag name
  • script - The common script environment of the Jenkinsfile running. Typically the reference to the script calling the pipeline step is provided with the this parameter, as in script: this. This allows the function to access the commonPipelineEnvironment for retrieving, e.g. configuration parameters.

Step configuration

We recommend to define values of step parameters via config.yml file.

In following sections of the config.yml the configuration is possible:

parameter general step/stage
customDefaults
customDefaultsFromFiles
globalExtensionsDirectory X
globalExtensionsRepository X
globalExtensionsRepositoryCredentialsId X
globalExtensionsVersion X
script

Dependencies

The step depends on the following Jenkins plugins

Transitive dependencies are omitted.

The list might be incomplete.

Consider using the ppiper/jenkins-master docker image. This images comes with preinstalled plugins.