File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 52
52
shell : bash
53
53
run : |
54
54
git clone https://github.com/code-kern-ai/cicd-deployment-scripts.git
55
- bash cicd-deployment-scripts/k8-cluster/destroy.sh
55
+ bash cicd-deployment-scripts/k8-cluster/destroy.sh -n ${{ env.KUBERNETES_NAMESPACE }}
56
56
57
57
# Deploys application based on given manifest file
58
58
# - name: Deploys application
Original file line number Diff line number Diff line change 1
1
# !/bin/bash
2
2
set -e
3
3
4
+ KUBERNETES_NAMESPACE=" "
5
+
6
+ while getopts n: flag
7
+ do
8
+ case " ${flag} " in
9
+ n) KUBERNETES_NAMESPACE=${OPTARG} ;;
10
+ esac
11
+ done
12
+
13
+ kubectl config set-context --current --namespace=$KUBERNETES_NAMESPACE
4
14
KUBERNETES_DEPLOYMENTS=$( kubectl get deployment --output json | jq -r ' .items[].metadata.name' )
5
15
KUBERNETES_SERVICES=$( kubectl get service --output json | jq -r ' .items[].metadata.name' )
6
16
You can’t perform that action at this time.
0 commit comments