Created
March 4, 2015 16:51
-
-
Save NicolasGeraud/6c3d32d7bf201042433a to your computer and use it in GitHub Desktop.
JENKINS - suppression d'un additionnal behaviour Git
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import hudson.model.* | |
import hudson.plugins.git.* | |
changeBranche(Jenkins.instance.items) | |
def changeBranche(items) { | |
for (item in items) { | |
if (item =~ "Feature*") { | |
println(item.name) | |
for (ext in item.scm.extensions) { | |
if (ext instanceof hudson.plugins.git.extensions.impl.LocalBranch) { | |
println("remove extension " + ((hudson.plugins.git.extensions.impl.LocalBranch)ext).getLocalBranch()) | |
item.scm.extensions.remove(ext.descriptor) | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment