SlideShare a Scribd company logo
Jenkins User Meetup
  "XTrigger, EnvInject
  and DryRun plugins"

                     Grégory BOISSINOT
                          (@gboissinot)
                            2012-02-06


           Jenkins                        1
•  Senior Consultant and Trainer at Zenika
    – Setting up CI processes in major companies

•  Hudson Committer since February 2008

•  Active Jenkins contributor and committer
    – Creator and maintainer ~30 plugins
    – Mainly on my free time

•  A pragmatic guy:
     – Clearcase is a great VCS tools
     – Ivy is the best dependency manager
     – FarManager is the best file manager on Windows
                                 Jenkins                2
Development	
       JAVA   ...




         Event	
  




Environment                       Jenkins




                                               Development	
  
                                                 Integrator	
  
                                              Project	
  Manager	
  
                                    Jenkins                        3
Jenkins roles
   1.  Monitor an external infrastructure environment
   2.  Prepare the running environment of the CI process
   3.  Start the integration process
   4.  Ensure traceability tool with the software configuration
       management from the source to the generated binaries
       (bidirectional)
   5.  Orchestrating quality tools code
   6.  Notify the development team

Jenkins is focuses on the developer needs

                              Jenkins                             4
SCMTrigger
Environment
                                                         FSTrigger


                               Polling                  URLTrigger


                                                        IvyTrigger
                                         Jenkins

                                                       MavenTrigger


                                                   BuildResultTrigger


                                                      ScriptTrigger
•  ot only a SCM
 N
                                                       XTrigger
•  any ways to trigger a job
 M

                               Jenkins                                  5
•  OB_A is triggered if there are changes in
                              J
                             SCM

                             •  OB_B is triggered only if there are new
                              J
                             artefacts in the file system repository

                             •  OB_A and JOB_B are not tied together.
                              J

      POLL



     JOB_A            PUSH
"Build & UnitTests"                            POLL
                             Artifact


             RUN                                    JOB_B
                                                "Functional Tests"


                                                             RUN




                             Jenkins                                        6
JOB1           JOB2         JOB3             JOB4



   Polling jobs status
such as "looking for new
         failures"


                           Clean JOB
                                                    Environment




                              Launch a clean
                                Procedure


                                          Jenkins                 7
CommonF1	
  
                                                                                Build dependencies and
                                                                                  the usage of latest
                                                                          ivy.xml
                                                                                        strategy
                                         ivy.xml

                            Client	
                         Server	
  




         POLL	
  

                                                                                      Client	
                      PUSH	
                  Ivy	
  
                          PUSH	
  
CommonF1	
                                         Ivy	
  
                                                                                                   IvyTrigger	
  
                                                                           POLL	
  
         SCMTrigger	
                Common	
                                                                       PUSH	
     Client	
           Server	
  
                                                                                      Server	
  
                                                                                                   IvyTrigger	
  


                   Jobs are triggered by events
                   No dependencies between Jenkins jobs
                   You build only jobs that have to build (incremental build
             at     Jenkins level)             Jenkins                                                                                                         8
JOB_A         PUSH
                                                  Environment




     Jenkins

                                     POLL
                       JOB_B


•  o static dependencies between jobs
 N

•  ependencies in the build chain are driven to a change of an external resource
 D

•  ou can rebuild your application without a dependency on Jenkins
 Y
                                                                          DEMO
                                        Jenkins                                    9
•  In practice
     – Do not exceed polling in your system
     – Choosing the right schedule is indispensable

•  However, except for SCM, handle events (hooks) is difficult
    – FileSystem?
    – Binary Repository ?
    – URL?

    Maybe an evolution



                                 Jenkins                         10
•  For the FSTrigger plugin
    – Implement the core in Python (or other language close to OS)

•  For the IvyTrigger plugin
    – Add credentials

•  XTrigger
    – Add GradleTrigger typlogy
    – Add a DSL on top of for describing a build chain




                                Jenkins                              11
DOXYGEN_HOME
                ANT_HOME
                    ..




                                             EnvInject
                                VARA=..       Plugin
                                VARB=..


              DOXYGEN_HOME
                ANT_HOME
                    ..



                                                         VARA
                                                         VARB
                                                           ..


                              Prepare Env
Prepare Env
 vars from                   vars from job
   node




                                  Jenkins                       12
•  Removes inherited environment variables by the Jenkins Java
   process
