On Thursday, May 5, 2016 at 1:37:04 PM UTC-7, Alan Evangelista wrote:
>
> Hi,
>
> I'm starting to browse through Jenkins code and I have a lot of questions.
>
> 1) Is there are developer overview documentation? Having to browse through 
> Jenkins huge
>    code without any overview/design document to start is daunting.
>
> 2) If I understood correctly, Jenkins UI widgets are implemented in a MVC 
> style, similar to Swing. .jelly files 
>    are equivalent to Swing's view and Java classes in .java files are used 
> to implement Swing's model.
>    Is that correct?
>
> 3) Jenkins UI screens are implemented in a similar way to UI widgets, 
> mentioned in (2) ? 
>
> 4) Where do I find the mapping between Jenkins URLs and screens? It seems 
> to me a library
> used Stapler is used (it is the entry point class defined in 
> <servlet-class> in web.xml), 
> but I am not sure how it is configured
>  
> 5) Where is Jenkins web UI index page (.jelly and Java class ?) in code?
>
> 6) Where is the Jenkins API entry point (class) ?
>
> 7) Why there are hudson and jenkins packages? code in 'hudson' package 
> uses different
> standards / base (Jenkins or third-party) code, it is code which Jenkins 
> currently share with
> the Hudson project or it is "just" a matter of pending renaming?
>
> 8) What exactly is the scope of the code in 
> core/src/main/java/jenkins/model/ ? afaik in MVC, 
> all non UI-specific codeis in "model" layer, so things like 
> core/src/main/java/scm/,  
>
> core/src/main/java/security/ and core/src/main/java/tasks/ would also 
> belong to the 'model'
> layer and would be in a 'model' Java package.
>  
> 9) I see job metadata ("configuration" in Jenkins terminology) are stored 
> as xml. Job instances
> ("builds" in Jenkins terminology) metadata is stored only in filesystem or 
> is any database 
> used as persistence layer?
>
> 10) Build data structure (eg which attributes are retrieved) obtained via 
> Jenkins API is
> implicitly inferred from somewhere or there is a explicit mapping defined 
> somewhere?
>
> 11) I'd like to create a plugin which parses every job console output and 
> if it finds some
> special keyword/expression (eg "Job output"), it gets the string that 
> comes after it, 
> formats it and adds that to a "output" attribute returned by the Jenkins 
> API (and if
> possible, shown as a separate field in the build metadata in the Jenkins 
> web UI). 
> Is it possible? Is there any plugin extension point which would allow such 
> a feature? 
> Could you give me pointers in how to implement it?
>

I know very little about Jenkins or Java so take my advice with a grain of 
salt. I believe it would be possible to scan job console output because 
this is what the Build Failure Analyzer does (or seems to do). As for 
whether or not you can store strings to make them available through the 
API, I'm not so sure. The Build Description Setter plugin scans console 
output text but it also stores it to be viewed in different contexts. Since 
the API for various objects are programmable, I don't see why you couldn't 
add plugin-specific end points. So that's my advice: 

   - study the code from Build Failure Analyzer to see how to scan console 
   text in a plugin
   - study the code from Build Description Setter plugin to see how to 
   store specific data for later use (actually, come to think of it this 
   plugin also scans console output)
   
As for how to make that data available through the Jenkins HTTP API, I 
suspect it is possible but I'm not sure where to look for examples of 
plugins that do this.
 

>
>  
>

> Any help is welcome.
>
> Regards,
> Alan Evangelista 
>

-- 
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/9153bbcc-d3d8-45a7-8520-f7a2d4b67ecb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to