Cloud Services

DevOps Intelligence

GitHub Actions configuration
Published On Nov 05, 2024 - 1:34 PM

GitHub Actions configuration

Learn how to integrate GitHub Actions in DevOps Intelligence to enable insights into your Build and Deploy workflows.
GitHub Actions enables the automation of tasks and processes in their Build and Deploy workflows, providing insights into these phases of the DevOps lifecycle. Developers can define custom workflows using YAML syntax, which can be triggered by events such as code pushes, pull requests, or scheduled intervals. DevOps Intelligence captures all workflows in Github Actions and retrieves them.
This data is then processed and displayed in the form of graphs and tables on the Build and Deploy pages.

Integration of GitHub Actions in DevOps Intelligence

DevOps Intelligence pulls data from GitHub Actions such as Build and Deploy details, including its unique identifier, status, time stamp, duration, and cause. The process for onboarding GitHub actions comprises the following steps, each of which is a multistep procedure:
  1. Crate a Personal Access Token.
  2. Create a connection.
  3. Configure the application for two supported DevOps phases:
    1. Build
    2. Deploy
  4. Onboard the GitHub Actions technical service.

Create A Personal Access Token

Use the following procedure to create a Personal Access Token:
  1. Navigate to your GitHub homepage.
  2. Go to
    User settings
    Developer settings
    Personal Access Tokens
    Generate new token
    .
  3. Ensure the token has read permissions on the org/repo intended to sync.

Create a Connection