•  Injects environment variables at node (master/slave) startup
•  Executes a setup script before or/and after a SCM checkout
•  Injects environment variables before or/and after a SCM checkout
•  Injects environment variables as a build step.
•  Exports environment variables at the end of the build in order to to
   know the set of environment variables used for each build




                                                                DEMO
                                  Jenkins                                 13
•  Share objects and populate these objects as environment
   variables
     – Public File Path
     – Simple Value
     – Clearcase Object
     – ...




                                Jenkins                      14
•  Get your build context and export it
    – Delegate to EnvInject for getting environment variables used
      in your build




                                Jenkins                              15
•  Makes a dry-run at job level
    – Exectutes the jobs steps with the dry-run option
       •  obProperty/RunListeners
        J
       •  uildWrappers
        B
       •  uilders
        B
       •  ublishers
        P

•  Supported plugins at the moment
    – Gradle builder
    – xUnit publisher



                                                         DEMO
                                    Jenkins                     16
•  Acitivate dry-un
    – on RunListeners
    – on SCMs

•  Add a dry-run mode to the following plugins
    – Ant/Ivy (build+ publisher)
    – ArtifactDeployer




                                 Jenkins         17
•  Trying to federate the plugins
     – xUnit, xTrigger, ...

•  Do not put all business value in Jenkins
    – DTKit for managing metric reports (conversion,
      validation, database, rest server, ...)

•  Having an industry approach
    – Manage your environment with the EnvInject
    – Capture your build context with the BuildContextCapture
    – Do not grow the number of tools in your continuous build

                                Jenkins                          18

More Related Content

PDF
Continuous Delivery Overview
PDF
PushToTest TestMaker 6.5 Open Source Test Design Document
PDF
Maven nutshell
PDF
Att lyckas med integration av arbetet från flera scrum team - Christophe Acho...
PPTX
Drupal & Continous Integration - SF State Study Case
PPTX
Linuxtag 2012 - continuous delivery - dream to reality
PPTX
Ontologies and Continuous Integration
PPTX
03 - Continuous Integration
Continuous Delivery Overview
PushToTest TestMaker 6.5 Open Source Test Design Document
Maven nutshell
Att lyckas med integration av arbetet från flera scrum team - Christophe Acho...
Drupal & Continous Integration - SF State Study Case
Linuxtag 2012 - continuous delivery - dream to reality
Ontologies and Continuous Integration
03 - Continuous Integration

What's hot (13)

PPTX
Java build tools
PPTX
Maven for Dummies
PPTX
Continuous delivery chernivcy
PDF
Alm 4 Azure with screenshots
PDF
Tccc10 tooling testingci-vs2010teamcity
PDF
CDI Best Practices with Real-Life Examples - TUT3287
PDF
Agile Open Source Performance Test Workshop for Developers, Testers, IT Ops
PDF
Scrumbox ece2011.pptx
PDF
Agile Open Source Performance Testing Workshop for Business Managers
PDF
GR8Conf 2011: Adopting Grails
PPTX
Improve DB2 testing environments
KEY
Evolutionary change with Kanban
PDF
Agile Software Development & Tools
Java build tools
Maven for Dummies
Continuous delivery chernivcy
Alm 4 Azure with screenshots
Tccc10 tooling testingci-vs2010teamcity
CDI Best Practices with Real-Life Examples - TUT3287
Agile Open Source Performance Test Workshop for Developers, Testers, IT Ops
Scrumbox ece2011.pptx
Agile Open Source Performance Testing Workshop for Business Managers
GR8Conf 2011: Adopting Grails
Improve DB2 testing environments
Evolutionary change with Kanban
Agile Software Development & Tools
Ad

Similar to Jenkins-meetup (20)

