Complete the code to get the current build number.
def buildNumber = currentBuild.[1]
The currentBuild.number variable holds the current build number in Jenkins pipelines.
Complete the code to get the current build result status.
def buildStatus = currentBuild.[1]
The currentBuild.result variable holds the status of the current build, such as 'SUCCESS' or 'FAILURE'.
Fix the error in the code to get the build duration in milliseconds.
def buildTime = currentBuild.[1]
The currentBuild.duration property returns the build duration in milliseconds.
Fill both blanks to get the build display name and the build result.
def name = currentBuild.[1] def status = currentBuild.[2]
currentBuild.displayName gives the build's display name, and currentBuild.result gives the build status.
Fill all three blanks to get the build number, duration, and result.
def num = currentBuild.[1] def time = currentBuild.[2] def res = currentBuild.[3]
currentBuild.number is the build number, currentBuild.duration is the build time in milliseconds, and currentBuild.result is the build status.