Professional Documents
Culture Documents
Jenkins Notes
Jenkins Notes
-------------
1) in jenkins we are creating jenkins jobs. that jobs are different types sometimes
i can create build job, sometimes i will create deployment job, sometimes will
create pipelines job.
to create the jenkins job we require new item option
Manage jenkins:
-----------
here any configurations setup will do it from manage jenkins. here we will install
the plugins, will create the credentials, will add the users.
Job:-
----------
In jenkins to perform any task we are creating the job. In job we have two types,
1. build job
2. deployment job
in job we have two stages
1. prebuild
2. postbuild
Prebuild:
-----------
Prebuild is nothing but before package is creating here we have below stages,
1. Git
2. Maven
3. Sonarqube
4. docker
Postbuild:
------------
In postbuild once the package is created we can use that package to deployment. we
have below stages for post build,
1. artifactory (Nexus) or registry
2. ansible
3. Kubernetes
How many ways you have to automate the build process in jenkins server?
in jenkins we have 3ways to automate the build process
1. pollscm
2. build periodically
3. git webhook
Git webhook: when the new commit happened into github repository automatically
build will be execute in jenkins.
the main difference between pollscm and git webhook is pollscm will work using the
timer but interms of git webhook by the time new commit happen git will be
executing the code.
The main difference between pollscm and git webhook is in pollscm we have waiting
period, but interms of git webhook there is no waiting period by the time when the
new commit happen immediately build will be triggered thats why most of the cases
developer will enable git webhook option.
Jenkins Plugins or have you installed any plugins for your current project. If yes
can you please tell me what are the list of plugins which you have installed?
---------------
1. version number plugin
*2. job import plugin
3. ansible plugin
*4. thin backup plugin
5. ssh plugin
*6. Role-based authorization strategy plugin
*7. kubernetes plugin
*8. job import plugin
*9. SonarQube scanner plugin
*10. Terraform plugin
11. Docker build and publish plugin
12. copy artifact plugin
Plugin:-
-----
In jenkins plugins we are using for adding the new functionality into existing
dashboard. In jenkin when ever we want to add new feature then will install the
plugin.
Ansible:
----------
configuration management tools:
Puppet workflow:-
----------------
In Ansible we have host server. In host server we have to install the ansible
packages. once we install the ansible packages we will get default location on
ansible host server.
The default location of ansible is /etc/ansible. In default location we have
hostsfile, roles, ansible.cfg .
Note-1:- when i want to install package in ansible host server below is the syntax
---
- hosts:
Ansible Modules:
-----------------
In ansible when we writing the task we require ansible modules. using the ansible
modules we are performing the task. each module have seperate functionality.
list of modules
yum
shell
copy
move
pip
helm
pip3
boto
boto3
linenin file
block
with_items
url_get
Ansible playbook structure:-
------------------------------
---
hosts:localhost
remote_user:centos
tasks:
-name:install the java package
yum:
-java
Playbook:-
------------
Playbook is nothing but collection of tasks. Here we are going to create multiple
tasks. each task having different different modules using the module we are going
to deploy the package