PPTX
Automated Testing and Continuous Deployment for Mobile Apps with Jenkins
PDF
Testing Salesforce at Cloud Scale
PPT
Continuous integration
PPTX
Running productioninstance 1-localcopy
PDF
Jenkins_UserMeetup_Paris_201105
PPTX
Jumping from Continuous Integration to Continuous Delivery with Jenkins Enter...
PDF
Automated testing DrupalCamp in Asheville
PDF
Hands on iOS developments with jenkins
PDF
My "Perfect" Toolchain Setup for Grails Projects
PDF
Continuous delivery with Jenkins Enterprise and Deployit
PDF
Jenkins User Meetup - eXo usages of Jenkins
PDF
Jenkins for One
PPTX
Continuous Development with Jenkins - Stephen Connolly at PuppetCamp Dublin '12
PPTX
Jenkins Evolutions - JEEConf 2012
PPTX
Sv jug - mar 2013 - sl
PDF
Hudson以外の何か with 任意
PDF
Jenkins CI for MacDevOps
PPT
Jenkins - Continuous Integration after Hudson, CruiseControl, and home built
PPTX
Continuous Test Automation via CI (CodeMash 2012) - Automating the Agile way
PPTX
Beyond Continuous Delivery - Jenkins User Conference - 23 Oct 2014
Automated Testing and Continuous Deployment for Mobile Apps with Jenkins
Testing Salesforce at Cloud Scale
Continuous integration
Running productioninstance 1-localcopy
Jenkins_UserMeetup_Paris_201105
Jumping from Continuous Integration to Continuous Delivery with Jenkins Enter...
Automated testing DrupalCamp in Asheville
Hands on iOS developments with jenkins
My "Perfect" Toolchain Setup for Grails Projects
Continuous delivery with Jenkins Enterprise and Deployit
Jenkins User Meetup - eXo usages of Jenkins
Jenkins for One
Continuous Development with Jenkins - Stephen Connolly at PuppetCamp Dublin '12
Jenkins Evolutions - JEEConf 2012
Sv jug - mar 2013 - sl
Hudson以外の何か with 任意
Jenkins CI for MacDevOps
Jenkins - Continuous Integration after Hudson, CruiseControl, and home built
Continuous Test Automation via CI (CodeMash 2012) - Automating the Agile way
Beyond Continuous Delivery - Jenkins User Conference - 23 Oct 2014
Ad

More from Gregory Boissinot (20)

PDF
Practical Software Architecture DDD
PDF
DDD Introduction
PDF
SOAT Agile Day 2017 DDD
PDF
DevDay2017 ESGI Essential DDD
PDF
Beyond Relational Databases
PDF
Paris Redis Meetup Introduction
PDF
Paris Redis Meetup Starting
PDF
PZ_Microservices101_20150210
PDF
Spring Integration JUG SummerCamp 2013
PDF
gradle_nantesjug
PDF
gradle_lavajug
PDF
JENKINS_BreizhJUG_20111003
PDF
JENKINS_OWF11_OSDC_PARIS20110924
PDF
Gradle_Paris2010
PDF
Gradle_LyonJUG
PDF
Gradle_NormandyJUG
PDF
Gradle_BreizJUG
PDF
Gradle_BordeauxJUG
PDF
Gradle_ToulouseJUG
PDF
Gradle_ToursJUG
Practical Software Architecture DDD
DDD Introduction
SOAT Agile Day 2017 DDD
DevDay2017 ESGI Essential DDD
Beyond Relational Databases
Paris Redis Meetup Introduction
Paris Redis Meetup Starting
PZ_Microservices101_20150210
Spring Integration JUG SummerCamp 2013
gradle_nantesjug
gradle_lavajug
JENKINS_BreizhJUG_20111003
JENKINS_OWF11_OSDC_PARIS20110924
Gradle_Paris2010
Gradle_LyonJUG
Gradle_NormandyJUG
Gradle_BreizJUG
Gradle_BordeauxJUG
Gradle_ToulouseJUG
Gradle_ToursJUG

Recently uploaded (20)

PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPT
Teaching material agriculture food technology
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
MYSQL Presentation for SQL database connectivity
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Electronic commerce courselecture one. Pdf
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
A Presentation on Artificial Intelligence
PDF
Machine learning based COVID-19 study performance prediction
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
cuic standard and advanced reporting.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
NewMind AI Weekly Chronicles - August'25 Week I
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Teaching material agriculture food technology
Chapter 3 Spatial Domain Image Processing.pdf
Review of recent advances in non-invasive hemoglobin estimation
MYSQL Presentation for SQL database connectivity
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Electronic commerce courselecture one. Pdf
Digital-Transformation-Roadmap-for-Companies.pptx
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
A Presentation on Artificial Intelligence
Machine learning based COVID-19 study performance prediction
Encapsulation_ Review paper, used for researhc scholars
Dropbox Q2 2025 Financial Results & Investor Presentation
Advanced methodologies resolving dimensionality complications for autism neur...
cuic standard and advanced reporting.pdf
20250228 LYD VKU AI Blended-Learning.pptx
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Per capita expenditure prediction using model stacking based on satellite ima...
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
NewMind AI Weekly Chronicles - August'25 Week I

