From 17073ef89dd983837d1cb9374f3d0b3d09493adf Mon Sep 17 00:00:00 2001 From: sujatak97 Date: Thu, 19 Oct 2023 12:56:57 +0530 Subject: [PATCH] Removed unused substitutions --- .github/workflows/0-bootstrap.yml.example | 2 +- .github/workflows/1-org.yml.example | 8 ++++---- .github/workflows/2-env-development.yml.example | 9 ++++----- .github/workflows/2-env-production.yml.example | 8 ++++---- .github/workflows/2-env-staging.yml.example | 8 ++++---- .github/workflows/3-networks-development.yml.example | 8 ++++---- .github/workflows/3-networks-production.yml.example | 8 ++++---- .github/workflows/3-networks-shared.yml.example | 8 ++++---- .github/workflows/3-networks-staging.yml.example | 8 ++++---- .../workflows/4-projects-development-BU_NAME.yml.example | 8 ++++---- .../workflows/4-projects-production-BU_NAME.yml.example | 8 ++++---- .github/workflows/4-projects-shared-BU_NAME.yml.example | 8 ++++---- .github/workflows/4-projects-staging-BU_NAME.yml.example | 8 ++++---- .../5-app-infra-development-BU_NAME.yml.example | 2 +- .../workflows/5-app-infra-production-BU_NAME.yml.example | 2 +- .../workflows/5-app-infra-staging-BU_NAME.yml.example | 2 +- build/github-ssh-cloudbuild-application-plan.yml | 3 --- build/github-ssh-cloudbuild-bootstrap-plan.yml | 3 --- build/github-ssh-cloudbuild-plan.yml | 3 --- 19 files changed, 52 insertions(+), 62 deletions(-) diff --git a/.github/workflows/0-bootstrap.yml.example b/.github/workflows/0-bootstrap.yml.example index 222ab97..fea62aa 100644 --- a/.github/workflows/0-bootstrap.yml.example +++ b/.github/workflows/0-bootstrap.yml.example @@ -66,7 +66,7 @@ jobs: cd ${{ github.workspace}}/build gcloud builds submit --config=github-ssh-cloudbuild-bootstrap-plan.yml \ --project=${{ env.PROJECT_ID }} \ - --substitutions=_SECRET_ID=${{ env.SECRET_ID }},_GIT_HEAD_BRANCH=${{ github.event.pull_request.head.ref }},_GIT_LZ_REPO="${{ github.repository }}.git",_GIT_WORK_DIR="${GITHUB_REPOSITORY##*/}/0-bootstrap",_WORKFLOW="0-bootstrap",_REPO=${GITHUB_REPOSITORY##*/},_GAR_REGION=${{ env.GAR_REGION}} + --substitutions=_SECRET_ID=${{ env.SECRET_ID }},_GIT_HEAD_BRANCH=${{ github.event.pull_request.head.ref }},_GIT_LZ_REPO="${{ github.repository }}.git",_GIT_WORK_DIR="${GITHUB_REPOSITORY##*/}/0-bootstrap",_GAR_REGION=${{ env.GAR_REGION}} tflint: name: "tflint" diff --git a/.github/workflows/1-org.yml.example b/.github/workflows/1-org.yml.example index 5e7d79a..00134bb 100644 --- a/.github/workflows/1-org.yml.example +++ b/.github/workflows/1-org.yml.example @@ -36,11 +36,11 @@ jobs: -H"authorization: Bearer ${{ env.GITHUB_TOKEN }}" \ -X GET ${{ env.URL }} | jq -r '.workflow_runs[0].conclusion'` LAST_STAGE=true - if [ "$STATUS" == completed ] && [ "$CONCLUSION" == success ]; then - echo "::set-output name=success::$LAST_STAGE" + if [ "$STATUS" == completed ] && [ "$CONCLUSION" == success ]; then + echo "::set-output name=success::$LAST_STAGE" else LAST_STAGE=false - echo "::set-output name=failure::$LAST_STAGE" + echo "::set-output name=failure::$LAST_STAGE" fi terraform: @@ -95,7 +95,7 @@ jobs: cd ${{ github.workspace}}/build gcloud builds submit --config=github-ssh-cloudbuild-plan.yml \ --project=${{ env.PROJECT_ID }} \ - --substitutions=_SECRET_ID=${{ env.SECRET_ID }},_GIT_HEAD_BRANCH=${{ github.event.pull_request.head.ref }},_GIT_LZ_REPO="${{ github.repository }}.git",_GIT_WORK_DIR="${GITHUB_REPOSITORY##*/}/1-org/envs/shared",_WORKFLOW="1-org",_REPO=${GITHUB_REPOSITORY##*/},_GAR_REGION=${{ env.GAR_REGION}} + --substitutions=_SECRET_ID=${{ env.SECRET_ID }},_GIT_HEAD_BRANCH=${{ github.event.pull_request.head.ref }},_GIT_LZ_REPO="${{ github.repository }}.git",_GIT_WORK_DIR="${GITHUB_REPOSITORY##*/}/1-org/envs/shared",_GAR_REGION=${{ env.GAR_REGION}} terraform-versioncheck: name: 'terraform version check' diff --git a/.github/workflows/2-env-development.yml.example b/.github/workflows/2-env-development.yml.example index 34b8186..4d57a8d 100644 --- a/.github/workflows/2-env-development.yml.example +++ b/.github/workflows/2-env-development.yml.example @@ -43,11 +43,11 @@ jobs: -H"authorization: Bearer ${{ env.GITHUB_TOKEN }}" \ -X GET ${{ env.URL_BS }} | jq -r '.workflow_runs[0].conclusion'` LAST_STAGE=true - if [ "$STATUS" == completed ] && [ "$CONCLUSION" == success ] && [ "$STATUS_BS" == completed ] && [ "$CONCLUSION_BS" == success ]; then - echo "::set-output name=success::$LAST_STAGE" + if [ "$STATUS" == completed ] && [ "$CONCLUSION" == success ] && [ "$STATUS_BS" == completed ] && [ "$CONCLUSION_BS" == success ]; then + echo "::set-output name=success::$LAST_STAGE" else LAST_STAGE=false - echo "::set-output name=failure::$LAST_STAGE" + echo "::set-output name=failure::$LAST_STAGE" fi terraform: @@ -102,7 +102,7 @@ jobs: cd ${{ github.workspace}}/build gcloud builds submit --config=github-ssh-cloudbuild-plan.yml \ --project=${{ env.PROJECT_ID }} \ - --substitutions=_SECRET_ID=${{ env.SECRET_ID }},_GIT_HEAD_BRANCH=${{ github.event.pull_request.head.ref }},_GIT_LZ_REPO="${{ github.repository }}.git",_GIT_WORK_DIR="${GITHUB_REPOSITORY##*/}/2-env/envs/development",_WORKFLOW="2-env-development",_REPO=${GITHUB_REPOSITORY##*/},_GAR_REGION=${{ env.GAR_REGION}} + --substitutions=_SECRET_ID=${{ env.SECRET_ID }},_GIT_HEAD_BRANCH=${{ github.event.pull_request.head.ref }},_GIT_LZ_REPO="${{ github.repository }}.git",_GIT_WORK_DIR="${GITHUB_REPOSITORY##*/}/2-env/envs/development",_GAR_REGION=${{ env.GAR_REGION}} tflint: runs-on: INSERT_RUNNER_LABEL defaults: @@ -250,4 +250,3 @@ jobs: repo: context.repo.repo, body: '1-Org plan stage failed. Please run 0-bootstrap & 1-Org stage before running 2-env-Development.' }) - diff --git a/.github/workflows/2-env-production.yml.example b/.github/workflows/2-env-production.yml.example index e237dae..5129e45 100644 --- a/.github/workflows/2-env-production.yml.example +++ b/.github/workflows/2-env-production.yml.example @@ -36,11 +36,11 @@ jobs: -H"authorization: Bearer ${{ env.GITHUB_TOKEN }}" \ -X GET ${{ env.URL }} | jq -r '.workflow_runs[0].conclusion'` LAST_STAGE=true - if [ "$STATUS" == completed ] && [ "$CONCLUSION" == success ]; then - echo "::set-output name=success::$LAST_STAGE" + if [ "$STATUS" == completed ] && [ "$CONCLUSION" == success ]; then + echo "::set-output name=success::$LAST_STAGE" else LAST_STAGE=false - echo "::set-output name=failure::$LAST_STAGE" + echo "::set-output name=failure::$LAST_STAGE" fi terraform: @@ -95,7 +95,7 @@ jobs: cd ${{ github.workspace}}/build gcloud builds submit --config=github-ssh-cloudbuild-plan.yml \ --project=${{ env.PROJECT_ID }} \ - --substitutions=_SECRET_ID=${{ env.SECRET_ID }},_GIT_HEAD_BRANCH=${{ github.event.pull_request.head.ref }},_GIT_LZ_REPO="${{ github.repository }}.git",_GIT_WORK_DIR="${GITHUB_REPOSITORY##*/}/2-env/envs/production",_WORKFLOW="2-env-prod",_REPO=${GITHUB_REPOSITORY##*/},_GAR_REGION=${{ env.GAR_REGION}} + --substitutions=_SECRET_ID=${{ env.SECRET_ID }},_GIT_HEAD_BRANCH=${{ github.event.pull_request.head.ref }},_GIT_LZ_REPO="${{ github.repository }}.git",_GIT_WORK_DIR="${GITHUB_REPOSITORY##*/}/2-env/envs/production",_GAR_REGION=${{ env.GAR_REGION}} tflint: runs-on: INSERT_RUNNER_LABEL defaults: diff --git a/.github/workflows/2-env-staging.yml.example b/.github/workflows/2-env-staging.yml.example index e301c75..3bef24a 100644 --- a/.github/workflows/2-env-staging.yml.example +++ b/.github/workflows/2-env-staging.yml.example @@ -36,11 +36,11 @@ jobs: -H"authorization: Bearer ${{ env.GITHUB_TOKEN }}" \ -X GET ${{ env.URL }} | jq -r '.workflow_runs[0].conclusion'` LAST_STAGE=true - if [ "$STATUS" == completed ] && [ "$CONCLUSION" == success ]; then - echo "::set-output name=success::$LAST_STAGE" + if [ "$STATUS" == completed ] && [ "$CONCLUSION" == success ]; then + echo "::set-output name=success::$LAST_STAGE" else LAST_STAGE=false - echo "::set-output name=failure::$LAST_STAGE" + echo "::set-output name=failure::$LAST_STAGE" fi terraform: @@ -96,7 +96,7 @@ jobs: cd ${{ github.workspace}}/build gcloud builds submit --config=github-ssh-cloudbuild-plan.yml \ --project=${{ env.PROJECT_ID }} \ - --substitutions=_SECRET_ID=${{ env.SECRET_ID }},_GIT_HEAD_BRANCH=${{ github.event.pull_request.head.ref }},_GIT_LZ_REPO="${{ github.repository }}.git",_GIT_WORK_DIR="${GITHUB_REPOSITORY##*/}/2-env/envs/staging",_WORKFLOW="2-env-staging",_REPO=${GITHUB_REPOSITORY##*/},_GAR_REGION=${{ env.GAR_REGION}} + --substitutions=_SECRET_ID=${{ env.SECRET_ID }},_GIT_HEAD_BRANCH=${{ github.event.pull_request.head.ref }},_GIT_LZ_REPO="${{ github.repository }}.git",_GIT_WORK_DIR="${GITHUB_REPOSITORY##*/}/2-env/envs/staging",_GAR_REGION=${{ env.GAR_REGION}} tflint: runs-on: INSERT_RUNNER_LABEL defaults: diff --git a/.github/workflows/3-networks-development.yml.example b/.github/workflows/3-networks-development.yml.example index dafe3bc..23811e2 100644 --- a/.github/workflows/3-networks-development.yml.example +++ b/.github/workflows/3-networks-development.yml.example @@ -36,11 +36,11 @@ jobs: -H"authorization: Bearer ${{ env.GITHUB_TOKEN }}" \ -X GET ${{ env.URL_3_NET_SHARED }} | jq -r '.workflow_runs[0].conclusion'` LAST_STAGE=true - if [ "$STATUS" == completed ] && [ "$CONCLUSION" == success ] ; then - echo "::set-output name=success::$LAST_STAGE" + if [ "$STATUS" == completed ] && [ "$CONCLUSION" == success ] ; then + echo "::set-output name=success::$LAST_STAGE" else LAST_STAGE=false - echo "::set-output name=failure::$LAST_STAGE" + echo "::set-output name=failure::$LAST_STAGE" fi terraform: needs: [terraform-versioncheck,tflint,previous-stage-check] @@ -93,7 +93,7 @@ jobs: cd ${{ github.workspace}}/build gcloud builds submit --config=github-ssh-cloudbuild-plan.yml \ --project=${{ env.PROJECT_ID }} \ - --substitutions=_SECRET_ID=${{ env.SECRET_ID }},_GIT_HEAD_BRANCH=${{ github.event.pull_request.head.ref }},_GIT_LZ_REPO="${{ github.repository }}.git",_GIT_WORK_DIR="${GITHUB_REPOSITORY##*/}/3-networks/envs/development",_WORKFLOW="3-network-dev",_REPO=${GITHUB_REPOSITORY##*/},_GAR_REGION=${{ env.GAR_REGION}} + --substitutions=_SECRET_ID=${{ env.SECRET_ID }},_GIT_HEAD_BRANCH=${{ github.event.pull_request.head.ref }},_GIT_LZ_REPO="${{ github.repository }}.git",_GIT_WORK_DIR="${GITHUB_REPOSITORY##*/}/3-networks/envs/development",_GAR_REGION=${{ env.GAR_REGION}} terraform-versioncheck: name: 'terraform version check' runs-on: INSERT_RUNNER_LABEL diff --git a/.github/workflows/3-networks-production.yml.example b/.github/workflows/3-networks-production.yml.example index 61eeb13..49d3b5a 100644 --- a/.github/workflows/3-networks-production.yml.example +++ b/.github/workflows/3-networks-production.yml.example @@ -37,11 +37,11 @@ jobs: -H"authorization: Bearer ${{ env.GITHUB_TOKEN }}" \ -X GET ${{ env.URL_3_NET_SHARED }} | jq -r '.workflow_runs[0].conclusion'` LAST_STAGE=true - if [ "$STATUS" == completed ] && [ "$CONCLUSION" == success ]; then - echo "::set-output name=success::$LAST_STAGE" + if [ "$STATUS" == completed ] && [ "$CONCLUSION" == success ]; then + echo "::set-output name=success::$LAST_STAGE" else LAST_STAGE=false - echo "::set-output name=failure::$LAST_STAGE" + echo "::set-output name=failure::$LAST_STAGE" fi terraform: needs: [terraform-versioncheck,tflint,previous-stage-check] @@ -94,7 +94,7 @@ jobs: cd ${{ github.workspace}}/build gcloud builds submit --config=github-ssh-cloudbuild-plan.yml \ --project=${{ env.PROJECT_ID }} \ - --substitutions=_SECRET_ID=${{ env.SECRET_ID }},_GIT_HEAD_BRANCH=${{ github.event.pull_request.head.ref }},_GIT_LZ_REPO="${{ github.repository }}.git",_GIT_WORK_DIR="${GITHUB_REPOSITORY##*/}/3-networks/envs/production",_WORKFLOW="3-net-prod",_REPO=${GITHUB_REPOSITORY##*/},_GAR_REGION=${{ env.GAR_REGION}} + --substitutions=_SECRET_ID=${{ env.SECRET_ID }},_GIT_HEAD_BRANCH=${{ github.event.pull_request.head.ref }},_GIT_LZ_REPO="${{ github.repository }}.git",_GIT_WORK_DIR="${GITHUB_REPOSITORY##*/}/3-networks/envs/production",_GAR_REGION=${{ env.GAR_REGION}} terraform-versioncheck: name: 'terraform version check' runs-on: INSERT_RUNNER_LABEL diff --git a/.github/workflows/3-networks-shared.yml.example b/.github/workflows/3-networks-shared.yml.example index 55e0c8e..a84ce9c 100644 --- a/.github/workflows/3-networks-shared.yml.example +++ b/.github/workflows/3-networks-shared.yml.example @@ -42,11 +42,11 @@ jobs: -H"authorization: Bearer ${{ env.GITHUB_TOKEN }}" \ -X GET ${{ env.URL_BS }} | jq -r '.workflow_runs[0].conclusion'` LAST_STAGE=true - if [ "$STATUS_ORG" == completed ] && [ "$CONCLUSION_ORG" == success ] && [ "$STATUS_BS" == completed ] && [ "$CONCLUSION_BS" == success ]; then - echo "::set-output name=success::$LAST_STAGE" + if [ "$STATUS_ORG" == completed ] && [ "$CONCLUSION_ORG" == success ] && [ "$STATUS_BS" == completed ] && [ "$CONCLUSION_BS" == success ]; then + echo "::set-output name=success::$LAST_STAGE" else LAST_STAGE=false - echo "::set-output name=failure::$LAST_STAGE" + echo "::set-output name=failure::$LAST_STAGE" fi terraform: needs: [terraform-versioncheck,tflint,previous-stage-check] @@ -99,7 +99,7 @@ jobs: cd ${{ github.workspace}}/build gcloud builds submit --config=github-ssh-cloudbuild-plan.yml \ --project=${{ env.PROJECT_ID }} \ - --substitutions=_SECRET_ID=${{ env.SECRET_ID }},_GIT_HEAD_BRANCH=${{ github.event.pull_request.head.ref }},_GIT_LZ_REPO="${{ github.repository }}.git",_GIT_WORK_DIR="${GITHUB_REPOSITORY##*/}/3-networks/envs/shared",_WORKFLOW="3-net-shared",_REPO=${GITHUB_REPOSITORY##*/},_GAR_REGION=${{ env.GAR_REGION}} + --substitutions=_SECRET_ID=${{ env.SECRET_ID }},_GIT_HEAD_BRANCH=${{ github.event.pull_request.head.ref }},_GIT_LZ_REPO="${{ github.repository }}.git",_GIT_WORK_DIR="${GITHUB_REPOSITORY##*/}/3-networks/envs/shared",_GAR_REGION=${{ env.GAR_REGION}} terraform-versioncheck: name: 'terraform version check' runs-on: INSERT_RUNNER_LABEL diff --git a/.github/workflows/3-networks-staging.yml.example b/.github/workflows/3-networks-staging.yml.example index 41bf53c..0f83bd1 100644 --- a/.github/workflows/3-networks-staging.yml.example +++ b/.github/workflows/3-networks-staging.yml.example @@ -36,11 +36,11 @@ jobs: -H"authorization: Bearer ${{ env.GITHUB_TOKEN }}" \ -X GET ${{ env.URL_3_NET_DEV }} | jq -r '.workflow_runs[0].conclusion'` LAST_STAGE=true - if [ "$STATUS" == completed ] && [ "$CONCLUSION" == success ]; then - echo "::set-output name=success::$LAST_STAGE" + if [ "$STATUS" == completed ] && [ "$CONCLUSION" == success ]; then + echo "::set-output name=success::$LAST_STAGE" else LAST_STAGE=false - echo "::set-output name=failure::$LAST_STAGE" + echo "::set-output name=failure::$LAST_STAGE" fi terraform: needs: [terraform-versioncheck,tflint,previous-stage-check] @@ -93,7 +93,7 @@ jobs: cd ${{ github.workspace}}/build gcloud builds submit --config=github-ssh-cloudbuild-plan.yml \ --project=${{ env.PROJECT_ID }} \ - --substitutions=_SECRET_ID=${{ env.SECRET_ID }},_GIT_HEAD_BRANCH=${{ github.event.pull_request.head.ref }},_GIT_LZ_REPO="${{ github.repository }}.git",_GIT_WORK_DIR="${GITHUB_REPOSITORY##*/}/3-networks/envs/staging",_WORKFLOW="3-net-staging",_REPO=${GITHUB_REPOSITORY##*/},_GAR_REGION=${{ env.GAR_REGION}} + --substitutions=_SECRET_ID=${{ env.SECRET_ID }},_GIT_HEAD_BRANCH=${{ github.event.pull_request.head.ref }},_GIT_LZ_REPO="${{ github.repository }}.git",_GIT_WORK_DIR="${GITHUB_REPOSITORY##*/}/3-networks/envs/staging",_GAR_REGION=${{ env.GAR_REGION}} terraform-versioncheck: name: 'terraform version check' runs-on: INSERT_RUNNER_LABEL diff --git a/.github/workflows/4-projects-development-BU_NAME.yml.example b/.github/workflows/4-projects-development-BU_NAME.yml.example index 974c427..043bc1e 100644 --- a/.github/workflows/4-projects-development-BU_NAME.yml.example +++ b/.github/workflows/4-projects-development-BU_NAME.yml.example @@ -35,11 +35,11 @@ jobs: -H"authorization: Bearer ${{ env.GITHUB_TOKEN }}" \ -X GET ${{ env.URL_SHRD_BU_NAME }} | jq -r '.workflow_runs[0].conclusion'` LAST_STAGE=true - if [ "$STATUS" == completed ] && [ "$CONCLUSION" == success ] ; then - echo "::set-output name=success::$LAST_STAGE" + if [ "$STATUS" == completed ] && [ "$CONCLUSION" == success ] ; then + echo "::set-output name=success::$LAST_STAGE" else LAST_STAGE=false - echo "::set-output name=failure::$LAST_STAGE" + echo "::set-output name=failure::$LAST_STAGE" fi terraform: needs: [terraform-versioncheck,tflint,previous-stage-check] @@ -92,7 +92,7 @@ jobs: cd ${{ github.workspace}}/build gcloud builds submit --config=github-ssh-cloudbuild-plan.yml \ --project=${{ env.PROJECT_ID }} \ - --substitutions=_SECRET_ID=${{ env.SECRET_ID }},_GIT_HEAD_BRANCH=${{ github.event.pull_request.head.ref }},_GIT_LZ_REPO="${{ github.repository }}.git",_GIT_WORK_DIR="${GITHUB_REPOSITORY##*/}/4-projects/BU_NAME/development",_WORKFLOW="4-prj-dev",_REPO=${GITHUB_REPOSITORY##*/},_GAR_REGION=${{ env.GAR_REGION}} + --substitutions=_SECRET_ID=${{ env.SECRET_ID }},_GIT_HEAD_BRANCH=${{ github.event.pull_request.head.ref }},_GIT_LZ_REPO="${{ github.repository }}.git",_GIT_WORK_DIR="${GITHUB_REPOSITORY##*/}/4-projects/BU_NAME/development",_GAR_REGION=${{ env.GAR_REGION}} terraform-versioncheck: name: 'terraform version check' diff --git a/.github/workflows/4-projects-production-BU_NAME.yml.example b/.github/workflows/4-projects-production-BU_NAME.yml.example index 466123d..bde4be1 100644 --- a/.github/workflows/4-projects-production-BU_NAME.yml.example +++ b/.github/workflows/4-projects-production-BU_NAME.yml.example @@ -36,11 +36,11 @@ jobs: -H"authorization: Bearer ${{ env.GITHUB_TOKEN }}" \ -X GET ${{ env.URL_4_PRJ_SHARED }} | jq -r '.workflow_runs[0].conclusion'` LAST_STAGE=true - if [ "$STATUS" == completed ] && [ "$CONCLUSION" == success ] ; then - echo "::set-output name=success::$LAST_STAGE" + if [ "$STATUS" == completed ] && [ "$CONCLUSION" == success ] ; then + echo "::set-output name=success::$LAST_STAGE" else LAST_STAGE=false - echo "::set-output name=failure::$LAST_STAGE" + echo "::set-output name=failure::$LAST_STAGE" fi terraform: @@ -94,7 +94,7 @@ jobs: cd ${{ github.workspace}}/build gcloud builds submit --config=github-ssh-cloudbuild-plan.yml \ --project=${{ env.PROJECT_ID }} \ - --substitutions=_SECRET_ID=${{ env.SECRET_ID }},_GIT_HEAD_BRANCH=${{ github.event.pull_request.head.ref }},_GIT_LZ_REPO="${{ github.repository }}.git",_GIT_WORK_DIR="${GITHUB_REPOSITORY##*/}/4-projects/BU_NAME/production",_WORKFLOW="4-prj-prod",_REPO=${GITHUB_REPOSITORY##*/},_GAR_REGION=${{ env.GAR_REGION}} + --substitutions=_SECRET_ID=${{ env.SECRET_ID }},_GIT_HEAD_BRANCH=${{ github.event.pull_request.head.ref }},_GIT_LZ_REPO="${{ github.repository }}.git",_GIT_WORK_DIR="${GITHUB_REPOSITORY##*/}/4-projects/BU_NAME/production",_GAR_REGION=${{ env.GAR_REGION}} terraform-versioncheck: name: 'terraform version check' diff --git a/.github/workflows/4-projects-shared-BU_NAME.yml.example b/.github/workflows/4-projects-shared-BU_NAME.yml.example index 81ff3d6..8a74b11 100644 --- a/.github/workflows/4-projects-shared-BU_NAME.yml.example +++ b/.github/workflows/4-projects-shared-BU_NAME.yml.example @@ -50,11 +50,11 @@ jobs: -H"authorization: Bearer ${{ env.GITHUB_TOKEN }}" \ -X GET ${{ env.URL_3_NET_SHARED }} | jq -r '.workflow_runs[0].conclusion'` LAST_STAGE=true - if [ "$STATUS_BS" == completed ] && [ "$CONCLUSION_BS" == success ] && [ "$STATUS_ORG" == completed ] && [ "$CONCLUSION_ORG" == success ] && [ "$STATUS_3_NET_SHRD" == completed ] && [ "$CONCLUSION_3_NET_SHRD" == success ] ; then - echo "::set-output name=success::$LAST_STAGE" + if [ "$STATUS_BS" == completed ] && [ "$CONCLUSION_BS" == success ] && [ "$STATUS_ORG" == completed ] && [ "$CONCLUSION_ORG" == success ] && [ "$STATUS_3_NET_SHRD" == completed ] && [ "$CONCLUSION_3_NET_SHRD" == success ] ; then + echo "::set-output name=success::$LAST_STAGE" else LAST_STAGE=false - echo "::set-output name=failure::$LAST_STAGE" + echo "::set-output name=failure::$LAST_STAGE" fi terraform: needs: [terraform-versioncheck,tflint,previous-stage-check] @@ -107,7 +107,7 @@ jobs: cd ${{ github.workspace}}/build gcloud builds submit --config=github-ssh-cloudbuild-plan.yml \ --project=${{ env.PROJECT_ID }} \ - --substitutions=_SECRET_ID=${{ env.SECRET_ID }},_GIT_HEAD_BRANCH=${{ github.event.pull_request.head.ref }},_GIT_LZ_REPO="${{ github.repository }}.git",_GIT_WORK_DIR="${GITHUB_REPOSITORY##*/}/4-projects/BU_NAME/shared",_WORKFLOW="4-prj-shared",_REPO=${GITHUB_REPOSITORY##*/},_GAR_REGION=${{ env.GAR_REGION}} + --substitutions=_SECRET_ID=${{ env.SECRET_ID }},_GIT_HEAD_BRANCH=${{ github.event.pull_request.head.ref }},_GIT_LZ_REPO="${{ github.repository }}.git",_GIT_WORK_DIR="${GITHUB_REPOSITORY##*/}/4-projects/BU_NAME/shared",_GAR_REGION=${{ env.GAR_REGION}} terraform-versioncheck: name: 'terraform version check' diff --git a/.github/workflows/4-projects-staging-BU_NAME.yml.example b/.github/workflows/4-projects-staging-BU_NAME.yml.example index aa1f83a..837ff54 100644 --- a/.github/workflows/4-projects-staging-BU_NAME.yml.example +++ b/.github/workflows/4-projects-staging-BU_NAME.yml.example @@ -36,11 +36,11 @@ jobs: -H"authorization: Bearer ${{ env.GITHUB_TOKEN }}" \ -X GET ${{ env.URL_4_PRJ_DEV }} | jq -r '.workflow_runs[0].conclusion'` LAST_STAGE=true - if [ "$STATUS_DEV" == completed ] && [ "$CONCLUSION_DEV" == success ]; then - echo "::set-output name=success::$LAST_STAGE" + if [ "$STATUS_DEV" == completed ] && [ "$CONCLUSION_DEV" == success ]; then + echo "::set-output name=success::$LAST_STAGE" else LAST_STAGE=false - echo "::set-output name=failure::$LAST_STAGE" + echo "::set-output name=failure::$LAST_STAGE" fi terraform: @@ -94,7 +94,7 @@ jobs: cd ${{ github.workspace}}/build gcloud builds submit --config=github-ssh-cloudbuild-plan.yml \ --project=${{ env.PROJECT_ID }} \ - --substitutions=_SECRET_ID=${{ env.SECRET_ID }},_GIT_HEAD_BRANCH=${{ github.event.pull_request.head.ref }},_GIT_LZ_REPO="${{ github.repository }}.git",_GIT_WORK_DIR="${GITHUB_REPOSITORY##*/}/4-projects/BU_NAME/staging",_WORKFLOW="4-prj-staging",_REPO=${GITHUB_REPOSITORY##*/},_GAR_REGION=${{ env.GAR_REGION}} + --substitutions=_SECRET_ID=${{ env.SECRET_ID }},_GIT_HEAD_BRANCH=${{ github.event.pull_request.head.ref }},_GIT_LZ_REPO="${{ github.repository }}.git",_GIT_WORK_DIR="${GITHUB_REPOSITORY##*/}/4-projects/BU_NAME/staging",_GAR_REGION=${{ env.GAR_REGION}} terraform-versioncheck: name: 'terraform version check' diff --git a/.github/workflows/5-app-infra-development-BU_NAME.yml.example b/.github/workflows/5-app-infra-development-BU_NAME.yml.example index 01b81a4..582b531 100644 --- a/.github/workflows/5-app-infra-development-BU_NAME.yml.example +++ b/.github/workflows/5-app-infra-development-BU_NAME.yml.example @@ -66,7 +66,7 @@ jobs: cd ${{ github.workspace}}/build gcloud builds submit --config=github-ssh-cloudbuild-application-plan.yml \ --project=${{ env.PROJECT_ID }} \ - --substitutions=_SECRET_ID=${{ env.SECRET_ID }},_GIT_HEAD_BRANCH=${{ github.event.pull_request.head.ref }},_GIT_LZ_REPO="${{ github.repository }}.git",_GIT_WORK_DIR="${GITHUB_REPOSITORY##*/}/5-app-infra/BU_NAME/development",_WORKFLOW="5-app-dev",_GAR_REGION=${{ env.GAR_REGION}} + --substitutions=_SECRET_ID=${{ env.SECRET_ID }},_GIT_HEAD_BRANCH=${{ github.event.pull_request.head.ref }},_GIT_LZ_REPO="${{ github.repository }}.git",_GIT_WORK_DIR="${GITHUB_REPOSITORY##*/}/5-app-infra/BU_NAME/development",_GAR_REGION=${{ env.GAR_REGION}} terraform-versioncheck: name: 'terraform version check' diff --git a/.github/workflows/5-app-infra-production-BU_NAME.yml.example b/.github/workflows/5-app-infra-production-BU_NAME.yml.example index 774f931..437b29b 100644 --- a/.github/workflows/5-app-infra-production-BU_NAME.yml.example +++ b/.github/workflows/5-app-infra-production-BU_NAME.yml.example @@ -66,7 +66,7 @@ jobs: cd ${{ github.workspace}}/build gcloud builds submit --config=github-ssh-cloudbuild-application-plan.yml \ --project=${{ env.PROJECT_ID }} \ - --substitutions=_SECRET_ID=${{ env.SECRET_ID }},_GIT_HEAD_BRANCH=${{ github.event.pull_request.head.ref }},_GIT_LZ_REPO="${{ github.repository }}.git",_GIT_WORK_DIR="${GITHUB_REPOSITORY##*/}/5-app-infra/BU_NAME/production",_WORKFLOW="5-app-dev",_GAR_REGION=${{ env.GAR_REGION}} + --substitutions=_SECRET_ID=${{ env.SECRET_ID }},_GIT_HEAD_BRANCH=${{ github.event.pull_request.head.ref }},_GIT_LZ_REPO="${{ github.repository }}.git",_GIT_WORK_DIR="${GITHUB_REPOSITORY##*/}/5-app-infra/BU_NAME/production",_GAR_REGION=${{ env.GAR_REGION}} terraform-versioncheck: name: 'terraform version check' diff --git a/.github/workflows/5-app-infra-staging-BU_NAME.yml.example b/.github/workflows/5-app-infra-staging-BU_NAME.yml.example index ff3c200..b238cce 100644 --- a/.github/workflows/5-app-infra-staging-BU_NAME.yml.example +++ b/.github/workflows/5-app-infra-staging-BU_NAME.yml.example @@ -66,7 +66,7 @@ jobs: cd ${{ github.workspace}}/build gcloud builds submit --config=github-ssh-cloudbuild-application-plan.yml \ --project=${{ env.PROJECT_ID }} \ - --substitutions=_SECRET_ID=${{ env.SECRET_ID }},_GIT_HEAD_BRANCH=${{ github.event.pull_request.head.ref }},_GIT_LZ_REPO="${{ github.repository }}.git",_GIT_WORK_DIR="${GITHUB_REPOSITORY##*/}/5-app-infra/BU_NAME/staging",_WORKFLOW="5-app-dev",_GAR_REGION=${{ env.GAR_REGION}} + --substitutions=_SECRET_ID=${{ env.SECRET_ID }},_GIT_HEAD_BRANCH=${{ github.event.pull_request.head.ref }},_GIT_LZ_REPO="${{ github.repository }}.git",_GIT_WORK_DIR="${GITHUB_REPOSITORY##*/}/5-app-infra/BU_NAME/staging",_GAR_REGION=${{ env.GAR_REGION}} terraform-versioncheck: name: 'terraform version check' diff --git a/build/github-ssh-cloudbuild-application-plan.yml b/build/github-ssh-cloudbuild-application-plan.yml index d2b4c1b..644c816 100644 --- a/build/github-ssh-cloudbuild-application-plan.yml +++ b/build/github-ssh-cloudbuild-application-plan.yml @@ -55,9 +55,6 @@ substitutions: _GIT_LZ_REPO: "PRJ_NAME/RNR_REPO_NAME.git" _GIT_WORK_DIR: RNR_REPO_NAME _GIT_HEAD_BRANCH: PRJ_NAME-main - _WORKFLOW: demo-workflow - _BUCKET: UPDATE_BACKEND_BUCKET - _REPO: RNR_REPO_NAME _GAR_REGION: INSERT_GAR_REGION _GAR_REPO: GAR_REPO_NAME options: diff --git a/build/github-ssh-cloudbuild-bootstrap-plan.yml b/build/github-ssh-cloudbuild-bootstrap-plan.yml index 11bc3d3..a7c52bb 100644 --- a/build/github-ssh-cloudbuild-bootstrap-plan.yml +++ b/build/github-ssh-cloudbuild-bootstrap-plan.yml @@ -59,9 +59,6 @@ substitutions: _GIT_WORK_DIR: RNR_REPO_NAME _GIT_HEAD_BRANCH: PRJ_NAME-main _SECRET_GH_TOKEN: gh-token - _WORKFLOW: demo-workflow - _BUCKET: UPDATE_BACKEND_BUCKET - _REPO: RNR_REPO_NAME _GAR_REGION: INSERT_GAR_REGION _GAR_REPO: GAR_REPO_NAME options: diff --git a/build/github-ssh-cloudbuild-plan.yml b/build/github-ssh-cloudbuild-plan.yml index 9e3101e..a3fba0f 100644 --- a/build/github-ssh-cloudbuild-plan.yml +++ b/build/github-ssh-cloudbuild-plan.yml @@ -54,9 +54,6 @@ substitutions: _GIT_LZ_REPO: "PRJ_NAME/RNR_REPO_NAME.git" _GIT_WORK_DIR: RNR_REPO_NAME _GIT_HEAD_BRANCH: PRJ_NAME-main - _WORKFLOW: demo-workflow - _BUCKET: UPDATE_BACKEND_BUCKET - _REPO: RNR_REPO_NAME _GAR_REGION: INSERT_GAR_REGION _GAR_REPO: GAR_REPO_NAME options: