kubernetesBase64Config -> kubeConfig

pull/123/head
Frostebite 2020-07-14 18:02:01 +01:00
parent 079020f71e
commit 6b2e336fa6
6 changed files with 7 additions and 7 deletions

View File

@ -26,7 +26,7 @@ inputs:
required: false
default: ''
description: 'Path to a Namespace.Class.StaticMethod to run to perform the build.'
kubernetesBase64Config:
kubeConfig:
default: ''
required: false
description: 'Supply a base64 encoded kubernetes config to run builds on kubernetes and stream logs until completion.'

File diff suppressed because one or more lines are too long

View File

@ -10,7 +10,7 @@ async function action() {
const buildParameters = await BuildParameters.create();
const baseImage = new ImageTag(buildParameters);
if (buildParameters.kubernetesBase64Config) {
if (buildParameters.kubeConfig) {
core.info('Building with Kubernetes');
await Kubernetes.runBuildJob(buildParameters, baseImage);
} else {

View File

@ -36,7 +36,7 @@ class BuildParameters {
androidKeyaliasName: Input.androidKeyaliasName,
androidKeyaliasPass: Input.androidKeyaliasPass,
customParameters: Input.customParameters,
kubernetesBase64Config: Input.kubernetesBase64Config,
kubeConfig: Input.kubeConfig,
githubToken: Input.githubToken,
};
}

View File

@ -81,8 +81,8 @@ class Input {
return core.getInput('customParameters') || '';
}
static get kubernetesBase64Config() {
return core.getInput('kubernetesBase64Config') || false;
static get kubeConfig() {
return core.getInput('kubeConfig') || '';
}
static get githubToken() {

View File

@ -8,7 +8,7 @@ class Kubernetes {
static async runBuildJob(buildParameters, baseImage) {
// uses default kubeconfig location/env variable
const kubeconfig = new KubeConfig();
kubeconfig.loadFromString(base64.decode(buildParameters.kubernetesBase64Config));
kubeconfig.loadFromString(base64.decode(buildParameters.kubeConfig));
const backend = new Request({ kubeconfig });
const kubeClient = new KubeClient(backend);
await kubeClient.loadSpec();