Jenkins Automation
Jenkins Automation
LogicOps Lab
Roadmap - Phase #1
Course Overview
What is Git?
Download and install
What is GitHub?
Account creation on GitHub
Basic commands to learn
Why do we need GitHub in this course?
Git
Git is the most widely used modern version control
system in the world
Git was originally developed by Linus Torvalds
Git is an example of a DVCS (Distributed Version
Control System)
In addition to being distributed, Git has been designed
with performance, security and flexibility in mind.
GitHub
The scripted pipeline is a traditional way of writing the Jenkins pipeline as code. Ideally, Scripted
pipeline is written in Jenkins file on web UI of Jenkins.
Unlike Declarative pipeline, the scripted pipeline strictly uses groovy based syntax. Since this, the
scripted pipeline provides huge control over the script and can manipulate the flow of script extensively.
Declarative Pipeline is a relatively recent addition to Jenkins Pipeline which presents a more simplified
and opinionated syntax on top of the Pipeline sub-systems.
Declarative Pipeline encourages a declarative programming model, whereas Scripted Pipelines follow a
more imperative programming model.
Declarative type imposes limitations to the user with a more strict and pre-defined structure, which
would be ideal for simpler continuous delivery pipelines.
Scripted type has very few limitations that to with respect to structure and syntax that tend to be defined
by Groovy, thus making it ideal for users with more complex requirements.
Syntax : Declarative Pipeline
pipeline {
agent any
stages {
stage('First') {
steps {
echo "This is 1st stage"
}
}
stage('Second') {
steps {
echo "This is 2nd stage"
}
}
}
}
JFrog Artifactory
Why an artifactory?
Artifact - An artifact is any software asset that is connected to or part of a software project.
Management - These artifacts need to be stored and shared with all the developers on that project.
Quality, Consistency, and Accountability - All the artifacts need to be consistently managed, versioned,
and deployed across development teams and sometimes across multiple sites, to ensure quality, reliability
and auditability.
JFrog Integration with Jenkins
Once build is completed the artefact that you created will be sent to JFrog
a) Can be configured to only do this (usage) for the branch of your choice.
b) Branch can change depending on your workflow.
SonarQube & Integration with Jenkins
(Part 1/2)
What is SonarQube?
Why SonarQube?
Why SonarQube?
Sustainability
Increase productivity
Quality code
Detect Errors
Increase consistency
Business scaling
Enhance developer skills
SonarQube & Integration with Jenkins
(Part 2/2)
Plugin installation.
Plugin configuration.
What is Slack?
Why Slack?
Free or Paid?
Jenkins – Master Slave :
Concept & Architecture