Hello All,--I am using job dsl plugin 1.47 and artifactory plugin 2.4.7 in jenkins.I am getting error while running the build job with the generic artifactory configuration. Here is the error log. I have configured the artifactory server in global configuration.Jenkins Artifactory Plugin version: 2.4.7 No Artifactory server configured for http://<ip>:<port>/artifactory. Please check your configuration. FATAL: No Artifactory server configured for http://<ip>:<port>/artifactory. Please check your configuration.
java.io.IOException: No Artifactory server configured for http://52.87.22.160:8081/artifactory. Please check your configuration. at org.jfrog.hudson.util.RepositoriesUtils.validateServerConfig(RepositoriesUtils.java:186) at org.jfrog.hudson.generic.ArtifactoryGenericConfigurator.setUp(ArtifactoryGenericConfigurator.java:271) at hudson.model.Build$BuildExecution.doRun(Build.java:156) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534) at hudson.model.Run.execute(Run.java:1738) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410) Skipped archiving because build is not successful Finished: FAILUREHere is the code that I used in the dsl scripts.job('gen-artifactory-config') { wrappers { artifactoryGenericConfigurator { details { artifactoryName('-XXXXXXXXX@XXXXXXXXXXX') artifactoryUrl('http://<ip>:<port>/artifactory') deployReleaseRepository { keyFromText('libs-snapshot-local') keyFromSelect('libs-snapshot-local') dynamicMode(false) } deploySnapshotRepository(null) resolveReleaseRepository(null) resolveSnapshotRepository(null) userPluginKey(null) userPluginParams(null) } resolverDetails(null) deployerCredentialsConfig{ username('admin') password('cGFzc3dvcmQ=') overridingCredentials(true) credentialsId('') } resolverCredentialsConfig(null) deployPattern('') resolvePattern('') matrixParams('') deployBuildInfo(true) includeEnvVars(false) envVarsPatterns { includePatterns('') excludePatterns('') } discardOldBuilds(true) discardBuildArtifacts(true) multiConfProject(false) artifactoryCombinationFilter('') } steps { maven('-e clean install deploy', 'pom.xml') } publishers { archiveArtifacts { pattern('target/*.war') onlyIfSuccessful() } } } }Please help me out on this.
You received this message because you are subscribed to the Google Groups "job-dsl-plugin" group.
To unsubscribe from this group and stop receiving emails from it, send an email to job-dsl-plugi...@googlegroups.com.
To post to this group, send email to job-dsl...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/job-dsl-plugin/004013ac-ef07-4d4b-96e8-ad774f7cf1f7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Thanks for the response daniel.Sorry, I forgot to update that the issue is resolved by giving artifactory name and url same as follows. It was not working even after giving the artifactory details in global configuration. It worked after giving both name and url same in dsl code.artifactoryName('http://<ip>:<port>/artifactory')
artifactoryUrl('http://<ip>:<port>/artifactory')
Correct me if I'm wrong. By seeing the following snippet, it is returning the artifactory server only if artifactory name and url are same. That is why even after configuring artifactory in global configuration, getting the issue still.public static ArtifactoryServer getArtifactoryServer(String artifactoryIdentity, List<ArtifactoryServer> artifactoryServers) { if (artifactoryServers != null) { for (ArtifactoryServer server : artifactoryServers) { if (server.getUrl().equals(artifactoryIdentity) || server.getName().equals(artifactoryIdentity)) { return server; } } } return null; }
-- Praveen
To view this discussion on the web visit https://groups.google.com/d/msgid/job-dsl-plugin/21252355-116c-4922-9687-9f0d08a3096e%40googlegroups.com.