Skip to content

Init

This stage initializes the pipeline run and prepares further execution.

It will check out your repository and perform some steps to initialize your pipeline run.

Stage Content

This stage comprises following steps which are activated depending on your use-case/configuration:

step step description
artifactPrepareVersion Sets the build version.
transportRequestReqIDFromGit Retrieve transport request from git commit history.

Stage Activation

This stage will be active if any one of the following conditions is met:

  • Stage configuration in config.yml file contains entries for this stage.
  • Any of the conditions are met which are explained in the section Step Activation.

Step Activation

For this stage no conditions are assigned to steps.

Additional Stage Parameters

name mandatory default possible values
buildTool yes docker, kaniko, maven, mta, ``npm
checkoutMap no
configFile no
containerMapResource no
customDefaults no
customDefaultsFromFiles no
customStashSettings no
inferBuildTool no
inferProjectName no
legacyConfigSettings no
productiveBranch no master
projectName no
runArtifactVersioningOnPod no true, false
scmInfo no
script yes
skipCheckout no true, false
stageConfigResource no
stashContent no
stashSettings no
useTechnicalStageNames no
verbose no true, false
  • buildTool - Defines the build tool used.
  • checkoutMap - Provides a clone from the specified repository. This map contains attributes, such as, branches, extensions, userRemoteConfigs etc. Example: [$class: 'GitSCM', branches: [[name: <branch_to_be_cloned>]], userRemoteConfigs: [[credentialsId: <credential_to_access_repository>, url: <repository_url>]]].
  • configFile - Optional path to the pipeline configuration file defining project specific settings.
  • containerMapResource - Defines the library resource containing the container map.
  • customDefaults - Optional list of file names which will be extracted from library resources and which serve as source for default values for the pipeline configuration. These are merged with and override built-in defaults, with a parameter supplied by the last resource file taking precedence over the same parameter supplied in an earlier resource file or built-in default.
  • customDefaultsFromFiles - Optional list of file paths or URLs which must point to YAML content. These work exactly like customDefaults, but from local or remote files instead of library resources. They are merged with and take precedence over customDefaults.
  • customStashSettings - Works as the stashSettings parameter, but allows the use of a stash settings file that is not available as a library resource.
  • inferBuildTool - Enable automatic inference of build tool (maven, npm, mta) based on existing project files. If this is set to true, it is not required to provide the buildTool parameter in the general section of the pipeline configuration.
  • inferProjectName - Enables automatic inference from the build descriptor in case projectName is not configured.
  • legacyConfigSettings - Defines the library resource containing the legacy configuration definition.
  • productiveBranch - Defines the main branch for your pipeline. Typically this is the master branch, which does not need to be set explicitly. Only change this in exceptional cases to a fixed branch name.
  • projectName - Name of the project, e.g. used for the name of lockable resources.
  • runArtifactVersioningOnPod - Specify to execute artifact versioning in a kubernetes pod.
  • scmInfo - The map returned from a Jenkins git checkout. Used to set the git information in the common pipeline environment.
  • 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.
  • skipCheckout - Optional skip of checkout if checkout was done before this step already.
  • stageConfigResource - Defines the library resource containing stage/step initialization settings. Those define conditions when certain steps/stages will be activated. Caution: changing the default will break the standard behavior of the pipeline - thus only relevant when including Init stage into custom pipelines!
  • stashContent - Mandatory if you skip the checkout. Then you need to unstash your workspace to get the e.g. configuration.
  • stashSettings - Defines the library resource containing the stash settings to be performed before and after each stage. Caution: changing the default will break the standard behavior of the pipeline - thus only relevant when including Init stage into custom pipelines!
  • useTechnicalStageNames - Enables the use of technical stage names.
  • verbose - Whether verbose output should be produced.

Configuration of Additional Stage Parameters

The stage parameters need to be defined in the section stages of config.yml file.