mirror of
https://github.com/Azure/k8s-deploy.git
synced 2026-04-13 01:52:20 +08:00
Sending a warning instead of throwing error when KUBECONFIG is missing. (#141)
This commit is contained in:
parent
ec2a943cdd
commit
c8fbd76ede
@ -53,7 +53,7 @@ function installKubectl(version) {
|
|||||||
}
|
}
|
||||||
function checkClusterContext() {
|
function checkClusterContext() {
|
||||||
if (!process.env["KUBECONFIG"]) {
|
if (!process.env["KUBECONFIG"]) {
|
||||||
throw new Error('Cluster context not set. Use k8ssetcontext action to set cluster context');
|
core.warning('KUBECONFIG env is not explicitly set. Ensure cluster context is set by using k8s-set-context / aks-set-context action.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function run() {
|
function run() {
|
||||||
|
|||||||
@ -42,7 +42,7 @@ async function installKubectl(version: string) {
|
|||||||
|
|
||||||
function checkClusterContext() {
|
function checkClusterContext() {
|
||||||
if (!process.env["KUBECONFIG"]) {
|
if (!process.env["KUBECONFIG"]) {
|
||||||
throw new Error('Cluster context not set. Use k8ssetcontext action to set cluster context');
|
core.warning('KUBECONFIG env is not explicitly set. Ensure cluster context is set by using k8s-set-context / aks-set-context action.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user