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).

<https://lh6.googleusercontent.com/-N76NzhN1bh4/VONsj2bvwcI/AAAAAAAAAFY/G7dt-tuxfm8/s1600/beforeRefresh.png>

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).

<https://lh5.googleusercontent.com/-vymQe4zoDYY/VONtKSTgKjI/AAAAAAAAAFg/l6CBn7vjvnE/s1600/afterRefresh.png>


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?




-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/57791067-6b91-4b11-b99f-ba39a339109f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to