The following plugin provides functionality available through Pipeline-compatible steps. Read more about how to integrate steps into your Pipeline in the Steps section of the Pipeline Syntax page.
For a list of other such plugins, see the Pipeline Steps Reference page.
buildMasterCreateBuild
: Create BuildMaster BuildCreates a new build for the selected BuildMaster application and sets the BUILDMASTER_BUILD_NUMBER environment variable with the value returned from BuildMaster for the new build.
If your Jenkins job has produced artifacts to be loaded into BuildMaster, you have the following options to import the artifacts into BuildMaster:
Note: Jenkins declarative pipeline script has a somewhat restricted syntax, so to return the build number you need to wrap this in a script block. You only need to do this if you wish to use the build number in a later step. For more information see: https://jenkins.io/doc/book/pipeline/syntax/#script
script { BUILDMASTER_BUILD_NUMBER = buildMasterCreateBuild(applicationId: BUILDMASTER_APPLICATION_ID', releaseNumber: BUILDMASTER_RELEASE_NUMBER, buildVariables: 'hello=world', deployToFirstStage: [waitUntilCompleted: true]) }
applicationId
The identifier of the BuildMaster application to trigger the build for.
Options are:
String
releaseNumber
The BuildMaster release number to trigger the build for. Options are:
The job will fail if there is no active BuildMaster release.
String
deployToFirstStage
(optional)
waitUntilCompleted
boolean
printLogOnFailure
(optional)
boolean
variables
(optional)
Provide a list of variables to pass to the build.
String
step([$class: 'CreateBuildBuilder'])
: Create BuildMaster BuildCreates a new build for the selected BuildMaster application and sets the BUILDMASTER_BUILD_NUMBER environment variable with the value returned from BuildMaster for the new build.
If your Jenkins job has produced artifacts to be loaded into BuildMaster, you have the following options. The choice is largely dependent on how you import the build artifacts into BuildMaster:
applicationId
The identifier of the BuildMaster application to trigger the build for.
Options are:
String
releaseNumber
The BuildMaster release number to trigger the build for. Options are:
The job will fail if there is no active BuildMaster release.
String
deployToFirstStage
(optional)
waitUntilCompleted
boolean
printLogOnFailure
(optional)
boolean
variables
(optional)
Provide a list of variables to pass to the build.
String
buildMasterDeployBuildToStage
: Deploy BuildMaster Build To StageDeploys (or re-deploys) a build to a particular stage.
Note: that when used in a pipeline step that the applicationId, releaseNumber, and buildNumber fields are required:
buildMasterDeployBuildToStage(applicationId: BUILDMASTER_APPLICATION_ID, releaseNumber: BUILDMASTER_RELEASE_NUMBER, buildNumber: BUILDMASTER_BUILD_NUMBER)
applicationId
The identifier of the BuildMaster application to trigger the build for.
Options are:
String
releaseNumber
The BuildMaster release number to trigger the build for. Options are:
The job will fail if there is no active BuildMaster release.
String
buildNumber
The BuildMaster build number to trigger the deployment for.
The must be set to an existing build number. Typically this would be obtained from the output of the createBuild step which populates the BUILDMASTER_BUILD_NUMBER environment variable.
String
force
(optional)
boolean
printLogOnFailure
(optional)
boolean
stage
(optional)
Optional. If not supplied, the next stage in the pipeline will be used.
String
variables
(optional)
Set deployment level variables.
String
waitUntilCompleted
(optional)
boolean
buildMasterWithApplicationRelease
: Inject BuildMaster release details as environment variablesObtains the Release and Build numbers for the selected BuildMaster application from BuildMaster and injects the following environment variables into the build job:
If you do not use these values in your build steps there is no requirement to use this task.
Note: If you have multiple jobs all triggering builds on the same BuildMaster application this task will queue those jobs so that you cannot get two jobs triggering a build at the same time.
When used within pipeline script this wraps a block and injects the above variables. Note that the applicationId parameter can contain either the id or name of a BuildMaster application.
buildMasterWithApplicationRelease('TestApplication') { echo """ Application id = $BUILDMASTER_APPLICATION_ID Release Number = $BUILDMASTER_RELEASE_NUMBER Build Number = $BUILDMASTER_BUILD_NUMBER """ }
applicationId
String
releaseNumber
(optional)
Select the BuildMaster release to populate environment variables for:
String
Please submit your feedback about this page through this quick form.
Alternatively, if you don't wish to complete the quick form, you can simply indicate if you found this page helpful?
See existing feedback here.