Skip to content
This repository has been archived by the owner on Dec 15, 2021. It is now read-only.

Commit

Permalink
Merge pull request #425 from GabLeRoux/patch-1
Browse files Browse the repository at this point in the history
Build parameters not groovy variables anymore
  • Loading branch information
jglick committed Mar 24, 2017
2 parents c8d5db3 + 6f373f7 commit be4c636
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion TUTORIAL.md
Expand Up @@ -257,7 +257,18 @@ See Help in the **Snippet Generator** for the `withEnv` step for more details o

## Build Parameters

If you have configured your pipeline to accept parameters when it is built — **Build with Parameters** — they are accessible as Groovy variables of the same name.
If you have configured your pipeline to accept parameters when it is built — **Build with Parameters** — they are accessible as Groovy variables inside `params`. They are also accessible as environment variables.

**Example**: Using `isFoo` parameter defined as a boolean parameter (checkbox in the UI):

```groovy
node {
sh "isFoo is ${params.isFoo}"
sh 'isFoo is ' + params.isFoo
if (params.isFoo) {
// do something
}
```

# Recording Test Results and Artifacts

Expand Down

0 comments on commit be4c636

Please sign in to comment.