top of page

Jenkins Assignment

Jenkins Day -1

### Topic 1: Set Up Jenkins on an EC2 Instance (Amazon Linux 2)

### Topic 2: Check the Jenkins Port.

### Topic 3: Add the Port to Security Group.

### Topic 4: Check the Home Directory.

### Topic 5: Post-Install Task.

### Topic 6: Create a Freestyle Job.

### Topic 7: Find the Workspace Location.

### Topic 8: Check the Console Output.

### TOPIC 9: Procedure to Change Jenkins Port to 8081.

#### TOPIC 10: Create Users in Jenkins.

#### TOPIC 11: Configure Matrix-Based Authorization.

#### TOPIC 12: Project for practicing matrix-based authorization for a regular user.

Jenkins-Day-2

### Project Scenario: Configuring Jenkins with Role-Based Authorization with Global Roles and Validating with a Sample Job

  1. Install Required Plugins

  2. Configure Role-Based Authorization Strategy with Global Roles

  3. Create Users and Assign Global Roles

  4. Create a Sample Project and Job

  5. Validation

 

### Project Scenario: Creating and Assigning Item Roles in Jenkins with a Validation Job

  1. Set Up Jenkins and Enable Role-Based Authorization

  2. Create Users

  3. Install the Role-Based Authorization Strategy Plugin (If Not Already Installed)

  4. Create and Define Item Roles

  5. Create a Sample Project and Job

  6. Assign Users to Item Roles

  7. Validation


 

### Project Scenario: Configuring Jenkins with Project-Based Matrix Authorization Strategy and Build Triggers

  1. Set Up Jenkins and Enable Project-Based Matrix Authorization Strategy

  2. Create Users

  3. Create a New Project

  4. Configure a Sample Job with Build Triggers

  5. Validation

 

### Project Scenario: Configuring Jenkins with Poll SCM Build Triggers

  1. Set Up Jenkins Project

  2. Configure Source Code Management (SCM)

  3. Set Up Poll SCM Build Trigger

  4. Add a Build Step

  5. Save and Build

 

### Difference between poll SCM and Webhook


 

### Project Scenario: Configuring Jenkins with Webhook Build Triggers

  1. Set Up Jenkins Project

  2. Configure Source Code Management (SCM)

  3. Set Up Webhook in GitHub

  4. Add a Build Step

  5. Validate Webhook Configuration

Jenkins-Day-3

### Project: Installing Maven with YUM, Compatible Java Version, and Configuring JAVA_HOME on Amazon Linux

  1. Install a Compatible Java Version

  2. Install Apache Maven Using YUM

  3. Configure the JAVA_HOME Environment Variable


 

### Simple Project: Cloning a GitHub Repository, Compiling, Unit Testing, and Packaging on Amazon Linux

  1. Launch and Access the EC2 Instance

  2. Install Required Tools

  3. Clone the GitHub Repository

  4. Compile the Project

  5. Run Unit Tests

  6. Package the Application

  7. Verify the Process

  8. Clean Up (Optional)

 

### Simple Project: Configuring a Freestyle Job to Compile Java Code from GitHub with Automatic Maven Installer and Manually Set Java Path on Jenkins GUI

  1. Configure Jenkins for Java and Maven

  2. Create and Configure the Jenkins Freestyle Job

  3. Build and Validate the Job

Jenkins-Day-4

### Project: Running Maven Tests and Validation on Jenkins GUI

  1. Create a New Jenkins Freestyle Project

  2. Configure Source Code Management

  3. Add Maven as a Build Tool

  4. Configure Java Path Manually

  5. Save and Run the Job

  6. Validate Test Results

 

### Project: Installing Jenkins JUnit Plugin and Publishing Test Reports

  1. Install the JUnit Plugin

  2. Create a New Jenkins Freestyle Project

  3. Configure Source Code Management

  4. Add a Build Step to Run Maven Tests

  5. Configure Post-Build Action to Publish JUnit Test Results

  6. Save and Run the Job

  7. Validate the Published Test Reports

 

