Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Jenkins plugin development REX

Jenkins plugin development REX

Jenkins count more than 900 plugins now. It is easy, and most of the time quick to development a new one.

We made this presentation to show that, even if it seems easy, developing a plugin should only be done if there is no other option, and the "after development" questions must be solve before the first line of code.

Adrien Lecharpentier

September 10, 2014
Tweet

More Decks by Adrien Lecharpentier

Other Decks in Programming

Transcript

  1. Find & fetch latest analyse for project - Parse the

    report to extract issues - Generate graphs and code-browsing
  2. Find & fetch latest analyse for project - Parse the

    report to extract issues - Generate graphs and code-browsing - Create issue on Jira if threshold are overstepped
  3. Find & fetch latest analyse for project - Parse the

    report to extract issues - Generate graphs and code-browsing - Create issue on Jira if threshold are overstepped - As cheaply as possible
  4. wget report * Using Jira-plugin xml --> java dashboard history

    graph code-browsing summary issue creation **
  5. wget report * Using Jira-plugin xml --> java dashboard history

    graph code-browsing summary issue creation ** CodeSonar API is locked Fetch a first XML to discover the URL of the XML Report
  6. wget report * Using Jira-plugin xml --> java dashboard history

    graph code-browsing summary issue creation ** CodeSonar API is locked Fetch a first XML to discover the URL of the XML Report Possible 401 because too many simultaneous connections
  7. wget report * Using Jira-plugin xml --> java dashboard history

    graph code-browsing summary issue creation ** CodeSonar API is locked Fetch a first XML to discover the URL of the XML Report Possible 401 because too many simultaneous connections The URL of the server can change between 2 builds
  8. wget report * Using Jira-plugin xml --> java dashboard history

    graph code-browsing summary issue creation ** CodeSonar API is locked Fetch a first XML to discover the URL of the XML Report Possible 401 because too many simultaneous connections The URL of the server can change between 2 builds SPECIFIC TO CODESONAR
  9. wget report * Using Jira-plugin xml --> java dashboard history

    graph code-browsing summary issue creation **
  10. wget report * Using Jira-plugin xml --> java dashboard history

    graph code-browsing summary issue creation ** SPECIFIC TO JENKINS
  11. Who make it evolves? Zenika Client CodeSonar knows Jenkins use

    Jenkins doesn’t know Jenkins (?) doesn’t know CodeSonar use CodeSonar knows CodeSonar
  12. Who make it evolves? Zenika Client CodeSonar knows Jenkins use

    Jenkins doesn’t know Jenkins (?) doesn’t know CodeSonar use CodeSonar knows CodeSonar can’t follow CodeSonar evolutions buy new versions not involved in Jenkins
  13. Who make it evolves? Zenika Client CodeSonar knows Jenkins use

    Jenkins doesn’t know Jenkins (?) doesn’t know CodeSonar use CodeSonar knows CodeSonar can’t follow CodeSonar evolutions buy new versions not involved in Jenkins do IT services has it own business sells CodeSonar
  14. Environment* CCCC" Klocwork" CodeSonar" Checkstyle" Cpptest" Gnatmetric" ."."." Unified" Model"

    Report" Dashboard* in* Jenkins* Extrac>on" Step" Jenkins"DTKit"Plugin" GETS" REPORTS" PARSE" REPORTS" CREATE" GRAPHS" •  Add"Dashboard"(graph,"summary,"threshold,"etc)"to"the"exis>ng"DTKit"plugin" •  Add"a"genera>on/extrac>on"extension"point"to"DTKit"plugin"for"the"‘GET"Reports’"step" Parsing" Step"
  15. Vert.x' EventBus' Vert.x' Libs' Event'Bus' Generic'Jenkins'Dashboard' Metrics'Plugin' Hazelcast' Get'Report' VerBcle'

    Parse'Report' VerBcle' A'Module/Plugin' 'by'Metric' •  Use$a$Micro+service$pla/orm$(such$as$Vert.x)$with$dedicated$metrics$module$for$ ge=ng$and$parsing$metrics$reports$ •  Enable$to$use$the$beAer$languages$and$frmks$(not$only$Java)$for$ge=ng$ and/or$reporFng$metrics$data$ •  $Jenkins$is$used$as$a$client$of$the$pla/orm$and$for$reporFng$only$ Enviro nment'
  16. BUILD& BUILD& BUILD& BUILD& Component(C1( Component(C2( Component(C3( Component(Cn( ASSEMBLE& PACKAGE&

    DEPLOY& Build& Ar6fact& Repository& Package& Ar6fact& Repository& Deploy& Ar6fact& Repository& Unified( Model( Report( Unified( Model( Report( Unified( Model( Report( •  Use(a(specific(mechanism(for(ge:ng(the(report(and(for(a;aching(the( report((the(unfiied(model(result)(to(your(build(arAfacts( •  Report(your(metrics(on(demand( (
  17. Metadata& Repository& Environment* Extrac1on& Step& && Push&Step& Outbound*Getway* Inbound*Getway* Unified&

    Model& Report& CCCC& Klocwork& CodeSonar& Checkstyle& Cpptest& .&.&.&
  18. M" C" M" C" M" C" M" C" Binary'Metadata'Repository' $"org"

    $"name" $"version" $"status" $"dependencies" $"ar4facts" $"buildContext"{" """""env"vars,"etc" }" $"reportsFile"{" """xunit,"viola4ons,"""" coverage,"etc" }" "BUILD"API"REST" Mvn" Gradle" Jenkins" PROMOTION"API" Client" All"component"informa4on" stored"with"metadata" Metadata"Driven"Repository"with"Reports"