From 3c6fa4638f22592ceb43ec8549b125640c36ffc6 Mon Sep 17 00:00:00 2001 From: mamutmk5 <3045922+mamutmk5@users.noreply.github.com> Date: Mon, 11 Dec 2023 14:44:42 +0100 Subject: [PATCH 1/5] BC-6013 - update workflows for dev cluster by tenant --- .github/workflows/clean.yml | 5 ++- .github/workflows/clean_workflow.yml | 58 ++++++++++++++++++++++++---- .github/workflows/deploy.yml | 28 ++++++++++---- .github/workflows/dispatch.yml | 10 ++++- .github/workflows/push.yml | 10 ++++- 5 files changed, 90 insertions(+), 21 deletions(-) diff --git a/.github/workflows/clean.yml b/.github/workflows/clean.yml index f76b09b0c..21900844c 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_BRB }} + 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..26e629537 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 @@ -111,7 +117,7 @@ jobs: secrets: bingo_token: ${{ secrets.BINGO_REPO_TOKEN }} - delete_namespaces: + delete_namespaces_brb: runs-on: ubuntu-latest if: needs.examine_branch_existence.outputs.are_all_branches_deleted == 'true' needs: @@ -120,20 +126,56 @@ jobs: steps: - run: | mkdir files - echo "${{ secrets.DEV_KUBE_CONFIG }}" > files/config + echo "${{ secrets.DEV_KUBE_CONFIG_BRB }}" > files/config - 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 delete --ignore-not-found=true ns brb-$branch_identifier + - name: remove kubeconfig + run: | + rm -rf /config + + delete_namespaces_nbc: + runs-on: ubuntu-latest + if: needs.examine_branch_existence.outputs.are_all_branches_deleted == 'true' + needs: + - examine_branch_existence + - create_branch_identifier + steps: + - run: | + mkdir files + echo "${{ secrets.DEV_KUBE_CONFIG_NBC }}" > files/config + - name: delete custom resources and namespaces + run: | + branch_identifier='${{ needs.create_branch_identifier.outputs.id_branch }}' + kubectl --kubeconfig=files/config --namespace nbc-$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 TriggerAuthentication kubectl --kubeconfig=files/config --namespace nbc-$branch_identifier delete --ignore-not-found=true --all=true OnePasswordItem + kubectl --kubeconfig=files/config delete --ignore-not-found=true ns nbc-$branch_identifier + - name: remove kubeconfig + run: | + rm -rf /config + + delete_namespaces_dbc: + runs-on: ubuntu-latest + if: needs.examine_branch_existence.outputs.are_all_branches_deleted == 'true' + needs: + - examine_branch_existence + - create_branch_identifier + steps: + - run: | + mkdir files + echo "${{ secrets.DEV_KUBE_CONFIG_DBC }}" > files/config + - name: delete custom resources and namespaces + run: | + branch_identifier='${{ needs.create_branch_identifier.outputs.id_branch }}' + kubectl --kubeconfig=files/config --namespace default-$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 TriggerAuthentication 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 delete --ignore-not-found=true ns default-$branch_identifier - name: remove kubeconfig run: | rm -rf /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..98dc38ce7 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_BRB }} + DEV_KUBE_CONFIG_DBC: ${{ secrets.DEV_KUBE_CONFIG_DBC }} diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 54c564838..49ffa10f4 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_BRB }} + DEV_KUBE_CONFIG_DBC: ${{ secrets.DEV_KUBE_CONFIG_DBC }} BINGO_REPO_TOKEN: ${{ secrets.BINGO_REPO_TOKEN }} deploy-successful: From f8e554668ccdd530392ead8d3d5553306608cff5 Mon Sep 17 00:00:00 2001 From: mamutmk5 <3045922+mamutmk5@users.noreply.github.com> Date: Mon, 11 Dec 2023 15:10:06 +0100 Subject: [PATCH 2/5] BC-6013 - fix kubeconfig error --- .github/workflows/clean.yml | 2 +- .github/workflows/dispatch.yml | 2 +- .github/workflows/push.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/clean.yml b/.github/workflows/clean.yml index 21900844c..2ff8da4d7 100644 --- a/.github/workflows/clean.yml +++ b/.github/workflows/clean.yml @@ -36,6 +36,6 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} 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_BRB }} + 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/dispatch.yml b/.github/workflows/dispatch.yml index 98dc38ce7..ea060d8dc 100644 --- a/.github/workflows/dispatch.yml +++ b/.github/workflows/dispatch.yml @@ -38,6 +38,6 @@ jobs: 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_BRB }} + 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 49ffa10f4..71b5fe7db 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -31,7 +31,7 @@ jobs: 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_BRB }} + 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 }} From 47fe0b612acf03a03515a7440a805e956898eb66 Mon Sep 17 00:00:00 2001 From: mamutmk5 <3045922+mamutmk5@users.noreply.github.com> Date: Mon, 11 Dec 2023 16:51:26 +0100 Subject: [PATCH 3/5] BC-6013 - move namespace remove to owne file --- .github/workflows/clean_branches.yml | 5 ++- .github/workflows/clean_workflow.yml | 57 +++++++----------------- .github/workflows/clean_workflow_dev.yml | 36 +++++++++++++++ 3 files changed, 55 insertions(+), 43 deletions(-) create mode 100644 .github/workflows/clean_workflow_dev.yml 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 26e629537..5f04f6554 100644 --- a/.github/workflows/clean_workflow.yml +++ b/.github/workflows/clean_workflow.yml @@ -123,20 +123,11 @@ jobs: needs: - examine_branch_existence - create_branch_identifier - steps: - - run: | - mkdir files - echo "${{ secrets.DEV_KUBE_CONFIG_BRB }}" > files/config - - 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 brb-$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 delete --ignore-not-found=true ns brb-$branch_identifier - - name: remove kubeconfig - run: | - rm -rf /config + uses: hpi-schul-cloud/dof_app_deploy/.github/workflows/namespace.yml@BC-6013-split + with: + name: brb-${{ needs.create_branch_identifier.outputs.id_branch }} + secrets: + KUBECONFIG: ${{ secrets.DEV_KUBE_CONFIG_BRB }} delete_namespaces_nbc: runs-on: ubuntu-latest @@ -144,20 +135,11 @@ jobs: needs: - examine_branch_existence - create_branch_identifier - steps: - - run: | - mkdir files - echo "${{ secrets.DEV_KUBE_CONFIG_NBC }}" > files/config - - name: delete custom resources and namespaces - run: | - branch_identifier='${{ needs.create_branch_identifier.outputs.id_branch }}' - kubectl --kubeconfig=files/config --namespace nbc-$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 TriggerAuthentication - kubectl --kubeconfig=files/config --namespace nbc-$branch_identifier delete --ignore-not-found=true --all=true OnePasswordItem - kubectl --kubeconfig=files/config delete --ignore-not-found=true ns nbc-$branch_identifier - - name: remove kubeconfig - run: | - rm -rf /config + uses: hpi-schul-cloud/dof_app_deploy/.github/workflows/namespace.yml@BC-6013-split + with: + name: nbc-${{ needs.create_branch_identifier.outputs.id_branch }} + secrets: + KUBECONFIG: ${{ secrets.DEV_KUBE_CONFIG_NBC }} delete_namespaces_dbc: runs-on: ubuntu-latest @@ -165,19 +147,10 @@ jobs: needs: - examine_branch_existence - create_branch_identifier - steps: - - run: | - mkdir files - echo "${{ secrets.DEV_KUBE_CONFIG_DBC }}" > files/config - - name: delete custom resources and namespaces - run: | - branch_identifier='${{ needs.create_branch_identifier.outputs.id_branch }}' - kubectl --kubeconfig=files/config --namespace default-$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 TriggerAuthentication - 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 default-$branch_identifier - - name: remove kubeconfig - run: | - rm -rf /config + uses: hpi-schul-cloud/dof_app_deploy/.github/workflows/namespace.yml@BC-6013-split + with: + name: default-${{ needs.create_branch_identifier.outputs.id_branch }} + secrets: + KUBECONFIG: ${{ secrets.DEV_KUBE_CONFIG_DBC }} diff --git a/.github/workflows/clean_workflow_dev.yml b/.github/workflows/clean_workflow_dev.yml new file mode 100644 index 000000000..d6965b080 --- /dev/null +++ b/.github/workflows/clean_workflow_dev.yml @@ -0,0 +1,36 @@ +--- +name: deploy dev + +on: + workflow_call: + inputs: + namespace: + required: true + type: string + secrets: + KUBECONFIG: + required: true + +permissions: + contents: read + +jobs: + delete_namespaces_dbc: + runs-on: ubuntu-latest + if: needs.examine_branch_existence.outputs.are_all_branches_deleted == 'true' + needs: + - examine_branch_existence + - create_branch_identifier + steps: + - run: | + mkdir files + echo "${{ secrets.KUBECONFIG }}" > files/config + - name: delete custom resources and namespaces + run: | + kubectl --kubeconfig=files/config --namespace ${{ inputs.namespace }} delete --ignore-not-found=true --all=true ScaledObject + kubectl --kubeconfig=files/config --namespace ${{ inputs.namespace }} delete --ignore-not-found=true --all=true TriggerAuthentication + kubectl --kubeconfig=files/config --namespace ${{ inputs.namespace }} delete --ignore-not-found=true --all=true OnePasswordItem + kubectl --kubeconfig=files/config delete --ignore-not-found=true ns ${{ inputs.namespace }} + - name: remove kubeconfig + run: | + rm -rf /config From ea6d07acc3dbd26d9b67324c52d4e880eaa4246d Mon Sep 17 00:00:00 2001 From: mamutmk5 <3045922+mamutmk5@users.noreply.github.com> Date: Tue, 12 Dec 2023 09:39:55 +0100 Subject: [PATCH 4/5] BC-6013 - back to one job --- .github/workflows/clean_workflow.yml | 57 ++++++++++++---------------- 1 file changed, 25 insertions(+), 32 deletions(-) diff --git a/.github/workflows/clean_workflow.yml b/.github/workflows/clean_workflow.yml index 5f04f6554..ac69c67f5 100644 --- a/.github/workflows/clean_workflow.yml +++ b/.github/workflows/clean_workflow.yml @@ -117,40 +117,33 @@ jobs: secrets: bingo_token: ${{ secrets.BINGO_REPO_TOKEN }} - delete_namespaces_brb: + delete_namespaces: runs-on: ubuntu-latest if: needs.examine_branch_existence.outputs.are_all_branches_deleted == 'true' needs: - examine_branch_existence - create_branch_identifier - uses: hpi-schul-cloud/dof_app_deploy/.github/workflows/namespace.yml@BC-6013-split - with: - name: brb-${{ needs.create_branch_identifier.outputs.id_branch }} - secrets: - KUBECONFIG: ${{ secrets.DEV_KUBE_CONFIG_BRB }} - - delete_namespaces_nbc: - runs-on: ubuntu-latest - if: needs.examine_branch_existence.outputs.are_all_branches_deleted == 'true' - needs: - - examine_branch_existence - - create_branch_identifier - uses: hpi-schul-cloud/dof_app_deploy/.github/workflows/namespace.yml@BC-6013-split - with: - name: nbc-${{ needs.create_branch_identifier.outputs.id_branch }} - secrets: - KUBECONFIG: ${{ secrets.DEV_KUBE_CONFIG_NBC }} - - delete_namespaces_dbc: - runs-on: ubuntu-latest - if: needs.examine_branch_existence.outputs.are_all_branches_deleted == 'true' - needs: - - examine_branch_existence - - create_branch_identifier - uses: hpi-schul-cloud/dof_app_deploy/.github/workflows/namespace.yml@BC-6013-split - with: - name: default-${{ needs.create_branch_identifier.outputs.id_branch }} - secrets: - KUBECONFIG: ${{ secrets.DEV_KUBE_CONFIG_DBC }} - - + steps: + - run: | + mkdir files + 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_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 files/config_.* From f0827be39fded968d412d85e56336f58b2b75e20 Mon Sep 17 00:00:00 2001 From: mamutmk5 <3045922+mamutmk5@users.noreply.github.com> Date: Tue, 12 Dec 2023 13:45:44 +0100 Subject: [PATCH 5/5] BC-6013 - remove not used file --- .github/workflows/clean_workflow_dev.yml | 36 ------------------------ 1 file changed, 36 deletions(-) delete mode 100644 .github/workflows/clean_workflow_dev.yml diff --git a/.github/workflows/clean_workflow_dev.yml b/.github/workflows/clean_workflow_dev.yml deleted file mode 100644 index d6965b080..000000000 --- a/.github/workflows/clean_workflow_dev.yml +++ /dev/null @@ -1,36 +0,0 @@ ---- -name: deploy dev - -on: - workflow_call: - inputs: - namespace: - required: true - type: string - secrets: - KUBECONFIG: - required: true - -permissions: - contents: read - -jobs: - delete_namespaces_dbc: - runs-on: ubuntu-latest - if: needs.examine_branch_existence.outputs.are_all_branches_deleted == 'true' - needs: - - examine_branch_existence - - create_branch_identifier - steps: - - run: | - mkdir files - echo "${{ secrets.KUBECONFIG }}" > files/config - - name: delete custom resources and namespaces - run: | - kubectl --kubeconfig=files/config --namespace ${{ inputs.namespace }} delete --ignore-not-found=true --all=true ScaledObject - kubectl --kubeconfig=files/config --namespace ${{ inputs.namespace }} delete --ignore-not-found=true --all=true TriggerAuthentication - kubectl --kubeconfig=files/config --namespace ${{ inputs.namespace }} delete --ignore-not-found=true --all=true OnePasswordItem - kubectl --kubeconfig=files/config delete --ignore-not-found=true ns ${{ inputs.namespace }} - - name: remove kubeconfig - run: | - rm -rf /config