Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
- main
pull_request:
workflow_dispatch: # allows manual triggering
schedule:
- cron: '0 6 * * *' # Nightly 6AM UTC

# Prevent concurrent runs of this workflow.
concurrency:
Expand Down
3 changes: 3 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ fleet-gitops:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
variables:
FLEET_DRY_RUN_ONLY: false
- if: $CI_PIPELINE_SOURCE == 'schedule' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
variables:
FLEET_DRY_RUN_ONLY: false
before_script:
- apt-get -qq update
- apt-get install -y jq=1.6-2.1
Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,16 @@ This is the starter repository for using [Fleet](https://fleetdm.com) with a Git

5. Now, when anyone pushes a new commit to the default branch, the pipeline will run and update Fleet. For merge requests, the pipeline will do a dry run only.

6. (Optional) To ensure your Fleet configuration stays up to date even when there are no new commits, set up a scheduled pipeline:
- In your GitLab project, go to the left sidebar and navigate to **Build > Pipeline schedules**. (In some GitLab versions, this may appear as **CI/CD > Schedules**.)
- Click **Create a new pipeline schedule** (or **Schedule a new pipeline**).
- Fill in the form:
- **Description**: e.g., `Daily GitOps sync`
- **Cron timezone**: e.g., `[UTC 0] UTC`
- **Interval pattern**: e.g., Custom: `0 6 * * *` (runs nightly at 6AM UTC)
- **Target branch or tag**: your default branch (e.g., `main`)
- Click **Create pipeline schedule**.

## Configuration options

For all configuration options, go to the [YAML files reference](https://fleetdm.com/docs/using-fleet/gitops) in the Fleet docs.
Expand Down