Fixed jenkins global library enforcing
Change-Id: I6fcbce6f26462d3213562daca053a96693a10880
diff --git a/_states/jenkins_lib.py b/_states/jenkins_lib.py
index 46970f5..7af839e 100644
--- a/_states/jenkins_lib.py
+++ b/_states/jenkins_lib.py
@@ -9,7 +9,7 @@
def globalLibsDesc = Jenkins.getInstance().getDescriptor("org.jenkinsci.plugins.workflow.libs.GlobalLibraries")
def existingLib = globalLibsDesc.get().getLibraries().find{
- (!it.retriever.class.name.equals("org.jenkinsci.plugins.workflow.libs.SCMSourceRetriever") ||
+ (!it.retriever.class.name.equals("org.jenkinsci.plugins.workflow.libs.SCMSourceRetriever") ||
it.retriever.scm.remote.equals("${url}") &&
it.retriever.scm.credentialsId.equals("${credential_id}")) &&
it.name.equals("${lib_name}") &&
@@ -28,7 +28,7 @@
false))
LibraryConfiguration library = new LibraryConfiguration("${lib_name}", retriever)
library.setDefaultVersion("${branch}")
- library.setImplicit({implicit})
+ library.setImplicit(${implicit})
if(globalLibsDesc.get().getLibraries().isEmpty()){
globalLibsDesc.get().setLibraries([library])
}else{