DevOps Cours Jenkins
DevOps Cours Jenkins
DevOps Cours Jenkins
Intégration
Continue
History
▪ After a conflict (the use of the name Hudson by Oracle), in November 2010, proposal to
rename the project to Jenkins
▪ Jenkins supports the complete development life cycle of software from building, testing,
deploying the software.
▪ Jenkins is a feature Rich Application, which help organization in fast s/w delivery.
What is Jenkins
Solution not specific to Java projects. Ability to use Jenkins with many languages
(javascript, php, .net, c / c ++, swift ...)
What is Jenkins
▪ Automating Build Process saving the Delivery Time and reduce the Defects.
What is Jenkins
• Facilement extensible
• View & Folder: Are options in Jenkins used to regroup jobs by category depending on
what structure you want to work on.
• Extension & Plugin: are the primary means of enhancing the functionality of a Jenkins
environment to suit the user-specific needs. can be installed on jenkins to provides
multiple new fonctionnalities on (build tool, test tool, cloud providers, analyse tool..etc)
Jenkins Key Terminology
• Dashboard: is a simple and powerful place where we can manage all jobs and
therefore manage the application delivery pipeline as well
Jenkins Key Terminology
• Pipeline: is an automated expression of your process for getting software from version control
right through to your users and customers. enable you to define the whole jobs workflow based
on script written with DSL (domain-specific language)
Jenkins Key Terminology
Jenkins Dashboard
PROJECT VIEW
PROJECT VIEW
WORKSPACE
JOB/pipeline Creation ▪ A build start based on the trigger configuration
▪ Automated Deployment
JOB Creation
JOB Creation
2
JOB
Creation
• Environment variables
Source Code • Workspace cleaning
Trigger build Build envirenment
importation rules
• Configure output
• SCM Remote trigger results
which SCM ?
• Following another build
• Periodically build
• Periodically check on SCM
•
• Scripts Maven,
• Exporting repports gradle, ant
• Send of notifications Post-build actions Build Scripts
• Scripts shell, Ansible,
(Email, Slack..) Python..
• Deployment actions
JOB Trigger
VS
General
• Nombreuses extensions
Ex : Récupération des
branches / tags Git / SVN
• Définition de liste de
valeur, checkbox, saisie
manuelle
• Paramètres exploitable
dans les scripts de build
Source Code Management
Build Triggers
For all scheduling tasks, Jenkins uses a cron-style syntax, consisting of five fields separated by white space in the
following format:
MINUTE
Minutes within the hour (0–59)
HOUR
The hour of the day (0–23)
DOM
The day of the month (1–31)
MONTH
The month (1–12)
DOW
The day of the week (0–7) where 0 and 7 are Sunday.
There are also a few short-cuts:
“*” represents all possible values for a field. For example, “* * * * *” means “once a minute.”
You can define ranges using the “M–N” notation. For example “1-5” in the DOW field would mean “Monday to
Friday.”
You can use the slash notation to defined skips through a range. For example, “*/5” in the MINUTE field would
mean “every five minutes.”
A comma-separated list indicates a list of valid values. For example, “15,45” in the MINUTE field would mean “at 15
and 45 minutes past every hour.”
You can also use the shorthand values of “@yearly”, “@annually”, “@monthly”, “@weekly”, “@daily”,
“@midnight”, and “@hourly”
Build Environment
Access
Configuration /
Modification
Builds history
• Possibility to see the workspace
Status of TU by packages
/ by TU
Allows you to easily determine
problems during compilation and
correct
Statistiques par classes
LABS:
• lab1_jenkins.txt
• lab2_jenkins.txt
• lab3_jenkins.txt
• lab4_jenkins.txt