Skip to content

Commit

Permalink
Update remove env var
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangtai committed Oct 7, 2022
1 parent ac7f9a8 commit cd25f59
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion system/global_environment_variables.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,10 @@ evnp.envVars.each { e ->
println e
}

null
// Remove Vars
def envVars = Jenkins.get().globalNodeProperties[0].envVars
def varsToRemove = ["FOO", "Bar"]
varsToRemove.each {envVars.remove(it)}

// Add Vars
envVars.put("FOO", "foo")

0 comments on commit cd25f59

Please sign in to comment.