Skip to content

writeTemporaryCredentials

Description

Writes credentials to a temporary file and deletes it after the body has been executed.

Parameters

name mandatory default possible values
credentials no
credentialsDirectories no [./, integration-tests/src/test/resources]
script yes
  • credentials - The list of credentials that are written to a temporary file for the execution of the body. Each element of credentials must be a map containing a property alias and a property credentialId. You have to ensure that corresponding credential entries exist in your Jenkins configuration.
  • credentialsDirectories - The list of paths to directories where credentials files need to be placed.
  • 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
credentials X
credentialsDirectories X
script