This commit is contained in:
Atharva Mulmuley 2021-06-03 11:59:09 +05:30
parent e5a838284c
commit ec1b1f0cea
2 changed files with 2 additions and 2 deletions

View File

@ -31,7 +31,7 @@ function getKubeconfig() {
core.debug("Found clusterUrl, creating kubeconfig using certificate and token"); core.debug("Found clusterUrl, creating kubeconfig using certificate and token");
let k8sSecret = core.getInput('k8s-secret', { required: true }); let k8sSecret = core.getInput('k8s-secret', { required: true });
var parsedk8sSecret = jsyaml.safeLoad(k8sSecret); var parsedk8sSecret = jsyaml.safeLoad(k8sSecret);
let kubernetesServiceAccountSecretFieldNotPresent = 'The service account secret yaml does not contain data; field. Make sure that its present and try again.'; let kubernetesServiceAccountSecretFieldNotPresent = 'The service account secret yaml does not contain %s; field. Make sure that its present and try again.';
if (!parsedk8sSecret) { if (!parsedk8sSecret) {
throw Error("The service account secret yaml specified is invalid. Make sure that its a valid yaml and try again."); throw Error("The service account secret yaml specified is invalid. Make sure that its a valid yaml and try again.");
} }

View File

@ -21,7 +21,7 @@ export function getKubeconfig(): string {
core.debug("Found clusterUrl, creating kubeconfig using certificate and token"); core.debug("Found clusterUrl, creating kubeconfig using certificate and token");
let k8sSecret = core.getInput('k8s-secret', { required: true }); let k8sSecret = core.getInput('k8s-secret', { required: true });
var parsedk8sSecret = jsyaml.safeLoad(k8sSecret); var parsedk8sSecret = jsyaml.safeLoad(k8sSecret);
let kubernetesServiceAccountSecretFieldNotPresent = 'The service account secret yaml does not contain data; field. Make sure that its present and try again.'; let kubernetesServiceAccountSecretFieldNotPresent = 'The service account secret yaml does not contain %s; field. Make sure that its present and try again.';
if (!parsedk8sSecret) { if (!parsedk8sSecret) {
throw Error("The service account secret yaml specified is invalid. Make sure that its a valid yaml and try again."); throw Error("The service account secret yaml specified is invalid. Make sure that its a valid yaml and try again.");
} }