Jenkins User Meetup  "XTrigger, EnvInject  and DryRun plugins"                     Grégory BOISSINOT                      ...
•  Senior Consultant and Trainer at Zenika    – Setting up CI processes in major companies•  Hudson Committer since Februa...
Development	       JAVA   ...         Event	  Environment                       Jenkins                                   ...
Jenkins roles   1.  Monitor an external infrastructure environment   2.  Prepare the running environment of the CI process...
SCMTriggerEnvironment                                                         FSTrigger                               Poll...
•  OB_A is triggered if there are changes in                              J                             SCM               ...
JOB1           JOB2         JOB3             JOB4   Polling jobs statussuch as "looking for new         failures"         ...
CommonF1	                                                                                  Build dependencies and         ...
JOB_A         PUSH                                                  Environment     Jenkins                               ...
•  In practice     – Do not exceed polling in your system     – Choosing the right schedule is indispensable•  However, ex...
•  For the FSTrigger plugin    – Implement the core in Python (or other language close to OS)•  For the IvyTrigger plugin ...
DOXYGEN_HOME                ANT_HOME                    ..                                             EnvInject          ...
•  Removes inherited environment variables by the Jenkins Java   process•  Injects environment variables at node (master/s...
•  Share objects and populate these objects as environment   variables     – Public File Path     – Simple Value     – Cle...
•  Get your build context and export it    – Delegate to EnvInject for getting environment variables used      in your bui...
•  Makes a dry-run at job level    – Exectutes the jobs steps with the dry-run option       •  obProperty/RunListeners    ...
•  Acitivate dry-un    – on RunListeners    – on SCMs•  Add a dry-run mode to the following plugins    – Ant/Ivy (build+ p...
•  Trying to federate the plugins     – xUnit, xTrigger, ...•  Do not put all business value in Jenkins    – DTKit for man...
Upcoming SlideShare
Loading in …5
×

Jenkins-meetup

1,189 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,189
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
17
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Jenkins-meetup

  1. 1. Jenkins User Meetup "XTrigger, EnvInject and DryRun plugins" Grégory BOISSINOT (@gboissinot) 2012-02-06 Jenkins 1
  2. 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. 3. Development   JAVA ... Event  Environment Jenkins Development   Integrator   Project  Manager   Jenkins 3
  4. 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 teamJenkins is focuses on the developer needs Jenkins 4
  5. 5. SCMTriggerEnvironment FSTrigger Polling URLTrigger IvyTrigger Jenkins MavenTrigger BuildResultTrigger ScriptTrigger•  ot only a SCM N XTrigger•  any ways to trigger a job M Jenkins 5
  6. 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. 7. JOB1 JOB2 JOB3 JOB4 Polling jobs statussuch as "looking for new failures" Clean JOB Environment Launch a clean Procedure Jenkins 7
  8. 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. 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. 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. 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. 12. DOXYGEN_HOME ANT_HOME .. EnvInject VARA=.. Plugin VARB=.. DOXYGEN_HOME ANT_HOME .. VARA VARB .. Prepare EnvPrepare Env vars from vars from job node Jenkins 12
  13. 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. 14. •  Share objects and populate these objects as environment variables – Public File Path – Simple Value – Clearcase Object – ... Jenkins 14
  15. 15. •  Get your build context and export it – Delegate to EnvInject for getting environment variables used in your build Jenkins 15
  16. 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. 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. 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

×