kubernetesBase64Config -> kubeConfig
parent
079020f71e
commit
6b2e336fa6
|
|
@ -26,7 +26,7 @@ inputs:
|
||||||
required: false
|
required: false
|
||||||
default: ''
|
default: ''
|
||||||
description: 'Path to a Namespace.Class.StaticMethod to run to perform the build.'
|
description: 'Path to a Namespace.Class.StaticMethod to run to perform the build.'
|
||||||
kubernetesBase64Config:
|
kubeConfig:
|
||||||
default: ''
|
default: ''
|
||||||
required: false
|
required: false
|
||||||
description: 'Supply a base64 encoded kubernetes config to run builds on kubernetes and stream logs until completion.'
|
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
|
|
@ -10,7 +10,7 @@ async function action() {
|
||||||
|
|
||||||
const buildParameters = await BuildParameters.create();
|
const buildParameters = await BuildParameters.create();
|
||||||
const baseImage = new ImageTag(buildParameters);
|
const baseImage = new ImageTag(buildParameters);
|
||||||
if (buildParameters.kubernetesBase64Config) {
|
if (buildParameters.kubeConfig) {
|
||||||
core.info('Building with Kubernetes');
|
core.info('Building with Kubernetes');
|
||||||
await Kubernetes.runBuildJob(buildParameters, baseImage);
|
await Kubernetes.runBuildJob(buildParameters, baseImage);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ class BuildParameters {
|
||||||
androidKeyaliasName: Input.androidKeyaliasName,
|
androidKeyaliasName: Input.androidKeyaliasName,
|
||||||
androidKeyaliasPass: Input.androidKeyaliasPass,
|
androidKeyaliasPass: Input.androidKeyaliasPass,
|
||||||
customParameters: Input.customParameters,
|
customParameters: Input.customParameters,
|
||||||
kubernetesBase64Config: Input.kubernetesBase64Config,
|
kubeConfig: Input.kubeConfig,
|
||||||
githubToken: Input.githubToken,
|
githubToken: Input.githubToken,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -81,8 +81,8 @@ class Input {
|
||||||
return core.getInput('customParameters') || '';
|
return core.getInput('customParameters') || '';
|
||||||
}
|
}
|
||||||
|
|
||||||
static get kubernetesBase64Config() {
|
static get kubeConfig() {
|
||||||
return core.getInput('kubernetesBase64Config') || false;
|
return core.getInput('kubeConfig') || '';
|
||||||
}
|
}
|
||||||
|
|
||||||
static get githubToken() {
|
static get githubToken() {
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ class Kubernetes {
|
||||||
static async runBuildJob(buildParameters, baseImage) {
|
static async runBuildJob(buildParameters, baseImage) {
|
||||||
// uses default kubeconfig location/env variable
|
// uses default kubeconfig location/env variable
|
||||||
const kubeconfig = new KubeConfig();
|
const kubeconfig = new KubeConfig();
|
||||||
kubeconfig.loadFromString(base64.decode(buildParameters.kubernetesBase64Config));
|
kubeconfig.loadFromString(base64.decode(buildParameters.kubeConfig));
|
||||||
const backend = new Request({ kubeconfig });
|
const backend = new Request({ kubeconfig });
|
||||||
const kubeClient = new KubeClient(backend);
|
const kubeClient = new KubeClient(backend);
|
||||||
await kubeClient.loadSpec();
|
await kubeClient.loadSpec();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue