Jenkins currentBuild: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 3: Line 3:
=Overview=
=Overview=


<code>currentBuild</code> is a [[Jenkins_Concepts#currentBuild|global variable]] that may be used to refer to the currently running build. It has the following properties:
<code>currentBuild</code> is a [[Jenkins_Concepts#currentBuild|global variable]] that may be used to refer to the currently running build. It has the following [[#Properties|properties]] and [[#Methods|methods]].


=Properties=
=Properties=

Revision as of 04:30, 8 May 2021

Internal

Overview

currentBuild is a global variable that may be used to refer to the currently running build. It has the following properties and methods.

Properties

number

The build number, which is an integer.

result

Typically "SUCCESS", "UNSTABLE" or "FAILURE". May be null for an ongoing build. The property is writable.

currentResult

Typically "SUCCESS", "UNSTABLE" or "FAILURE". Is never null. If no failure occurred, the result is "SUCCESS".

Methods