Skip to content
Open
Show file tree
Hide file tree
Changes from 2 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
36 changes: 35 additions & 1 deletion .github/workflows/pipelines-root.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ on:

env:
PIPELINES_CLI_VERSION: v0.35.5
PIPELINES_ACTIONS_VERSION: v3.4.1
PIPELINES_ACTIONS_VERSION: v3.4.1 # TODO: update to whatever version comes after we merge matching actions PR
BOILERPLATE_VERSION: v0.5.16
GRUNTWORK_INSTALLER_VERSION: v0.0.40

Expand Down Expand Up @@ -139,6 +139,13 @@ jobs:
PIPELINES_CUSTOMER_ORG_READ_TOKEN: ${{ steps.pipelines-customer-org-read-token.outputs.PIPELINES_TOKEN }}
PR_COMMENT_WRITE_TOKEN: ${{ steps.pipelines-infra-root-write-token.outputs.PIPELINES_TOKEN }}

- name: Pre Orchestrate Custom Action
uses: ./pipelines-actions/.github/custom-actions/pre-orchestrate
with:
PIPELINES_GRUNTWORK_READ_TOKEN: ${{ steps.pipelines-gruntwork-read-token.outputs.PIPELINES_TOKEN }}
PIPELINES_CUSTOMER_ORG_READ_TOKEN: ${{ steps.pipelines-customer-org-read-token.outputs.PIPELINES_TOKEN }}
PR_COMMENT_WRITE_TOKEN: ${{ steps.pipelines-infra-root-write-token.outputs.PIPELINES_TOKEN }}

- name: Pipelines Orchestrate
id: orchestrate
uses: ./pipelines-actions/.github/actions/pipelines-orchestrate
Expand All @@ -147,6 +154,13 @@ jobs:
PIPELINES_CUSTOMER_ORG_READ_TOKEN: ${{ steps.pipelines-customer-org-read-token.outputs.PIPELINES_TOKEN }}
PR_COMMENT_WRITE_TOKEN: ${{ steps.pipelines-infra-root-write-token.outputs.PIPELINES_TOKEN }}

- name: Post Orchestrate Custom Action
uses: ./pipelines-actions/.github/custom-actions/post-orchestrate
with:
PIPELINES_GRUNTWORK_READ_TOKEN: ${{ steps.pipelines-gruntwork-read-token.outputs.PIPELINES_TOKEN }}
PIPELINES_CUSTOMER_ORG_READ_TOKEN: ${{ steps.pipelines-customer-org-read-token.outputs.PIPELINES_TOKEN }}
PR_COMMENT_WRITE_TOKEN: ${{ steps.pipelines-infra-root-write-token.outputs.PIPELINES_TOKEN }}

outputs:
pipelines_jobs: ${{ steps.orchestrate.outputs.jobs }}

Expand Down Expand Up @@ -298,6 +312,16 @@ jobs:
PIPELINES_CUSTOMER_ORG_READ_TOKEN: ${{ steps.pipelines-customer-org-read-token.outputs.PIPELINES_TOKEN }}
gruntwork_context: ${{ toJson(steps.gruntwork_context.outputs) }}

- name: Pre Execute Custom Action
uses: ./pipelines-actions/.github/custom-actions/pre-execute
with:
PIPELINES_GRUNTWORK_READ_TOKEN: ${{ steps.pipelines-gruntwork-read-token.outputs.PIPELINES_TOKEN }}
PIPELINES_CUSTOMER_ORG_READ_TOKEN: ${{ steps.pipelines-customer-org-read-token.outputs.PIPELINES_TOKEN }}
account_id: ${{ matrix.jobs.AccountId }}
account_name: ${{ matrix.jobs.Name }}
job: ${{ toJson(matrix.jobs) }}
gruntwork_context: ${{ toJson(steps.gruntwork_context.outputs) }}

- name: "[TerragruntExecute]: Authenticate with AWS and then Invoke Terragrunt"
id: terragrunt
if: ${{ steps.gruntwork_context.outputs.action == 'TERRAGRUNT_EXECUTE' }}
Expand All @@ -316,6 +340,16 @@ jobs:
infra_live_directory: "."
deploy_branch_name: ${{ steps.gruntwork_context.outputs.deploy_branch_name }}

- name: Post Execute Custom Action
uses: ./pipelines-actions/.github/custom-actions/post-execute
with:
PIPELINES_GRUNTWORK_READ_TOKEN: ${{ steps.pipelines-gruntwork-read-token.outputs.PIPELINES_TOKEN }}
PIPELINES_CUSTOMER_ORG_READ_TOKEN: ${{ steps.pipelines-customer-org-read-token.outputs.PIPELINES_TOKEN }}
account_id: ${{ matrix.jobs.AccountId }}
account_name: ${{ matrix.jobs.Name }}
job: ${{ toJson(matrix.jobs) }}
gruntwork_context: ${{ toJson(steps.gruntwork_context.outputs) }}

- name: Get Logs URL
id: get_logs_url
uses: ./pipelines-actions/.github/actions/pipelines-get-job-logs-url
Expand Down
36 changes: 35 additions & 1 deletion .github/workflows/pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ on:

