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

Fingerprints Engine for Jenkins 2.x. Proposals

Fingerprints Engine for Jenkins 2.x. Proposals


Oleg Nenashev

February 01, 2016


  1. FINGERPRINT  ENGINE  2.0 Jenkins  2.0  Summit Oleg  Nenashev,  Jenkins  contributor

  2. @oleg_nenashev Outline •Fingerprints  101 •Why? •Proposed  changes • Storage  engine

    • Architecture • UX 2
  3. @oleg_nenashev Fingerprints  101.  What  is  it? ØGeneric  key  =>  object

     storage  in  Jenkins ØUsages: • Build  artifacts  usage  tracing • Container  usage  tracking • Examples:  Deployment  plugin,  Docker Traceability 3
  4. @oleg_nenashev Fingerprints  101.  Structure 4 ID Fingerprint Facet  #1 Facet

     #2 Facet  #N original BuildPtr .  .  . usages BuildPtr[] uint64 File  storage  (XML) LazyLoading Build,  which   produced  the   fingerprint Other  builds Data Summary  UI Fingerprint Storage
  5. @oleg_nenashev Fingerprint  Retention  policy •FPs  are  being  deleted  once  per

     day  if  … • “original”  points  to  the  deleted  Run • All  “usages”  also  point  to  the  deleted  build •Limitations: • No  extension  points  allowing  altering  the  behavior • Fingerprint  Facets  cannot  prohibit  the  removal   • Cannot  reliably  store  fingerprints  for  external  items • Examples:  External  Docker images  from  DockerHub (Docker Traceability) 5
  6. @oleg_nenashev Why  do  we  need  update? ØMany  use-­‐cases • Big

     data • Data  Analytics  (indexing,  etc.) • Traceability  of  images/containers,  which  do  not   come  from  Jenkins  builds 6
  7. @oleg_nenashev New  storage •Nice2Have:  DB  storage  for  Jenkins  2.x  (?)

    •Fingerprints  are  isolated • =>Good  proof-­‐of-­‐concept •What  we  need: • Flexible  data  structure  (facets  have  no  standards) • Lazy  loading  of  data  to  Jenkins • Retention  strategy • Data  accessibility 7
  8. @oleg_nenashev New  storage •Approaches 8 Common  database  engine Filesystem storage

     (current) Specialized  engines  (e.g.  Elasticsearch)
  9. @oleg_nenashev UX  Improvements •Classic  Jenkins  action  engine • sidepanel with

     index.jelly • summary.jelly 9
  10. @oleg_nenashev API •<API  should  be  improved> 10

  11. @oleg_nenashev Extensible  fingerprints •Current  state: • No  class  hierarchy •

    All  layouts  are  being  managed  by  FingerprintFacets •Proposal: • Make  Fingerprints  inheritable • Add  getIcon(),  getDisplayName(),  etc. • Make  layout  customizable  as  well 11
  12. @oleg_nenashev Extension  points •TransientFingerprintActionFactory •FingerprintStorage • Default  extensions:  Filesystem (legacy),

     DB  (for  the   type  we  select  for  Jenkins  3.0) •FingeprintListener • Allows  to  listen  for  FP  events • onLoaded(),  onCreated(),  onDeleted() •FingerprintDispatcher • canDelete(),  etc. 12
  13. @oleg_nenashev Q  &  A Contacts: • E-­‐mail:  o.v.nenashev@gmail.com • Gitter:

     /oleg-­‐nenashev • Twitter:  @oleg_nenashev 13