|
Hi Everyone,
I'm trying to create a job in jenkins programmatically (using Remote Access API). By playing around and reading the documentation I found that I could do this by sending a xml document ( with a query parameter specifying the name of the job) with the configuration over http/Rest. Therefore, Is there any document about this XML document? For example, I want to create a job for application which resides on a SVN repo and build-able using maven 3. If we don't have documentation for options (tags and attributes) available for this XML fragment; I could create a similar job using the GUI and adapt my implementation based on the config.xml created for it. Would that be a good idea? Regards, - Ramith LSF ( www.opensource.lk) |
|
I've used your technique of creating a similar job from the GUI and passing that to the command line for multiple Jenkins releases. It works very well for me. I prefer that technique because it also allows me to compare my "archived" job definition (kept under source control for the project which it builds) with the actual implementation in the running Jenkins system. Mark Waite
|
|
Hi Mark,
Does this means we don't have a documentation explaining the tags & attributes available? regards Ramith LSF (www.opensource.lk) On Aug 20, 6:49 pm, Mark Waite <[hidden email]> wrote: > I've used your technique of creating a similar job from the GUI and passing that to the command line for multiple Jenkins releases. It works very well for me. I prefer that technique because it also allows me to compare my "archived" job definition (kept under source control for the project which it builds) with the actual implementation in the running Jenkins system. > > Mark Waite > > > > > > > > >________________________________ > > From: Ramith Jayasinghe <[hidden email]> > >To: Jenkins Users <[hidden email]> > >Sent: Monday, August 20, 2012 7:20 AM > >Subject: Creating a new Job Programatically. > > >Hi Everyone, > >I'm trying to create a job in jenkins programmatically (using Remote > >Access API). By playing around and reading the documentation I found > >that I could do this by sending a xml document ( with a query > >parameter specifying the name of the job) with the configuration over > >http/Rest. > > >Therefore, Is there any document about this XML document? > > >For example, I want to create a job for application which resides on a > >SVN repo and build-able using maven 3. If we don't have documentation > >for options (tags and attributes) available for this XML fragment; I > >could create a similar job using the GUI and adapt my implementation > >based on the config.xml created for it. Would that be a good idea? > > >Regards, > >- Ramith > >LSF (www.opensource.lk) |
|
The schema is dynamic based on the plugins installed and their serialisation via xstream.
Backwards compatibility constrains should ensure that it is reasonably stable, but you need to look at the backing classes to infer the purpose of each field and what values it can take
On Tuesday, 21 August 2012, Ramith Jayasinghe wrote: Hi Mark, |
|
In reply to this post by Ramith Jayasinghe
I am not aware of any documentation which describes the tags and attributes available in the job definition config.xml file. It seems like it would be difficult to maintain that type of documentation, since the allowed tags and their attributes are defined by the sum of the Jenkins core tags and attributes plus the tags and attributes allowed by all the plugins installed in that particular Jenkins instance. Mark Waite
|
| Powered by Nabble | Edit this page |
