mirror of
https://github.com/Azure/k8s-deploy.git
synced 2026-04-12 01:15:09 +08:00
Sending a warning instead of throwing error when KUBECONFIG is missing. (#146)
This commit is contained in:
parent
d1dd574643
commit
8249ba50bd
@ -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