Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BC-6013 - update workflows for dev cluster by tenant #735

Merged
merged 5 commits into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
5 changes: 4 additions & 1 deletion .github/workflows/clean.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
5 changes: 4 additions & 1 deletion .github/workflows/clean_branches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
38 changes: 23 additions & 15 deletions .github/workflows/clean_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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_.*
28 changes: 20 additions & 8 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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 }}
10 changes: 8 additions & 2 deletions .github/workflows/dispatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

10 changes: 8 additions & 2 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down