Skip to content

Commit cac944c

Browse files
committed
Add job and account_names inputs to custom actions
Add job and account_names inputs Simplify execute inputs Pipelines actions v4.6.0 Pipelines CLI v0.50.0
1 parent 89e7f07 commit cac944c

4 files changed

Lines changed: 32 additions & 10 deletions

File tree

.github/workflows/pipelines-drift-detection.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,23 @@ on:
3636
description: "Override where we fetch pipelines from, used for internal testing"
3737
pipelines_cli_version:
3838
type: string
39+
<<<<<<< HEAD
3940
default: "v0.49.1"
41+
=======
42+
default: "v0.50.0"
43+
>>>>>>> 6699a9b (Add job and account_names inputs to custom actions)
4044
description: "For Gruntwork internal testing - the version of the pipelines CLI to use"
4145
pipelines_actions_repo:
4246
type: string
4347
default: "gruntwork-io/pipelines-actions"
4448
description: "Repository to fetch pipelines actions from (e.g. use your org/repo for self-hosted)"
4549
pipelines_actions_ref:
4650
type: string
51+
<<<<<<< HEAD
4752
default: "v4.5.2"
53+
=======
54+
default: "v4.6.0"
55+
>>>>>>> 6699a9b (Add job and account_names inputs to custom actions)
4856
description: "For Gruntwork internal testing - the ref of the pipelines actions to use"
4957
pipelines_credentials_repo:
5058
type: string

.github/workflows/pipelines-root.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ on:
3030
description: "Override where we fetch pipelines from, used for internal testing"
3131
pipelines_cli_version:
3232
type: string
33-
default: "v0.49.1"
33+
default: "v0.50.0"
3434
description: "For Gruntwork internal testing - the version of the pipelines CLI to use"
3535
pipelines_actions_repo:
3636
type: string
3737
default: "gruntwork-io/pipelines-actions"
3838
description: "Repository to fetch pipelines actions from (e.g. use your org/repo for self-hosted)"
3939
pipelines_actions_ref:
4040
type: string
41-
default: "v4.5.2"
41+
default: "v4.6.0"
4242
description: "For Gruntwork internal testing - the ref of the pipelines actions to use"
4343
pipelines_credentials_repo:
4444
type: string
@@ -268,6 +268,8 @@ jobs:
268268
PIPELINES_GRUNTWORK_READ_TOKEN: ${{ fromJson(steps.pipelines-tokens.outputs.tokens_json).gruntwork_read }}
269269
PIPELINES_CUSTOMER_ORG_READ_TOKEN: ${{ fromJson(steps.pipelines-tokens.outputs.tokens_json).customer_org_read }}
270270
INFRA_ROOT_WRITE_TOKEN: ${{ fromJson(steps.pipelines-tokens.outputs.tokens_json).infra_root_write }}
271+
job: ${{ toJson(matrix.jobs) }}
272+
account_names: ${{ matrix.jobs.AdditionalData.AccountNames }}
271273

272274
- name: "[ProvisionAccount]: Provision New Account"
273275
id: provision_new_account
@@ -287,6 +289,8 @@ jobs:
287289
PIPELINES_CUSTOMER_ORG_READ_TOKEN: ${{ fromJson(steps.pipelines-tokens.outputs.tokens_json).customer_org_read }}
288290
INFRA_ROOT_WRITE_TOKEN: ${{ fromJson(steps.pipelines-tokens.outputs.tokens_json).infra_root_write }}
289291
baseline_path: ${{ steps.provision_new_account.outputs.baseline_path }}
292+
job: ${{ toJson(matrix.jobs) }}
293+
account_names: ${{ matrix.jobs.AdditionalData.AccountNames }}
290294

291295
- name: "[ProvisionAccount]: Create New Account Pull Request Action"
292296
if: ${{ matrix.jobs.ChangeType == 'AccountsRequested' && contains(matrix.jobs.Action.Command , 'apply')}}
@@ -309,6 +313,8 @@ jobs:
309313
with:
310314
PIPELINES_GRUNTWORK_READ_TOKEN: ${{ fromJson(steps.pipelines-tokens.outputs.tokens_json).gruntwork_read }}
311315
PIPELINES_CUSTOMER_ORG_READ_TOKEN: ${{ fromJson(steps.pipelines-tokens.outputs.tokens_json).customer_org_read }}
316+
job: ${{ toJson(matrix.jobs) }}
317+
account_names: ${{ join(matrix.jobs.NewAccounts.*.Name, ',') }}
312318

313319
# Run the core accounts baselines(shared, logs, security, etc. to ensure the account is setup correctly)
314320
- name: "Run core accounts baselines"
@@ -328,6 +334,8 @@ jobs:
328334
with:
329335
PIPELINES_GRUNTWORK_READ_TOKEN: ${{ fromJson(steps.pipelines-tokens.outputs.tokens_json).gruntwork_read }}
330336
PIPELINES_CUSTOMER_ORG_READ_TOKEN: ${{ fromJson(steps.pipelines-tokens.outputs.tokens_json).customer_org_read }}
337+
job: ${{ toJson(matrix.jobs) }}
338+
account_names: ${{ join(matrix.jobs.NewAccounts.*.Name, ',') }}
331339