To pull data from GitHub Actions, you must establish a connection between DevOps Intelligence and GitHub Actions. Use the following procedure:
  1. Click on Settings
    Service IAM
    Connections
    Add New
    Add connection
    .
  2. Complete the form:
    1. For Content Provider, select GitHub.
    2. For Name, enter local account name for reference.
    3. For Name, enter local account name for reference.
    4. For Host Git API, enter the URL of the Git Host (e.g., https://github.test.net).
    5. For User, Populate this field with the same username that you use for your GitHub account.
    6. For User, Populate this field with the same username that you use for your GitHub account.
    7. For User, Populate this field with the same username that you use for your GitHub account.
    8. For Token, use the PAT token created in Create Token step.
    9. If you are using a Proxy Adapter to access DevOps Intelligence through an intermediary layer, Enter the UUID for the adapter in the Proxy ID field.
When Archive is enabled, the connection is archived for future use.

Configuring DevOps for GitHub Actions, recent customers

The procedures in this section are valid only for customers onboarded 6 June, 2024 or after. Procedures for legacy customers are provided in the subsequent section Configure DevOps Intelligence for GitHub, legacy customers.
DevOps Intelligence supports GitHub Actions for two DevOps phases:
  • Build
  • Deploy
Build
Use the following procedure to configure GitHub Actions for the Build phase:
  1. Click on Settings & Utilities
    Application Configuration
    .
  2. Navigate to the
    Add Tools
    step.
  3. Select the phase as
    Build
    .
  4. Press
    Add Tool Configuration
    .
  5. For
    Tool engine
    , select
    GitHub Actions
    .
  6. Complete the form for both tabs (Refer to
    Note
    directly following this list:
    1. Workflow Jobs
    2. Status
  7. Click
    Add Configuration
    .
  • Enable
    Workflow Jobs
    to builds from all workflow jobs irrespective of workflow job name.
  • Enable
    Workflow Job Names
    to enable job names for which build data is needed.
  • The
    Status
    data from the source is mapped to the specific categories as
    Passed
    ,
    Failed
    and
    In Progress
    .
Deploy
Use the following procedure to configure GitHub Actions for the Build phase:
  1. Click on Settings & Utilities
    Application Configuration
    .
  2. Navigate to the
    Add Tools
    step.
  3. Select the phase as
    Deploy
    .
  4. Press
    Add Tool Configuration
    .
  5. For
    Tool engine
    , select
    GitHub Actions
    .
  6. Complete the form for the three tabs (Refer to
    Note
    directly following this list:
    1. Release and Environment
    2. Status
    3. Incident mapping
  7. Click
    Add Configuration
    .
  • For
    Release and Environment
    :
    • Release Prefix signifies the starting sequence of characters for releases, with the default value being empty.
    • Release Variable signifies the starting sequence of characters for releases, with the default value being empty.
    • Environment Prefix signifies the starting sequence of characters for environment, with the default value being empty.
    • Environment Name environment name where your application is deployed.
    • Environment Field signifies the field from where environment name has to be picked from. Ex: env
    • Release Field signifies the field from where incident release name has to be picked from. Ex: env
    • Map your production environment signifies the environment used for production deployments.
    The tool configuration inherits the release prefix, variable & Environment prefix, name from the application. To override these values only for this configuration, click the Edit button and make the necessary changes. Please note that changing the values here will not impact the release prefix and variable set in the application.
  • The
    Status
    data from the source is mapped to the specific categories as
    Passed
    ,
    Failed
    and
    In Progress
    .
  • For
    Incident Mapping
    , the Host URL of Incident management tool used to monitor incidents if any arising out of application deployment issues. Ex. ServiceNow

Onboard the GitHub Actions technical service

You must now onboard the technical service. Use the following procedure:
  1. Navigate to DevOps Intelligence →
    Settings & Utilities
    Application Configurations
    .
  2. Click the overflow menu for the chosen application and click on
    Onboard Technical Service
    .
  3. Select the phase for which you want to configure
    GitHub Actions
    . The page displays only the phases for which this tools has been configured for the application.
  4. Select the tool engine as
    GitHub Actions
    .
  5. For
    Connection
    : Select the appropriate connection name from the drop down.
Select
Provider
only in the Deploy phase for the current deployment.
DevOps Intelligence supports the following types of GitHub tracking:
  • Organization
  • Repository
Organization Tracking
To track Organizational data, use the following procedure:
  1. Select Tracking Type
    Organization
    .
  2. Select the appropriate organization.
  3. Click
    Onboard
    to onboard the technical service.
Repository Tracking
To track Organizational data, use the following procedure:
  1. Select Tracking Type -
    Organization
    and
    Repository
    .
  2. Select the appropriate organization.
  3. Select the appropriate repository.
  4. Click
    Onboard
    to onboard the technical service.
For GitHub Enterprise accounts, if the administrator has set a limit on API calls, Devops Intelligence will optimize its process of fetching data and will execute approximately 1000 calls each hour. This is to make sure no other task using the credentials are hampered. Once the limit is exceeded DevOps Intelligence display a message on the GitHub
sync
page.

Deleting the GitHub Actions technical service

The administrator may, at will, delete the GitHub technical service. Use the following procedure:
  1. Navigate to DevOps Intelligence →
    Settings & Utilities
    Application Configurations.
  2. Expand the application to see all the associated phases.
  3. Click the Overflow menu associated with the phase (
    Build
    or
    Deploy
    ).
  4. Click
    Delete Technical Service
    . The service responds by displaying a form.
  5. Completed the form.
  6. For Tool engine, select GitHub Actions.
  7. Select the appropriate Organization.
  8. Select the appropriate repository.
  9. Click
    Delete
    at the bottom of the form.

Configuring DevOps Intelligence for GitHub Actions, legacy customers

The procedures in this section are valid only for customers onboarded before 6 June, 2024.
Use the following procedure to configure DevOps Intelligence for SonarQube:
  1. Navigate to
    DevOps Intelligence
    Settings & Utilities
    Tools Configuration
    Add Configuration
    .
  2. Select GitHub Actions as the
    Tool Engine
    .
  3. Under
    Connection
    , select the appropriate connection name.
  4. Select the project and metrics you want to track in DevOps Intelligence.
Additional configurations are provided to manage the status, including
Passed
,
Failed
and
In Progress
.
Do you have two minutes for a quick survey?
Take Survey