### Project: Configuring Maven Package Goal in Jenkins GUI with Validation

  1. Create a New Jenkins Freestyle Project

  2. Configure Source Code Management

  3. Add a Build Step to Run Maven Package

  4. Save and Run the Job

  5. Validate the Package Output

  6. Inspect the Build Logs

 

### Project: Configuring Jenkins with Build Pipeline Plugin, Build Triggers, and Post-Build Actions for Compile, Unit Test, and Package

  1. Install the Build Pipeline Plugin

  2. Create a New Jenkins Freestyle Project

  3. Configure Source Code Management

  4. Add a Build Trigger

  5. Add a Build Step to Compile the Code

  6. Add a Build Step to Run Unit Tests

  7. Add a Build Step to Package the Application

  8. Add a Post-Build Action to Publish Test Results

  9. Save and Run the Job

  10. Validate the Build Outputs

  11. Create a New Build Pipeline View

  12. Inspect the Pipeline and Validate


 

### Project: Password-less SSH Configuration Between Master and Slave

  1. Switch to Root User on Both Servers

  2. Create `user1` on Both Master and Slave Servers

  3. Set Password for `user1` on Both Servers

  4. Enable `PasswordAuthentication` on Slave Server

  5. Generate SSH Key Pair for `user1` on Master Server

  6. Copy the SSH Public Key to the Slave Server

  7. Test SSH Connection from Master to Slave for `user1`


 

### Project: Prepare and Add Node as Jenkins Slave with Configuration

  1. Install Git

  2. Install Java

  3. Set JAVA_HOME Directory

  4. Install Maven

  5. Add a New Node to Jenkins Master

  6. Validation


 

### Project: Add a Job on Jenkins Slave Node (Label: `slave-node`) to Run Maven Compile Job Without Poll SCM

  1. Add a New Maven Compile Job on Jenkins

  2. Configure Source Code Management

  3. Configure Build Step for Maven Compilation

  4. Save the Job

  5. Manually Trigger and Validate the Maven Compile Job

  6. Validate Execution on Slave Node

Jenkins-Day-5

### Project: Configuring Pipeline as Code in Jenkins GUI

  1. Search for Pipeline Plugin

  2. Install Plugin: Pipeline Multibranch & Pipeline stage View

  3. Create a Job with Pipeline Type

  4. Create a Pipeline Script

  5. Run the Pipeline Job

  6. Validate the Pipeline Execution


 

### Project: Jenkins Pipeline with "Pipeline Script from SCM"

  1. Create a New Jenkins Pipeline Job

  2. Configure the Pipeline to Use "Pipeline Script from SCM"

  3. Set Up GitHub Repository Details

  4. Configure the Branch and Jenkinsfile Path

  5. Configure Build Triggers (Optional)

  6. Save the Job

  7. Run the Pipeline Job

  8. Validate the Pipeline Execution


 

### Project: Jenkins Pipeline with Git Branch and Parameters

  1. Create a New Git Branch (`feature/devops_1`)

  2. Create the Jenkinsfile with 3 Stages and Parameters

  3. Push the Changes to GitHub (`feature/devops_1`)

  4. Create a New Jenkins Pipeline with "Pipeline Script from SCM"

  5. Build the Pipeline

  6. Validate the Build Stages


 

###line-by-line explanation of the code from the `Jenkinsfile`:


 

project outline for creating a Jenkins pipeline that uses "Pipeline script from SCM" with conditions based on selected environments:


### Project: Environment-Based Jenkins Pipeline

  1. Create a Git Repository:

  2. Create a Jenkinsfile:

  3. Push the Jenkinsfile to GitHub:

  4. Create a New Pipeline Job in Jenkins:

  5. Configure the Pipeline Job:

  6. Run the Job:

  7. Validate the Output:


 

### create a Jenkins pipeline with "pipeline script from SCM" using "when" and "input" directives. The pipeline will ask for input to choose between Production, Development, or Test environments and display a corresponding message for the selected environment.


  1. Create a Git Branch & Clone Repository

  2. Create a Jenkinsfile

  3. Push Jenkinsfile to GitHub

  4. Create Jenkins Pipeline Job Using "Pipeline Script from SCM"

  5. Run the Pipeline

  6. Validate the Output


 

###Explanation of each line of the provided Jenkins pipeline script

bottom of page