Jenkins End To End
Jenkins End To End
9448431435
[email protected]
JENKINS
Jenkins is a free and open source automation server. Jenkins helps to automate the non-human part of the software development process, with continuous
integration and facilitating technical aspects of continuous delivery. It is a server-based system that runs in servlet containers such as Apache Tomcat. It
supports version control tools, including AccuRev, CVS, Subversion, Git, Mercurial, Perforce, TD/OMS, ClearCase and RTC, and can execute Apache Ant, Apache
Maven and sbt based projects as well as arbitrary shell scripts and Windows batch commands. The creator of Jenkins is Kohsuke Kawaguchi.[4] Released under
the MIT License, Jenkins is free software.[5]
Builds can be triggered by various means, for example by commit in a version control system, by scheduling via a cron-like mechanism and by requesting a
specific build URL. It can also be triggered after the other builds in the queue have completed. Jenkins functionality can be extended with plugins.
The Jenkins project was originally named Hudson, and was renamed after a dispute with Oracle, which had forked the project and claimed rights to the project
name. The Oracle fork, Hudson, continued to be developed for a time before being donated to the Eclipse Foundation. Oracle's Hudson is no longer maintained[6]
[7] and was announced as obsolete in February 2017. [8]
Installation jenkins on n
What is Automation ?
Pre-Requisites of jenkins
Java
Method1:
Jenkins Download in windows
Google: jenkins download
Link : https://jenkins.io/download/
Path: C:\Program Files (x86)\Jenkins
DefaultPort: localhost:8080
JENKINS:
CI/CD Part
NRUSHIKESH
9448431435
[email protected]
Continuous integration
Developers practicing continuous integration merge their changes back to the main branch as often as possible. The developer's changes
are validated by creating a build and running automated tests against the build. By doing so, you avoid the integration hell that usually
happens when people wait for release day to merge their changes into the release branch.
Continuous integration puts a great emphasis on testing automation to check that the application is not broken whenever new commits
are integrated into the main branch.
Continuous delivery
Continuous delivery is an extension of continuous integration to make sure that you can release new changes to your customers quickly
in a sustainable way. This means that on top of having automated your testing, you also have automated your release process and you
can deploy your application at any point of time by clicking on a button.
In theory, with continuous delivery, you can decide to release daily, weekly, fortnightly, or whatever suits your business requirements.
However, if you truly want to get the benefits of continuous delivery, you should deploy to production as early as possible to make sure
that you release small batches that are easy to troubleshoot in case of a problem.
Continuous deployment
Continuous deployment goes one step further than continuous delivery. With this practice, every change that passes all stages of your
production pipeline is released to your customers. There's no human intervention, and only a failed test will prevent a new change to be
deployed to production.
Continuous deployment is an excellent way to accelerate the feedback loop with your customers and take pressure off the team as there
isn't a Release Day anymore. Developers can focus on building software, and they see their work go live minutes after they've finished
working on it.
Pre-req :java
Install java:
Install maven:
Install git
https://www.digitalocean.com/community/tutorials/how-to-install-jenkins-on-ubuntu-18-04
sudo vi /etc/default/jenkins
General :
>Discard old builds - deleting old builds
Build Triggers:
>Trigger builds remotely (e.g., from scripts)
Authentication Token = Rushi123
Sampletoken : JENKINS_URL/job/job10/build?token=TOKEN_NAME
http://localhost:9090/job/job10/build?token=Rushi123
NRUSHIKESH
9448431435
[email protected]
Build after other projects are built:
Dependency jobs:create a multiple jobs and configure dependency jobs
Build Peridocally:
day
PollSCM:
*****
Webhooks:
Build Environment
Build
--> Execute windows batch command
( for executing windows commands)
Post Build
NRUSHIKESH
9448431435
[email protected]
Email Notification
Outlook
SMTP server - smtp.outlook365.com
suffix - @accenture.com
click ssl
gmail SMTP port - 587
_______________________-
Plugins Used:
Myview
Deploy to container
Role based Authorization stratergy
Discard old builds
Webhooks
Add timestamps to the Console Output
Deploy to container
Email notification
Editable Email notification