Commit 293ae34b authored by Muhammad Tehami's avatar Muhammad Tehami 💡

hsbvhfs

parent 6175e74d
#!/usr/bin/env groovy #!/usr/bin/env groovy
def call(body) { def call(body) {
def config = [name:'Config'] def config = [:]
println "Before: ${config.name}"
// body.resolveStrategy = Closure.DELEGATE_FIRST // body.resolveStrategy = Closure.DELEGATE_FIRST
// body.delegate = config // body.delegate = config
body() println body()
echo config.name println "After: ${config.name}"
echo body.name echo body.name
echo "Param1 is: ${env.param1}" echo "Param1 is: ${env.param1}"
echo "Param2 is: ${env.param2}" echo "Param2 is: ${env.param2}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment