Gradle Artifactory Integration with Jenkins Job DSL

237 views
Skip to first unread message

goodav

unread,
Feb 17, 2015, 11:42:32 AM2/17/15
to jenkins...@googlegroups.com

We are using the Jenkins DSL to define our jobs and have had very good success with it.  However, when writing a job for our projects that use Gradle, where a successful build publishes to Artifactory, we have to manually configure Artifactory on the jobs first run even though we defined all the Artifactory config in the DSL. 

Our DSL job results in the following config.xml snippet for our job:

<details>
 
<artifactoryUrl>http://my.artifactory.server/artifactory</artifactoryUrl>
 
<artifactoryName>artifactory</artifactoryName>
 
<repositoryKey>libs-snapshot-local</repositoryKey>
 
<snapshotsRepositoryKey>libs-snapshot-local</snapshotsRepositoryKey>
 
<downloadReleaseRepositoryKey>libs-snapshot-local</downloadReleaseRepositoryKey>
 
<downloadReleaseRepositoryDisplayName>libs-snapshot-local</downloadReleaseRepositoryDisplayName>
 
<stagingPlugin>
 
<pluginName>None</pluginName>
 
</stagingPlugin>
 
<userPluginKey>None</userPluginKey>
</details>


When we run the job for the first time it fails because the "Publishing Repository" has not been populated (see below).

After clicking the refresh button the "Publishing Repository" field is then populated with a value (although it is not the correct value from our DSL config:  see xml above).


This seems like a defect with the plugin because after clicking the refresh button and saving the job configuration, there is not a single change the the above xml snippet.  Comparing the config.xml for the job before and after results in no differences.

Has anyone else encountered this or found a way around it?




sravan bala

unread,
Apr 28, 2015, 6:15:58 PM4/28/15
to jenkins...@googlegroups.com
I got the some problem. I passed through this error by giving artifactory name, the numbered name. Just create a fake job/ or check already existing config.xml`s "artifactory-name" tag for a job. You will find the name with numbers(eg:16789834@566678). If you give that, ur parameters are being set. Hope it is helpful. Thank you!
Reply all
Reply to author
Forward
0 new messages