Skip to main content

Installing Drift Detection

note

Pipelines Drift Detection is exclusively available to DevOps Foundations Enterprise customers.

For new pipelines repositories using the latest version of Pipelines, Drift Detection is installed automatically and requires no additional action.

To upgrade an existing repository and enable Drift Detection, follow these steps:

Step 1 - Ensure the GitHub App is installed

Verify that the GitHub App is installed and in use for this repository. Drift Detection relies on permissions granted by the GitHub App and is not compatible with machine user tokens.

Step 2 - Set up the workflow file

Create a new workflow file in your repository at .github/workflows/pipelines-drift-detection.yml.

This directory is the same location as your other Pipelines workflows.

Add the following content to the workflow:

name: Pipelines Drift Detection
run-name: "[GWP]: Pipelines Drift Detection"
on:
# Uncomment to enable scheduled Drift Detection
# schedule:
# - cron: '15 12 * * 1'
workflow_dispatch:
inputs:
path:
description: (Optional) Path to filter units e.g. "./management/*"
type: string
branch-name:
description: (Optional) branch name to open Drift Detection PRs with
default: drift-detection
type: string
permissions:
id-token: write

jobs:
GruntworkPipelines:
uses: gruntwork-io/pipelines-workflows/.github/workflows/pipelines-drift-detection.yml@v3
with:
path: ${{ inputs.path }}
branch-name: ${{ inputs.branch-name }}

Commit the changes to the repository. If branch protection is enabled—which is strongly recommended—you must create a new pull request to incorporate the workflow into your repository.

Step 3 - Run your first drift detection job

Follow the instructions at Running Drift Detection to start using the new workflow.