Skip to main content

Expression variables

Index of variables that can be referenced in pipelines with the expression syntax ${{ variable.name }}.

build.action

Provides the action that triggered the pipeline execution. Use this value to differentiate between the pull request being created, reopened, when a branch is created, etc.

ActionValue
Manual Run
Branch Createdbranch_created
Branch Updatedbranch_updated
Pull Request Createdpullreq_created
Pull Request Updatedpullreq_branch_updated
Pull Request Reopenedpullreq_reopened
Pull Request Closedpullreq_closed
Tag Createdtag_created
Tag Updatedtag_updated

build.after

Provides the git commit sha after the patch is applied.

ActionExample value
Allbcdd4bf0245c82c060407b3b24b9b87301d15ac1

build.author_email

Provides the commit email address for the current running build. Note this is a user-defined value and may be empty or inaccurate.

ActionExample value
Alljanedoe@example.com

build.author_login

Provides the commit author username for the current running build.

ActionExample value
Alljanedoe

build.author_name

Provides the commit author name for the current running build. Note this is a user-defined value and may be empty or inaccurate.

ActionExample value
AllJane Doe

build.before

Provides the git commit sha before the patch is applied.

ActionExample value
Allbcdd4bf0245c82c060407b3b24b9b87301d15ac1

build.branch

Provides the target branch for the push or pull request.

ActionExample values
Allmain, feature/develop

build.commit

Provides the git commit sha for the current running build.

ActionExample value
Allbcdd4bf0245c82c060407b3b24b9b87301d15ac1

build.event

Provides the event that triggered the pipeline execution.

ActionValue
Manual Runmanual
Branch Created, Updatedpush
Pull Request Created, Updated, Reopenedpull_request
Tag Created, Updatedtag

Provides a deep link the build results.

ActionExample value
Allhttps://gitness.company.com/example/hello-world/42

build.message

Provides the commit message or pull request title for the current running build.

ActionValue
Manual RunCommit message
Branch Created, UpdatedCommit message
Pull Request Created, Updated, ReopenedPull request title
Tag Created, UpdatedCommit message

build.number

Provides the build number for the current running build.

ActionExample value
All42

build.ref

Provides the git reference for the current running build.

ActionExample values
Manual Runrefs/heads/main, refs/heads/feature/develop
Branch Created, Updatedrefs/heads/main, refs/heads/feature/develop
Pull Request Created, Updated, Reopenedrefs/heads/feature/develop
Tag Created, Updatedrefs/tags/v1.2.3

build.sender

Provides the username for who initiated a manual build.

ActionExample values
Manual Runjanedoe
Branch Created, Updated
Pull Request Created, Updated, Reopened
Tag Created, Updated

build.source

Provides the source branch.

ActionExample values
Manual Runmain, feature/develop
Branch Created, Updatedmain, feature/develop
Pull Request Created, Updated, Reopenedmain, feature/develop
Tag Created, Updatedrefs/tags/v1.2.3

build.target

Provides the target branch.

ActionExample values
Manual Runmain
Branch Created, Updatedmain, feature/develop
Pull Request Created, Updated, Reopenedmain
Tag Created, Updatedrefs/tags/v1.2.3

build.title

Provides the commit message or pull request title for the current running build.

ActionValue
Manual RunCommit message
Branch Created, UpdatedCommit message
Pull Request Created, Updated, ReopenedPull request title
Tag Created, UpdatedCommit message