Kubernetes Plugin:

The Kubernetes Plugin for Jenkins allows seamless integration with Kubernetes clusters, enabling dynamic agent provisioning and scaling based on workload. It enhances Jenkins’ ability to run jobs on Kubernetes containers.

Steps to setup kubernetes plugin:

  • Install Jenkins:

    • Follow installation instructions.

  • Install Kubernetes Plugin:

    • Jenkins Dashboard > Manage Jenkins > Manage Plugins > Available
    • Install Kubernetes Continuous Deploy plugin.

  • Configure Kubernetes Cloud:

    cloud('my-k8s') {
    // Set Kubernetes URL and credentials
    kubernetes {
    // Configure connection details
    }
    podTemplate {
    // Configure pod template with container details
    }
    }

  • Configure Jenkins Job:

    • Enable Kubernetes in the job configuration.
    configure {
    it / 'buildWrappers' << 'io.fabric8.jenkins.openshift.OpenShiftBuildWrapper' {
    cloud('my-k8s') {
    containerTemplate {
    // Specify container details
    }
    }
    }
    }

  • Define Kubernetes Pod Steps:

    • Add build steps or post-build steps in the job configuration.
    stage('Deploy to K8s') {
    steps {
    // Use kubectl or other tools to interact with K8s
    sh 'kubectl apply -f my-deployment.yaml'
    }
    }

  • Save and Run the Job:

    • Save the job configuration and trigger the build.

  • Review Logs and Output:

    • Check the console output for build logs. 

Blue Ocean Plugin:

The Blue Ocean Plugin provides a modern, user-friendly interface for Jenkins. It offers visualizations of pipeline runs, making it easier to understand and navigate complex build processes.

Steps to configure blue ocean plugin:

  1. Install Plugin:

    • Go to Jenkins > Manage Jenkins > Manage Plugins.
    • Install Blue Ocean plugin.
  2. Restart Jenkins:

    • Restart Jenkins after plugin installation.
  3. Access Blue Ocean:

    • Click “+” > Open Blue Ocean.
  4. Create/Select Pipeline:

    • Create a new pipeline or choose an existing one.
  5. Connect Version Control:

    • Select your VCS (Git, GitHub, etc.).
    • Connect repository with credentials.
  6. Configure Pipeline:

    • Review and modify pipeline config if needed.
  7. Run Pipeline:

    • Click “Run” to execute the pipeline.
  8. Explore Features:

    • Explore Blue Ocean’s visual interface and features.

Amazon EC2 Plugin:

The Amazon EC2 Plugin allows Jenkins to dynamically provision EC2 instances as build agents. It enables scalable and cost-effective build environments on Amazon Web Services (AWS).

Steps to configure Amazon EC2 plugin:

  1. Install Plugin:

    • In Jenkins, go to Manage Jenkins > Manage Plugins.
    • Install “Amazon EC2” plugin.
  2. Configure AWS Credentials:

    • In Jenkins, navigate to Manage Jenkins > Manage Credentials.
    • Add AWS credentials (Access Key ID and Secret Access Key).
  3. Configure EC2 Cloud:

    • Go to Manage Jenkins > Configure System.
    • Find “Amazon EC2” section, add a new cloud.
    • Enter AWS credentials, region, and AMI ID.
  4. Set Up Key Pair:

    • In EC2 section, set up Key Pair for SSH access.
  5. Define AMI Templates:

    • Configure AMI templates with instance type, security groups, and key pair.
  6. Save Configuration:

    • Save all configurations.
  7. Launch Agent:

    • Create a new job or configure an existing one.
    • Specify EC2 label in the job configuration.
    • Run the job to launch EC2 instances dynamically.

Git Plugin:

The Git Plugin integrates Jenkins with Git repositories, facilitating source code management and version control. It allows Jenkins to clone, fetch, and push changes to and from Git repositories.

Steps to configure Git plugin:

  1. Install Git Plugin:

    • Open Jenkins and navigate to “Manage Jenkins” > “Manage Plugins” > “Available” tab.
    • Search for “Git” in the filter box.
    • Check the box next to “Git” and click “Install without restart.”
  2. Configure Global Git Settings:

    • Go to “Manage Jenkins” > “Configure System.”
    • Scroll down to the “Git” section.
    • Set the path to the Git executable (if not in the system PATH).
  3. Create or Configure Jenkins Job:

    • Create a new Jenkins job or open an existing one.
  4. Configure Source Code Management:

    • In the job configuration, find the “Source Code Management” section.
    • Select “Git” as the version control system.
  5. Provide Repository URL:

    • Enter the URL of your Git repository in the “Repository URL” field.
  6. Specify Branches to Build:

    • In the “Branches to build” or “Branch Specifier” field, specify the branch or branches you want to build.
  7. Set Up Additional Git Options (Optional):

    • You can set up additional options such as credentials, submodules, clean before checkout, etc., based on your project needs.
  8. Save the Configuration:

    • Save the Jenkins job configuration.
  9. Run the Job:

  • Trigger a build of the Jenkins job to test the Git integration.

Jira Plugin:

The Jira Plugin for Jenkins enables better integration with Jira, allowing developers to associate Jira issues with builds. It streamlines tracking and reporting on the status of Jira issues within the Jenkins environment.

Steps to configure Jira plugin:

  1. Install Jira Plugin:

    • Open Jenkins and navigate to “Manage Jenkins” > “Manage Plugins” > “Available” tab.
    • Search for “Jira” in the filter box.
    • Check the box next to “Jira” and click “Install without restart.”


  2. Configure Jira Integration:

    • Go to “Manage Jenkins” > “Configure System.”
    • Scroll down to the “Jira Software Cloud” or “Jira Software Server” section, depending on your Jira instance type.

  3. Jira Server Configuration (Example):

    import hudson.plugins.jira.*
    jiraSite('My Jira Server') {
    serverUrl('https://your-jira-server-url')
    userName('your-jira-username')
    password('your-jira-api-token-or-password')
    projectKey('your-jira-project-key')
    issueType('Bug') // Set the default issue type
    field('customfield_123', 'some value') // Set custom fields if needed
  4. Jira Cloud Configuration (Example):

    import hudson.plugins.jira.*
    jiraSite('My Jira Cloud') {
    site('https://your-jira-cloud-instance.atlassian.net')
    userName('your-jira-cloud-username')
    password('your-jira-cloud-api-token')
    projectKey('your-jira-project-key')
    issueType('Bug') // Set the default issue type
    field('customfield_123', 'some value') // Set custom fields if needed
    }
  5. Configure Jenkins Job:

    • Create or open a Jenkins job.
    • In the job configuration, find the “Post-build Actions” section.
    • Add “Update relevant Jira issues” or other Jira-related actions.


  6. Specify Jira Site and Issue Key (Example):

    jiraUpdate('My Jira Server') {
    issueKeys('JIRA-123') // Specify the Jira issue key
    transition('In Progress') // Transition the issue to a specific status
    comment('This is an automated comment.') // Add a comment if needed
    }
  7. Save the Configuration:

    • Save the Jenkins job configuration.


  8. Run the Job:

    • Trigger a build of the Jenkins job to test the Jira integration.