Creates 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]) }