332340
- name: "[TerragruntExecute]: Run terragrunt ${{ matrix.jobs.Action.Command }} in ${{ matrix.jobs.WorkingDirectory }}"
333341
id: terragrunt
@@ -338,9 +346,7 @@ jobs:
338346
PIPELINES_CUSTOMER_ORG_READ_TOKEN: ${{ fromJson(steps.pipelines-tokens.outputs.tokens_json).customer_org_read }}
339347
working_directory: ${{ matrix.jobs.WorkingDirectory }}
340348
terragrunt_command: ${{ matrix.jobs.Action.Command }} ${{ matrix.jobs.Action.Args }}
341-
infra_live_repo_branch: ${{ matrix.jobs.Ref }}
342-
infra_live_repo: "."
343-
infra_live_directory: "."
349+
ref: ${{ matrix.jobs.Ref }}
344350
stack_paths: ${{ toJson(matrix.jobs.StackPaths) }}
345351

346352
- name: Update comment
@@ -567,6 +573,8 @@ jobs:
567573
PIPELINES_GRUNTWORK_READ_TOKEN: ${{ fromJson(steps.pipelines-tokens.outputs.tokens_json).gruntwork_read }}
568574
PIPELINES_CUSTOMER_ORG_READ_TOKEN: ${{ fromJson(steps.pipelines-tokens.outputs.tokens_json).customer_org_read }}
569575
ORG_REPO_ADMIN_TOKEN: ${{ fromJson(steps.pipelines-tokens.outputs.tokens_json).org_repo_admin }}
576+
job: ${{ toJson(fromJson(needs.pipelines_orchestrate.outputs.pipelines_jobs)[0]) }}
577+
account_names: ${{ join(fromJson(needs.pipelines_orchestrate.outputs.pipelines_jobs)[0].NewAccounts.*.Name, ',') }}
570578

571579
- name: "Create delegated repo pull request"
572580
uses: ./pipelines-actions/.github/actions/pipelines-new-pr-action

.github/workflows/pipelines-unlock.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,23 @@ on:
4747
description: "Override where we fetch pipelines from, used for internal testing"
4848
pipelines_cli_version:
4949
type: string
50+
<<<<<<< HEAD
5051
default: "v0.49.1"
52+
=======
53+
default: "v0.50.0"
54+
>>>>>>> 6699a9b (Add job and account_names inputs to custom actions)
5155
description: "For Gruntwork internal testing - the version of the pipelines CLI to use"
5256
pipelines_actions_repo:
5357
type: string
5458
default: "gruntwork-io/pipelines-actions"
5559
description: "Repository to fetch pipelines actions from (e.g. use your org/repo for self-hosted)"
5660
pipelines_actions_ref:
5761
type: string
62+
<<<<<<< HEAD
5863
default: "v4.5.2"
64+
=======
65+
default: "v4.6.0"
66+
>>>>>>> 6699a9b (Add job and account_names inputs to custom actions)
5967
description: "For Gruntwork internal testing - the ref of the pipelines actions to use"
6068
pipelines_credentials_repo:
6169
type: string

.github/workflows/pipelines.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ on:
3030
description: "Override where we fetch pipelines from, used for internal testing"
3131
pipelines_cli_version:
3232
type: string
33-
default: "v0.49.1"
33+
default: "v0.50.0"
3434
description: "For Gruntwork internal testing - the version of the pipelines CLI to use"
3535
pipelines_actions_repo:
3636
type: string
3737
default: "gruntwork-io/pipelines-actions"
3838
description: "Repository to fetch pipelines actions from (e.g. use your org/repo for self-hosted)"
3939
pipelines_actions_ref:
4040
type: string
41-
default: "v4.5.2"
41+
default: "v4.6.0"
4242
description: "For Gruntwork internal testing - the ref of the pipelines actions to use"
4343
pipelines_credentials_repo:
4444
type: string
@@ -253,9 +253,7 @@ jobs:
253253
PIPELINES_CUSTOMER_ORG_READ_TOKEN: ${{ fromJson(steps.pipelines-tokens.outputs.tokens_json).customer_org_read }}
254254
working_directory: ${{ matrix.jobs.WorkingDirectory }}
255255
terragrunt_command: ${{ matrix.jobs.Action.Command }} ${{ matrix.jobs.Action.Args }}
256-
infra_live_repo_branch: ${{ matrix.jobs.Ref }}
257-
infra_live_repo: "."
258-
infra_live_directory: "."
256+
ref: ${{ matrix.jobs.Ref }}
259257
stack_paths: ${{ toJson(matrix.jobs.StackPaths) }}
260258

261259
- name: Update comment

0 commit comments

Comments
 (0)