Creates a new build for the selected BuildMaster application and sets the BUILDMASTER_PACKAGE_NUMBER script and environment variables.

Unlike the FreeStyle plugins, this script plugin can be used for both build and post build actions. The choice of executing this plugin as a build step or post build action will be largely dependent on how you import the build artifacts into BuildMaster:

  1. You are using the BuildMaster Jenkins Build Importer Build Step which imports build artifacts from Jenkins: the post build action is required.
  2. You are using a standard BuildMaster build step and importing files from a folder that you've placed the artifacts into from the Jenkins build (eg using ArtifactDeployer Plugin): either the post build or build step actions will be fine.
  3. You use an external artifact repository such as Nexus, Artifactory or ProGet: either the post build or build step actions will be fine.

If you have multiple Jenkins jobs all triggering a build for the same BuildMaster application check out the "Enable Deployable in BuildMaster" and "Copy Previous Build's Variables" options as a means to ensure that the new BuildMaster build picks up artifacts from only the Jenkins jobs that have build for its release.

Note that pipeline steps are unable to set variables directly so must be called in this format:

BUILDMASTER_PACKAGE_NUMBER = buildMasterCreatePackage(applicationId: '${BUILDMASTER_APPLICATION_ID}', packageNumber: '${BUILDMASTER_PACKAGE_NUMBER}', releaseNumber: '${BUILDMASTER_RELEASE_NUMBER}', deployToFirstStage: true, waitTillBuildCompleted: [printLogOnFailure: true])