Skip to content

Commit 4afed1b

Browse files
Add workflows architecture (#2213)
1 parent 84aac37 commit 4afed1b

File tree

2 files changed

+59
-0
lines changed

2 files changed

+59
-0
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# GitHub Workflows
2+
3+
Pipelines integrates via GitHub Workflows in your repositories that integrate with [Reusable Workflows](https://docs.github.com/en/actions/sharing-automations/reusing-workflows) in Gruntwork's [pipelines-workflows](https://github.com/gruntwork-io/pipelines-workflows) repository. The workflows in your repositories depend on the Gruntwork workflows via the `uses` clause within a job, this will appear like:
4+
5+
```yml
6+
jobs:
7+
GruntworkPipelines:
8+
uses: gruntwork-io/pipelines-workflows/.github/workflows/pipelines-root.yml@v3
9+
```
10+
11+
## Workflow Versioning
12+
13+
Gruntwork uses [Semantic Versioning](https://semver.org/) for `pipelines-workflows` releases. We create new git tags to track new releases of the workflows following the `v.MAJOR.MINOR.PATCH` format. We also publish a major tag e.g. `v.MAJOR` that we update to referecene the lastest release within that version. For example when we publish a patch from `v3.0.1` to `v3.0.2` we will update the `v3` tag to reference the newer version.
14+
15+
When calling a workflow the final part of the `uses` clause contains the version reference. E.g. `pipelines-root.yml@v3`. We recommend using the major version e.g. `v3` within your workflows to receive the latest fixes and performance improvements, but you are also able to pin to a specific tag.
16+
17+
## Modifying Workflows
18+
19+
If you make modifications to the workflows in _your_ repositories, these changes will only affect that specific repository. E.g. if you want to add a customization to the `pipelines.yml` in your `infrastructure-live-root` repository it will only affect this repository, and not your vended delegated repositories.
20+
21+
If you choose to [Fork the Gruntwork Workflows](https://docs.gruntwork.io/2.0/docs/pipelines/guides/extending-pipelines#extend-the-github-actions-workflow) you will be able to make changes that affect multiple repositories. It's important to understand exactly which workflows in the `pipelines-workflows` repository affect which of your repositories. See a full list of dependencies below.
22+
23+
## Workflow Dependencies
24+
25+
The Gruntwork pipelines-workflows repository contains the following reusable workflows:
26+
27+
- `pipelines-drift-detection.yml` - A workflow for [Pipelines Drift Detection](/2.0/docs/pipelines/concepts/drift-detection), used by all repositories where Drift Detection is installed.
28+
- `pipelines-root.yml` - The core Pipelines workflow used only by your `infrastructure-live-root` repository. This workflow provides core plan/apply as well as account vending functionality.
29+
- `pipelines-unlock.yml` - A workflow used to manually unlock state files, used by all repositories.
30+
- `pipelines.yml` - The core Pipelines workflow used by your `infrastructure-live-access-control` and delegated repositories for plan/apply operations.
31+
32+
33+
In your repositories you will have the following set of workflows:
34+
35+
#### infrastructure-live-root
36+
37+
- `account-factory.yml` - A standalone workflow that does not use a workflow from `pipelines-workflows`.
38+
- `pipelines-drift-detection.yml` (enterprise only) - Uses the Gruntwork `pipelines-drift-detection.yml` drift detection workflow.
39+
- `pipelines-unlock.yml` - Uses the Gruntwork `pipelines-unlock.yml` unlock workflow.
40+
- `pipelines.yml` - Uses `pipelines-root.yml`.
41+
42+
#### infrastructure-live-access-control
43+
44+
- `pipelines-drift-detection.yml` - (enterprise only) - Uses the Gruntwork `pipelines-drift-detection.yml` drift detection workflow.
45+
- `pipelines-unlock.yml` - Uses the Gruntwork `pipelines-unlock.yml` unlock workflow.
46+
- `pipelines.yml` - Uses `pipelines.yml`.
47+
48+
#### infrastructure-live-delegated ([Vended Delgated Repositories](/2.0/docs/accountfactory/guides/delegated-repositories))
49+
50+
- `pipelines-drift-detection.yml` - Uses the Gruntwork `pipelines-drift-detection.yml` drift detection workflow.
51+
- `pipelines-unlock.yml` - Uses the Gruntwork `pipelines-unlock.yml` unlock workflow.
52+
- `pipelines.yml` - Uses `pipelines.yml`.
53+
54+

sidebars/docs.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,11 @@ const sidebar = [
156156
type: "doc",
157157
id: "2.0/docs/pipelines/architecture/audit-logs",
158158
},
159+
{
160+
label: "GitHub Workflows",
161+
type: "doc",
162+
id: "2.0/docs/pipelines/architecture/github-workflows",
163+
},
159164
{
160165
label: "Usage Data",
161166
type: "doc",

0 commit comments

Comments
 (0)