env:
PIPELINES_CLI_VERSION: v0.35.5
PIPELINES_ACTIONS_VERSION: v3.4.1
PIPELINES_ACTIONS_VERSION: v3.4.1 # TODO: update to whatever version comes after we merge matching actions PR

# GitHub Actions tends to hit resource exhaustion and kill running jobs
# if we leave parallelism unbounded, so we set the max to 10 for a sane default.
Expand Down Expand Up @@ -120,6 +120,13 @@ jobs:
PIPELINES_CUSTOMER_ORG_READ_TOKEN: ${{ steps.pipelines-customer-org-read-token.outputs.PIPELINES_TOKEN }}
PR_COMMENT_WRITE_TOKEN: ${{ steps.pipelines-propose-infra-change-token.outputs.PIPELINES_TOKEN }}

- name: Pre Orchestrate Custom Action
uses: ./pipelines-actions/.github/custom-actions/pre-orchestrate
with:
PIPELINES_GRUNTWORK_READ_TOKEN: ${{ steps.pipelines-gruntwork-read-token.outputs.PIPELINES_TOKEN }}
PIPELINES_CUSTOMER_ORG_READ_TOKEN: ${{ steps.pipelines-customer-org-read-token.outputs.PIPELINES_TOKEN }}
PR_COMMENT_WRITE_TOKEN: ${{ steps.pipelines-propose-infra-change-token.outputs.PIPELINES_TOKEN }}

- name: Pipelines Orchestrate
id: orchestrate
uses: ./pipelines-actions/.github/actions/pipelines-orchestrate
Expand All @@ -128,6 +135,13 @@ jobs:
PIPELINES_CUSTOMER_ORG_READ_TOKEN: ${{ steps.pipelines-customer-org-read-token.outputs.PIPELINES_TOKEN }}
PR_COMMENT_WRITE_TOKEN: ${{ steps.pipelines-propose-infra-change-token.outputs.PIPELINES_TOKEN }}

- name: Post Orchestrate Custom Action
uses: ./pipelines-actions/.github/custom-actions/post-orchestrate
with:
PIPELINES_GRUNTWORK_READ_TOKEN: ${{ steps.pipelines-gruntwork-read-token.outputs.PIPELINES_TOKEN }}
PIPELINES_CUSTOMER_ORG_READ_TOKEN: ${{ steps.pipelines-customer-org-read-token.outputs.PIPELINES_TOKEN }}
PR_COMMENT_WRITE_TOKEN: ${{ steps.pipelines-propose-infra-change-token.outputs.PIPELINES_TOKEN }}

outputs:
pipelines_jobs: ${{ steps.orchestrate.outputs.jobs }}

Expand Down Expand Up @@ -206,6 +220,16 @@ jobs:
child_account_id: ${{ matrix.jobs.AdditionalData.ChildAccountId }}
account_names: ${{ matrix.jobs.AdditionalData.AccountNames }}

- name: Pre Execute Custom Action
uses: ./pipelines-actions/.github/custom-actions/pre-execute
with:
PIPELINES_GRUNTWORK_READ_TOKEN: ${{ steps.pipelines-gruntwork-read-token.outputs.PIPELINES_TOKEN }}
PIPELINES_CUSTOMER_ORG_READ_TOKEN: ${{ steps.pipelines-customer-org-read-token.outputs.PIPELINES_TOKEN }}
account_id: ${{ matrix.jobs.AccountId }}
account_name: ${{ matrix.jobs.Name }}
job: ${{ toJson(matrix.jobs) }}
gruntwork_context: ${{ toJson(steps.gruntwork_context.outputs) }}

- name: "Run terragrunt ${{ steps.gruntwork_context.outputs.terragrunt_command }} in ${{ steps.gruntwork_context.outputs.working_directory }}"
id: terragrunt
uses: ./pipelines-actions/.github/actions/pipelines-execute
Expand Down Expand Up @@ -245,6 +269,16 @@ jobs:
step_logs_url: ${{ steps.get_logs_url.outputs.step_logs_url }}
PR_COMMENT_WRITE_TOKEN: ${{ steps.pipelines-propose-infra-change-token.outputs.PIPELINES_TOKEN }}

- name: Post Execute Custom Action
uses: ./pipelines-actions/.github/custom-actions/post-execute
with:
PIPELINES_GRUNTWORK_READ_TOKEN: ${{ steps.pipelines-gruntwork-read-token.outputs.PIPELINES_TOKEN }}
PIPELINES_CUSTOMER_ORG_READ_TOKEN: ${{ steps.pipelines-customer-org-read-token.outputs.PIPELINES_TOKEN }}
account_id: ${{ matrix.jobs.AccountId }}
account_name: ${{ matrix.jobs.Name }}
job: ${{ toJson(matrix.jobs) }}
gruntwork_context: ${{ toJson(steps.gruntwork_context.outputs) }}

outputs:
account_id: ${{ matrix.jobs.AccountId }}
branch: ${{ steps.gruntwork_context.outputs.branch }}
Expand Down