Q2 - Ronak-Ronu/73772127142-Devops-Assignment-1 GitHub Wiki

A Pipeline project with the following details using Jenkins.

Running jenkins in ubuntu

 sudo systemctl start jenkins 

Screenshot from 2024-02-11 23-23-37


Checking status of jenkins.

sudo systemctl status jenkins

Screenshot from 2024-02-11 23-24-07

  1. visit http://localhost:8080/ to sign in. Screenshot from 2024-02-11 23-24-36

Create a New Pipeline Project

Click on "New Item" and select pipeline

Screenshot from 2024-02-11 23-26-29


Pipeline script

In the pipeline configuration, select "Pipeline script" and write a script.

pipeline {
    agent any
    stages {
        stage('Student Details stage') {
            steps {
                script {
                    def registerNumber = '73772127142'
                    def name = 'Ronak Suthar B'
                    def department = 'Computer Science and Business System'
                    def year = 'Pre-Final Year'
                    def specialization = 'Python | Full-Stack Development'
                    
                    echo "Register Number: ${registerNumber}"
                    echo "Name: ${name}"
                    echo "Department: ${department}"
                    echo "Year: ${year}"
                    echo "Area of Specialization: ${specialization}"
                }
            }
        }
    }
}

Screenshot from 2024-02-11 23-32-19


Save the Pipeline

Save your pipeline configuration.

Screenshot from 2024-02-11 23-32-42


Run the Pipeline

Click on "Build Now" to run the pipeline.

Screenshot from 2024-02-11 23-32-50


The Output

click on the build number to view the console output.

Screenshot from 2024-02-11 23-33-10