From bebf53231867b88fa9da8c389b6ce86d446cf6d3 Mon Sep 17 00:00:00 2001 From: Liora Milbaum Date: Mon, 25 Sep 2023 19:22:45 +0300 Subject: [PATCH] make targets --- .github/workflows/pre-commit.yml | 12 ++++++++++++ Makefile | 21 +++++++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index aed3cc0..7f02b0c 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -6,10 +6,22 @@ on: # yamllint disable-line rule:truthy branches: - main +env: + TERRAGRUNT_VERSION: "0.51.4" + jobs: pre_commit: runs-on: ubuntu-latest steps: - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 - uses: actions/setup-python@v4.7.0 + - name: Install Terragrunt + run: | + curl -Lo terragrunt "https://github.com/gruntwork-io/terragrunt/releases/download/v${TERRAGRUNT_VERSION}/terragrunt_linux_amd64" + chmod +x terragrunt + sudo mv terragrunt /usr/local/bin/ + - name: Verify Terragrunt installation + run: terragrunt --version - uses: pre-commit/action@v3.0.0 + env: + SKIP: terragrunt_validate diff --git a/Makefile b/Makefile index ccb8e49..460e02e 100644 --- a/Makefile +++ b/Makefile @@ -22,3 +22,24 @@ tf/apply: .PHONY: tf/destroy tf/destroy: ${TERRAGRUNT_CMD} destroy -terragrunt-log-level debug + +tf/apply/audit: + cd live/${ENV}/audit && terragrunt run-all --terragrunt-non-interactive apply -auto-approve + +tf/apply/gitlab-permissions: + cd live/${ENV}/gitlab-permissions && terragrunt run-all --terragrunt-non-interactive apply -auto-approve + +tf/apply/gitlab-runners: + cd live/${ENV}/gitlab-runners && terragrunt run-all --terragrunt-non-interactive apply -auto-approve + +tf/apply/oidc: + cd live/${ENV}/oidc && terragrunt run-all --terragrunt-non-interactive apply -auto-approve + +tf/init/renovate-runners: + cd live/${ENV}/renovate-runners && terragrunt run-all --terragrunt-non-interactive apply -auto-approve + +tf/plan/renovate-runners: + cd live/${ENV}/renovate-runners && terragrunt run-all --terragrunt-non-interactive apply -auto-approve + +tf/apply/renovate-runners: + cd live/${ENV}/renovate-runners && terragrunt run-all --terragrunt-non-interactive apply -auto-approve