[artifactory] Always set 'Use credentials' flag
Formula supports credential-based artifactory authorization only.
So need to set `Use the Credentials Plugin` parameter
unconditionally
Closes-PROD: https://mirantis.jira.com/browse/PROD-21302
Change-Id: I6218ab89e2347614d1c15ee48a6297e392341cee
diff --git a/_states/jenkins_artifactory.py b/_states/jenkins_artifactory.py
index daccc2e..d88b84a 100644
--- a/_states/jenkins_artifactory.py
+++ b/_states/jenkins_artifactory.py
@@ -8,6 +8,9 @@
import org.jfrog.hudson.*
def inst = Jenkins.getInstance()
def desc = inst.getDescriptor("org.jfrog.hudson.ArtifactoryBuilder")
+if (! desc.useCredentialsPlugin ) {
+ desc.useCredentialsPlugin = true
+}
// empty artifactory servers is not empty list but null, but find can be called on null
def server = desc.getArtifactoryServers().find{it -> it.name.equals("${name}")}
if(server &&