Documente Academic
Documente Profesional
Documente Cultură
1. INTRODUCTION ...................................................................................................................................... 3
WHAT IS JENKINS?.................................................................................................................................................... 3
2. INSTALLATION AND SETUP ..................................................................................................................... 4
DOWNLOAD JENKINS................................................................................................................................................. 4
3. CREATING NEW ITEM ............................................................................................................................ 5
4. USERS ..................................................................................................................................................... 7
4.1. CREATING A USER ........................................................................................................................................ 7
4.2. CONFIGURING USERS ................................................................................................................................... 8
4.3. CONFIGURING ROLES AND STRATEGIES ............................................................................................................ 9
4.3.1. Downloading Role based Authorization plugin ................................................................................ 9
4.3.2. Managing Jenkins-Configuring global security................................................................................. 9
4.3.3. Assigning Roles ................................................................................................................................. 9
5. MANAGE JENKINS ................................................................................................................................. 11
5.1. CONFIGURING SYSTEMS .................................................................................................................................... 11
1. INTRODUCTION
WHAT IS JENKINS?
Jenkins is a self-contained, open source automation server which can be used to automate
all sorts of tasks related to building, testing, and delivering or deploying software.
Jenkins can be installed through native system packages, Docker, or even run standalone by
any machine with a Java Runtime Environment (JRE) installed.
2. INSTALLATION AND SETUP
DOWNLOAD JENKINS
The official website for Jenkins is https://jenkins-ci.org/. If you click the given link,
you can get the Jenkins.msi
By default Jenkins will be installed in the port 8080.
Once Jenkins is up and running, one can access Jenkins from the link –
http://localhost:8080
You can just install the file like exe file and follow the instructions given to create a
password.
Go to this location in your pc
C:\ProgramFiles(x86)\Jenkins\secrets\initialAdminPassword
This link will bring up the Jenkins dashboard.
To initialize jenkins from command prompt go to the folder where jenkins.war is present
and open command prompt and type java –jar jenkins.war
Then go to project and click on configure and in general section click on advanced select use
custom workspace and give the path of your project.
Go to build section and click on build step and select execute windows batch command.
One window will be opened there you give your batch file name. and click on apply and
save.
Now go back to project and click on build now.(make sure you have a created a batch file in
your project location).
When you click on build now it will execute the build based on the testng.xml.
Now click on the build which is executed and go to console output for the detailed report.
4. USERS
4.1. CREATING A USER
1. Login to jenkins as admin.
2. Click on Manage jenkins on the LHS
3. Click on configure
4. Here we can change the full name, password, get the API token and add a
description.
4.3. CONFIGURING ROLES AND STRATEGIES
To create a role Enter the name of the role in Role to add tab and click on add button
The role will be added to the global roles. We can give the overall read and view permissions.
Project Roles: We can create roles specific to the project.
For example Developer.
Dev.* means a person having a role of Developer should be able to access the projects starting
with Dev. He will not be able to access any other projects.
To add assign roles to users go to manage jenkins->Manage and Assign Roles-> Assign Roles
In assign roles we have Global Roles, Item Roles and Node roles.
Now add User1 and User2 to global roles. Both of them are employees so we assign the role of
employee.
Coming to Item roles, add both user1 and User2 to Item roles.
User1 is developer so we assign role of developer.
User2 is tester so we assign role of tester.
And click on apply and then save.