ghale / gradle-jenkins-plugin

Gradle plugin to programmatically configure Jenkins jobs.
123 stars 42 forks source link

getConfigFileId always returns null #65

Open u3r opened 8 years ago

u3r commented 8 years ago

MapJobManagement.getConfigFileId always returns null. This leads to problems when custom maven settings should be used:

   type = "Maven"
   dsl {
      providedSettings("MyProjectGroupSettings") 
   }

leads to Managed Maven settings with name 'MyProjectGroupSettings' not found

I managed to circumvent that with

configure { project ->
                        project << 'settings' ('plugin':"config-file-provider@2.9.2", 'class':"org.jenkinsci.plugins.configfiles.maven.job.MvnSettingsProvider") {
                            'settingsConfigId'('org.jenkinsci.plugins.configfiles.maven.MavenSettingsConfig1368600787393')
                        }

but this is very nasty, as the config id could change.

Is it possible to hit the server(s) and ask for it?

57 seems to be a similar problem (offline usage)