Well if I go into that project (that I created with empty project through 
API) and simply hit save on the Configure page of the UI without changing 
anything.   It will then have the default values that you'd see when 
creating an empty project using the UI in the config.xml.  Very strange 
behavior.

Anyway, I'm going to assume that I should start with the config.xml that's 
created by creating an empty project in the UI.  

On Tuesday, March 8, 2016 at 1:53:28 PM UTC-8, Michael Neale wrote:

> It certainly should - but did you change and save any config items in the 
> UI? If not, I expect they are just the defaults of the plugins installed. 
> If you change the label for instance (restrict where it can run) I bet it 
> would have more in it. 
>
> On Wednesday, March 9, 2016 at 8:30:10 AM UTC+11, memoe wrote:
>>
>>
>> Because there is no schema or documentation for config.xml (used for 
>> createItem API call) I've been trying to figure it out by just using it.  
>> One of the things that I'd like to know is what is the minimum for creating 
>> a viable Project in Jenkins?
>>
>> If I use the UI to create a new project and select "new item" and 
>> "Freestyle Project", give it a name and hit OK it creates an empty 
>> project.  If I go look at the config.xml for that Project I see what is 
>> pretty small XML which seems to reflect what's being shown (like 
>> hudson.scm.NullSCM 
>> to reflect a SCM of none).  That makes sense.
>>
>> However, the API allows me to send an empty config.xml to create a 
>> Project (I still need to supply a name).  This XML is simply 
>> <project></project> and it will create a Project with some values actually 
>> set (like SCM to none) and strangely "Restrict where this project can be 
>> run".  However, even more strangely, if I go look at the config.xml for 
>> this project it will only show the XML that I used to create the project.  
>> It won't show the hudson.scm.NullSCM to reflect a SCM of none or 
>> anything else, it will just show <project></project>, that's it.  This 
>> concerns me because the config.xml isn't actually reflecting what the UI is 
>> showing me for that project.  Should this project have been created?  
>> Shouldn't the config.xml reflect what is being shown in the UI?
>>
>> thanks!
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/74257798-3f7b-4a74-8620-3bd412c76625%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to