Wiki

Clone wiki

bamboo-maven-version-variable-updater-plugin / scope

Variable Scope

When setting a Bamboo variable, it's necessary to specify which will be the scope of the new value:

Local (formelly Job)

It will be only available inside the same job. It's very useful when mixing different tasks, for example it's possible to read a variable from a pom file, increment it, and use in a subsequential task of the same job.

It will be possible to see the new end value in the job metadata screen:

metadata

It's possible to add any new variable to the job context. Keep in mind that the new value will be completely ignored in the next jobs, stages or even deployments of this build. They will retain the original value defined on the very beginning of the build.

Result

New scope added in Bamboo 5.7.0

The new value will be available in the current job, and all subsequential stages and associate deployment environments.

Plan/Deployment/Global

The new value will only be available for the next run of this build. Current run will keep the old value.

Calling from a Plan

When updating a plan scoped variable from a plan, you will be able to verify it from the Plan Configuration:

Plan Variables

The current job, following stages and any deployment environments associated will keep the value defined in the very beginning of the build.

Calling from a Deployment environment

The new value will only be available for the next run of this environment. Current run will keep the old value.

Enviroment Variables

Saving global variables

If specified, it's possible to save global variables as well.

Global Variables

Updated