diff --git a/.github/workflows/clean.yml b/.github/workflows/clean.yml index f76b09b0c..2ff8da4d7 100644 --- a/.github/workflows/clean.yml +++ b/.github/workflows/clean.yml @@ -34,5 +34,8 @@ jobs: branch: ${{ needs.branch_name.outputs.branch }} secrets: token: ${{ secrets.GITHUB_TOKEN }} - DEV_KUBE_CONFIG: ${{ secrets.DEV_KUBE_CONFIG }} + DEV_KUBE_CONFIG_BRB: ${{ secrets.DEV_KUBE_CONFIG_BRB }} + DEV_KUBE_CONFIG_NBC: ${{ secrets.DEV_KUBE_CONFIG_NBC }} + DEV_KUBE_CONFIG_THR: ${{ secrets.DEV_KUBE_CONFIG_THR }} + DEV_KUBE_CONFIG_DBC: ${{ secrets.DEV_KUBE_CONFIG_DBC }} BINGO_REPO_TOKEN: ${{ secrets.BINGO_REPO_TOKEN }} diff --git a/.github/workflows/clean_branches.yml b/.github/workflows/clean_branches.yml index a8a3e4cfe..3b4b1fdc1 100644 --- a/.github/workflows/clean_branches.yml +++ b/.github/workflows/clean_branches.yml @@ -9,5 +9,8 @@ jobs: branch: ${{ github.event.ref }} secrets: token: ${{ secrets.GITHUB_TOKEN }} - DEV_KUBE_CONFIG: ${{ secrets.DEV_KUBE_CONFIG }} + DEV_KUBE_CONFIG_BRB: ${{ secrets.DEV_KUBE_CONFIG_BRB }} + DEV_KUBE_CONFIG_NBC: ${{ secrets.DEV_KUBE_CONFIG_NBC }} + DEV_KUBE_CONFIG_THR: ${{ secrets.DEV_KUBE_CONFIG_THR }} + DEV_KUBE_CONFIG_DBC: ${{ secrets.DEV_KUBE_CONFIG_DBC }} BINGO_REPO_TOKEN: ${{ secrets.BINGO_REPO_TOKEN }} diff --git a/.github/workflows/clean_workflow.yml b/.github/workflows/clean_workflow.yml index 1c0f6e1a9..ac69c67f5 100644 --- a/.github/workflows/clean_workflow.yml +++ b/.github/workflows/clean_workflow.yml @@ -18,7 +18,13 @@ on: secrets: token: required: true - DEV_KUBE_CONFIG: + DEV_KUBE_CONFIG_BRB: + required: true + DEV_KUBE_CONFIG_NBC: + required: true + DEV_KUBE_CONFIG_THR: + required: true + DEV_KUBE_CONFIG_DBC: required: true BINGO_REPO_TOKEN: required: true @@ -120,22 +126,24 @@ jobs: steps: - run: | mkdir files - echo "${{ secrets.DEV_KUBE_CONFIG }}" > files/config + echo "${{ secrets.DEV_KUBE_CONFIG_BRB }}" > files/config_brb + echo "${{ secrets.DEV_KUBE_CONFIG_NBC }}" > files/config_nbc + echo "${{ secrets.DEV_KUBE_CONFIG_DBC }}" > files/config_dbc - name: delete custom resources and namespaces run: | branch_identifier='${{ needs.create_branch_identifier.outputs.id_branch }}' - kubectl --kubeconfig=files/config --namespace brb-$branch_identifier delete --ignore-not-found=true --all=true ScaledObject - kubectl --kubeconfig=files/config --namespace nbc-$branch_identifier delete --ignore-not-found=true --all=true ScaledObject - kubectl --kubeconfig=files/config --namespace default-$branch_identifier delete --ignore-not-found=true --all=true ScaledObject - kubectl --kubeconfig=files/config --namespace brb-$branch_identifier delete --ignore-not-found=true --all=true TriggerAuthentication - kubectl --kubeconfig=files/config --namespace nbc-$branch_identifier delete --ignore-not-found=true --all=true TriggerAuthentication - kubectl --kubeconfig=files/config --namespace default-$branch_identifier delete --ignore-not-found=true --all=true TriggerAuthentication - kubectl --kubeconfig=files/config --namespace brb-$branch_identifier delete --ignore-not-found=true --all=true OnePasswordItem - kubectl --kubeconfig=files/config --namespace nbc-$branch_identifier delete --ignore-not-found=true --all=true OnePasswordItem - kubectl --kubeconfig=files/config --namespace default-$branch_identifier delete --ignore-not-found=true --all=true OnePasswordItem - kubectl --kubeconfig=files/config delete --ignore-not-found=true ns brb-$branch_identifier nbc-$branch_identifier default-$branch_identifier + kubectl --kubeconfig=files/config_brb --namespace brb-$branch_identifier delete --ignore-not-found=true --all=true ScaledObject + kubectl --kubeconfig=files/config_brb --namespace brb-$branch_identifier delete --ignore-not-found=true --all=true TriggerAuthentication + kubectl --kubeconfig=files/config_brb --namespace brb-$branch_identifier delete --ignore-not-found=true --all=true OnePasswordItem + kubectl --kubeconfig=files/config_brb delete --ignore-not-found=true ns brb-$branch_identifier + kubectl --kubeconfig=files/config_nbc --namespace nbc-$branch_identifier delete delete --ignore-not-found=true --all=true ScaledObject + kubectl --kubeconfig=files/config_nbc --namespace nbc-$branch_identifier delete delete --ignore-not-found=true --all=true TriggerAuthentication + kubectl --kubeconfig=files/config_nbc --namespace nbc-$branch_identifier delete delete --ignore-not-found=true --all=true OnePasswordItem + kubectl --kubeconfig=files/config_nbc delete --ignore-not-found=true ns nbc-$branch_identifier delete + kubectl --kubeconfig=files/config_dbc --namespace default-$branch_identifier delete --ignore-not-found=true --all=true ScaledObject + kubectl --kubeconfig=files/config_dbc --namespace default-$branch_identifier} delete --ignore-not-found=true --all=true TriggerAuthentication + kubectl --kubeconfig=files/config_dbc --namespace default-$branch_identifier delete --ignore-not-found=true --all=true OnePasswordItem + kubectl --kubeconfig=files/config_dbc delete --ignore-not-found=true ns default-$branch_identifier - name: remove kubeconfig run: | - rm -rf /config - - + rm -rf files/config_.* diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index e6b52bfef..546fca2b7 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -18,9 +18,21 @@ on: secrets: token: required: true - DEV_VAULT: + DEV_VAULT_BRB: required: true - DEV_KUBE_CONFIG: + DEV_VAULT_THR: + required: true + DEV_VAULT_NBC: + required: true + DEV_VAULT_DBC: + required: true + DEV_KUBE_CONFIG_BRB: + required: true + DEV_KUBE_CONFIG_NBC: + required: true + DEV_KUBE_CONFIG_THR: + required: true + DEV_KUBE_CONFIG_DBC: required: true BINGO_REPO_TOKEN: required: true @@ -128,8 +140,8 @@ jobs: host_name: default_host tenannt: dbc secrets: - ONEPASSWORD_VAULT: ${{ secrets.DEV_VAULT }} - KUBECONFIG: ${{ secrets.DEV_KUBE_CONFIG }} + ONEPASSWORD_VAULT: ${{ secrets.DEV_VAULT_DBC }} + KUBECONFIG: ${{ secrets.DEV_KUBE_CONFIG_DBC }} deploy_nbc_dev: needs: @@ -140,8 +152,8 @@ jobs: host_name: nbc_host tenannt: nbc secrets: - ONEPASSWORD_VAULT: ${{ secrets.DEV_VAULT }} - KUBECONFIG: ${{ secrets.DEV_KUBE_CONFIG }} + ONEPASSWORD_VAULT: ${{ secrets.DEV_VAULT_NBC }} + KUBECONFIG: ${{ secrets.DEV_KUBE_CONFIG_NBC }} deploy_brb_dev: needs: @@ -152,5 +164,5 @@ jobs: host_name: brb_host tenannt: brb secrets: - ONEPASSWORD_VAULT: ${{ secrets.DEV_VAULT }} - KUBECONFIG: ${{ secrets.DEV_KUBE_CONFIG }} + ONEPASSWORD_VAULT: ${{ secrets.DEV_VAULT_BRB }} + KUBECONFIG: ${{ secrets.DEV_KUBE_CONFIG_BRB }} diff --git a/.github/workflows/dispatch.yml b/.github/workflows/dispatch.yml index 6204a17b1..ea060d8dc 100644 --- a/.github/workflows/dispatch.yml +++ b/.github/workflows/dispatch.yml @@ -32,6 +32,12 @@ jobs: branch: ${{ needs.branch_name.outputs.branch }} secrets: token: ${{ secrets.GITHUB_TOKEN }} - DEV_VAULT: ${{ secrets.DEV_VAULT }} - DEV_KUBE_CONFIG: ${{ secrets.DEV_KUBE_CONFIG }} + DEV_VAULT_BRB: ${{ secrets.DEV_VAULT_BRB }} + DEV_VAULT_NBC: ${{ secrets.DEV_VAULT_NBC }} + DEV_VAULT_THR: ${{ secrets.DEV_VAULT_THR }} + DEV_VAULT_DBC: ${{ secrets.DEV_VAULT_DBC }} + DEV_KUBE_CONFIG_BRB: ${{ secrets.DEV_KUBE_CONFIG_BRB }} + DEV_KUBE_CONFIG_NBC: ${{ secrets.DEV_KUBE_CONFIG_NBC }} + DEV_KUBE_CONFIG_THR: ${{ secrets.DEV_KUBE_CONFIG_THR }} + DEV_KUBE_CONFIG_DBC: ${{ secrets.DEV_KUBE_CONFIG_DBC }} diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 54c564838..71b5fe7db 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -25,8 +25,14 @@ jobs: branch: ${{ needs.branch_name.outputs.branch }} secrets: token: ${{ secrets.GITHUB_TOKEN }} - DEV_VAULT: ${{ secrets.DEV_VAULT }} - DEV_KUBE_CONFIG: ${{ secrets.DEV_KUBE_CONFIG }} + DEV_VAULT_BRB: ${{ secrets.DEV_VAULT_BRB }} + DEV_VAULT_NBC: ${{ secrets.DEV_VAULT_NBC }} + DEV_VAULT_THR: ${{ secrets.DEV_VAULT_THR }} + DEV_VAULT_DBC: ${{ secrets.DEV_VAULT_DBC }} + DEV_KUBE_CONFIG_BRB: ${{ secrets.DEV_KUBE_CONFIG_BRB }} + DEV_KUBE_CONFIG_NBC: ${{ secrets.DEV_KUBE_CONFIG_NBC }} + DEV_KUBE_CONFIG_THR: ${{ secrets.DEV_KUBE_CONFIG_THR }} + DEV_KUBE_CONFIG_DBC: ${{ secrets.DEV_KUBE_CONFIG_DBC }} BINGO_REPO_TOKEN: ${{ secrets.BINGO_REPO_TOKEN }} deploy-successful: