Skip to content

Commit

Permalink
Merge pull request #55 from tangkun75/patch-2
Browse files Browse the repository at this point in the history
README: Add more examples for the pre-defined variable ('build') in the DSL
  • Loading branch information
dnozay committed Jun 10, 2015
2 parents 16b0336 + d82c39c commit bd179ac
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ You can pass parameters to jobs, and get the resulting `AbstractBuild` when requ

b = build( "job1", param1: "foo", param2: "bar" )
build( "job2", param1: b.build.number )
build(param1: "xxx", param2: "yyy", param3: "zzz", "job3")
build(param1: "xxx", "job4", param2: "yyy", param3: "zzz")
def myBuildParams = [param1:"xxx", param2:"yyy", param3:"zzz"]
build(myBuildParams, "job5")


Environment variables from a job can be obtained using the following, which is especially useful for getting things like the checkout revision used by the SCM plugin (`P4_CHANGELIST`, `GIT_REVISION`, etc) :

Expand All @@ -73,6 +78,7 @@ For example:
// use it in the flow
build("job1", parent_param1: params["param1"])
build("job2", parent_workspace:build.workspace)
build(params, "job3")


## Guard / Rescue ##
Expand Down

0 comments on commit bd179ac

Please sign in to comment.