Jenkins

Autom Mate and Jenkins Guide

Introduction

Explore the integration between Auto Mate and Jenkins, detailing the available actions in Auto Mate for interacting with Jenkins functionalities.

This document delves into the seamless integration between Auto Mate, a powerful workflow automation platform, and Jenkins, an open-source automation server used for continuous integration and continuous delivery (CI/CD) to build, test, and deploy software projects. It provides insights into the actions within Auto Mate that empower users to interact with the diverse functionalities offered by Jenkins.

What is Jenkins?

Jenkins is an open-source automation server that helps automate the parts of software development related to building, testing, and deploying, facilitating continuous integration and continuous delivery (CI/CD). Here are its key features:

  • Plugin Ecosystem: Jenkins can be extended through a vast array of plugins to support building, deploying, and automating any project.

  • Scalable Build Distribution: Jenkins supports distributed builds, allowing multiple machines to run build jobs, speeding up the process.

  • Version Control Integration: Jenkins integrates with numerous version control systems like Git, SVN, and Mercurial to automatically trigger builds on code changes.

  • Automated Notifications and Reporting: Jenkins can send build notifications and reports via email, Slack, and other channels, keeping teams informed of build statuses and results.

Autom Mate Integration with Jenkins

With the help of Autom Mate, you can trigger your jobs seamlessly. While triggering the job you can make them wait for an approval or send the new codes to the test before they got migrated.

Using the Integration

Credentials

To use Jenkins actions in Autom Mate, you need to create credentials. Follow these steps:

  1. Access Vault Page:

    • Navigate to the Vault page under the Management section in the left side menu.

  2. Application Credentials:

    • Ensure you are on the Application Credentials tab on the left side.

    • Search for Jenkins using the filter or manually.

    • Alternatively, click on the "New App Credentials" button at the top left side of the window to create new credentials.

  1. Provide Credentials:

    • Connector Name: Unique name for the connector.

    • Authentication Type: Choose the method you want to connect.

    • URL: URL of the Jenkins instance.

    • Username: Username of the user which will do the API Calls.

    • API Token: The API Token of the user provided above.

  2. Connect Credentials:

    • After filling the fields, press on "Test Connect". This option will try to send a API call to "{jenkins_url}/user/{username}/api/json" to see if the credentials are working. If you get a success response you can press to the "Connect & Create" button to save the credential.

How To Use Actions

Trigger Job

Description: This action will trigger a job that you have in your Jenkins instance.

Purpose: To trigger a job in a automated environment after doing some prechecks.

Usage: To trigger a job, provide the following input parameters.

  • Job (Required): Choose the correct job you want to trigger from the drop-down list.

Action Result: The job you choose will be triggered.


View Jobs

Description: This action will fetch all the jobs in the provided Jenkins instance.

Purpose: To fetch all the jobs.

Usage: There is no input field available for this action.

Action Result: It will bring all the jobs in a json body. For example:

{
    "_class": "hudson.model.Hudson",
    "jobs": [
        {
            "_class": "org.jenkinsci.plugins.workflow.job.WorkflowJob",
            "name": "Mail Test",
            "url": "http://localhost:8443/job/Mail%20Test/",
            "color": "red"
        },
        {
            "_class": "org.jenkinsci.plugins.workflow.job.WorkflowJob",
            "name": "Test item",
            "url": "http://localhost:8443/job/Test%20item/",
            "color": "notbuilt"
        }
    ]
}

Last updated