DevOps/Cloud By GK
  • DevOps/Cloud Introduction
  • 🚩AWS
    • Create AWS Account
    • Launch EC2 Instance
  • 🚩Linux
    • User Managment
      • Adding the User to Sudo group
      • visudo
    • Directory / File Management
      • Vi
      • Changing Permissions (chmod)
      • Filtering IO/File
    • Memory Management
    • Process Management
    • Network Management
    • Service Management
    • Environmental Variables
      • $PATH
    • Utilities
    • SHELL PROGRAMMING
      • Hello World
      • Variables
      • Command Line arguments
      • Conditional Statements
      • Array
      • Loops
      • Functions
      • AWK
      • sed
      • Example Useful Scripts
      • Basic -> Advanced
  • 🚩git
    • Introduction
    • Creating GitHub Account
    • Installation
      • Git Bash In Windows
      • Git In VS Code
      • Git In Eclipse
      • Git CLI in Linux
  • Creating Git Remote Repository
  • Git Commands L -> R
  • Git Commands L <- R
  • Git Branch Commands
  • Using SSH (Password Less)
  • 🚩maven
    • Introduction
    • Installation
    • POM.xml
    • Goals
  • 🚩SonarQube
    • Introduction
    • Sonar Cloud
    • Creating Project In SonarCloud
    • Installing Sonar-Scanner
    • Triggering Scan
  • 🚩Nexus
    • Introduction
    • Installation of Nexus
    • Creating Repository
    • Uploading Artifacts to Repository
  • 🚩Jenkins
    • Introduction
    • Installation of Jenkins
    • First Job In Jenkins
    • Git + Jenkins
      • WebHook
    • Maven + Jenkins
    • Sonar-Scanner + Jenkins
    • Nexus + Jenkins
Powered by GitBook
On this page
  1. Jenkins

Git + Jenkins

To integrate Git with Jenkins, follow these steps:

  1. Install the Git plugin:

    • Access the Jenkins web interface.

    • Click on "Manage Jenkins" in the left-hand side menu.

    • Select "Manage Plugins" from the dropdown.

    • Navigate to the "Available" tab.

    • Search for "Git" in the filter box.

    • Check the box next to "Git Plugin".

    • Click on the "Install without restart" button.

  2. Configure global Git settings:

    • Go back to the Jenkins dashboard.

    • Click on "Manage Jenkins" in the left-hand side menu.

    • Select "Global Tool Configuration" from the dropdown.

    • Scroll down to the "Git" section.

    • Click on "Git installations...".

    • Click on the "Add Git" button.

    • Provide a name for the Git installation (e.g., "Default Git").

    • Specify the path to the Git executable (e.g., "git").

    • Click on the "Save" button.

  3. Create a new Jenkins job:

    • On the Jenkins dashboard, click on "New Item" on the left-hand side.

    • Enter a name for your job and select "Freestyle project".

    • Click "OK" to proceed.

  4. Configure the job:

    • Source Code Management: In the job configuration page, under the "Source Code Management" section, select "Git".

    • Repository URL: Enter the URL of your Git repository.

    • Credentials: If your repository requires authentication, click on the "Add" button to add your Git credentials.

    • Branches to build: Specify the branch you want Jenkins to build (e.g., */master).

    • Additional Git options: Add any additional Git options, such as submodules or shallow clone settings.

    • Save the job configuration.

  5. Build the job:

    • On the Jenkins dashboard, click on the job name to navigate to its details page.

    • Click on "Build Now" to trigger the build.

Jenkins will now clone the Git repository specified in the job configuration, and you can perform various build steps and actions on the source code. You can configure additional build steps, such as running tests, building artifacts, or deploying the application.

PreviousFirst Job In JenkinsNextWebHook

Last updated 2 years ago

🚩