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
Tweet

More Decks by Oleg Nenashev

Other Decks in Programming

Transcript

  1. @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
  2. @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
  3. @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
  4. @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
  5. @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
  6. @oleg_nenashev New  storage •Approaches 8 Common  database  engine Filesystem storage

     (current) Specialized  engines  (e.g.  Elasticsearch)
  7. @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
  8. @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
  9. @oleg_nenashev Q  &  A Contacts: • E-­‐mail:  [email protected] • Gitter:

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