Jenkins-meetup

  • 1. Jenkins User Meetup "XTrigger, EnvInject and DryRun plugins" Grégory BOISSINOT (@gboissinot) 2012-02-06 Jenkins 1
  • 2. •  Senior Consultant and Trainer at Zenika – Setting up CI processes in major companies •  Hudson Committer since February 2008 •  Active Jenkins contributor and committer – Creator and maintainer ~30 plugins – Mainly on my free time •  A pragmatic guy: – Clearcase is a great VCS tools – Ivy is the best dependency manager – FarManager is the best file manager on Windows Jenkins 2
  • 3. Development   JAVA ... Event   Environment Jenkins Development   Integrator   Project  Manager   Jenkins 3
  • 4. Jenkins roles 1.  Monitor an external infrastructure environment 2.  Prepare the running environment of the CI process 3.  Start the integration process 4.  Ensure traceability tool with the software configuration management from the source to the generated binaries (bidirectional) 5.  Orchestrating quality tools code 6.  Notify the development team Jenkins is focuses on the developer needs Jenkins 4
  • 5. SCMTrigger Environment FSTrigger Polling URLTrigger IvyTrigger Jenkins MavenTrigger BuildResultTrigger ScriptTrigger •  ot only a SCM N XTrigger •  any ways to trigger a job M Jenkins 5
  • 6. •  OB_A is triggered if there are changes in J SCM •  OB_B is triggered only if there are new J artefacts in the file system repository •  OB_A and JOB_B are not tied together. J POLL JOB_A PUSH "Build & UnitTests" POLL Artifact RUN JOB_B "Functional Tests" RUN Jenkins 6
  • 7. JOB1 JOB2 JOB3 JOB4 Polling jobs status such as "looking for new failures" Clean JOB Environment Launch a clean Procedure Jenkins 7
  • 8. CommonF1   Build dependencies and the usage of latest ivy.xml strategy ivy.xml Client   Server   POLL   Client   PUSH   Ivy   PUSH   CommonF1   Ivy   IvyTrigger   POLL   SCMTrigger   Common   PUSH   Client   Server   Server   IvyTrigger    Jobs are triggered by events  No dependencies between Jenkins jobs  You build only jobs that have to build (incremental build at Jenkins level) Jenkins 8
  • 9. JOB_A PUSH Environment Jenkins POLL JOB_B •  o static dependencies between jobs N •  ependencies in the build chain are driven to a change of an external resource D •  ou can rebuild your application without a dependency on Jenkins Y DEMO Jenkins 9
  • 10. •  In practice – Do not exceed polling in your system – Choosing the right schedule is indispensable •  However, except for SCM, handle events (hooks) is difficult – FileSystem? – Binary Repository ? – URL?  Maybe an evolution Jenkins 10
  • 11. •  For the FSTrigger plugin – Implement the core in Python (or other language close to OS) •  For the IvyTrigger plugin – Add credentials •  XTrigger – Add GradleTrigger typlogy – Add a DSL on top of for describing a build chain Jenkins 11
  • 12. DOXYGEN_HOME ANT_HOME .. EnvInject VARA=.. Plugin VARB=.. DOXYGEN_HOME ANT_HOME .. VARA VARB .. Prepare Env Prepare Env vars from vars from job node Jenkins 12
  • 13. •  Removes inherited environment variables by the Jenkins Java process •  Injects environment variables at node (master/slave) startup •  Executes a setup script before or/and after a SCM checkout •  Injects environment variables before or/and after a SCM checkout •  Injects environment variables as a build step. •  Exports environment variables at the end of the build in order to to know the set of environment variables used for each build DEMO Jenkins 13
  • 14. •  Share objects and populate these objects as environment variables – Public File Path – Simple Value – Clearcase Object – ... Jenkins 14
  • 15. •  Get your build context and export it – Delegate to EnvInject for getting environment variables used in your build Jenkins 15
  • 16. •  Makes a dry-run at job level – Exectutes the jobs steps with the dry-run option •  obProperty/RunListeners J •  uildWrappers B •  uilders B •  ublishers P •  Supported plugins at the moment – Gradle builder – xUnit publisher DEMO Jenkins 16
  • 17. •  Acitivate dry-un – on RunListeners – on SCMs •  Add a dry-run mode to the following plugins – Ant/Ivy (build+ publisher) – ArtifactDeployer Jenkins 17
  • 18. •  Trying to federate the plugins – xUnit, xTrigger, ... •  Do not put all business value in Jenkins – DTKit for managing metric reports (conversion, validation, database, rest server, ...) •  Having an industry approach – Manage your environment with the EnvInject – Capture your build context with the BuildContextCapture – Do not grow the number of tools in your continuous build Jenkins 18