Merge from release to master for test cases (#41)

* Test Cases for deploy (#35)

* Test Cases for deploy

* Testing workflow

* Fixing an issue with test runs on remote

* Fixing an issue with test runs on remote

* Fixing an issue with test runs on remote

* Fixing an issue with test runs on remote

* Fixing an issue with test runs on remote

* Fixing an issue with test runs on remote

* Review Comments fix

* Review comments fix

* Reverting typescript export changes in previour PR (#39)
This commit is contained in:
rgsubh
2020-06-08 14:41:27 +05:30
committed by GitHub
parent 11a48a4e1d
commit f1898e0618
12 changed files with 275 additions and 22 deletions
+6 -4
View File
@@ -1,14 +1,15 @@
import * as toolCache from '@actions/tool-cache';
import * as core from '@actions/core';
import * as io from '@actions/io';
import * as path from 'path';
import * as toolCache from '@actions/tool-cache';
import { getExecutableExtension, isEqual } from "./utilities/utility";
import { downloadKubectl, getStableKubectlVersion } from "./utilities/kubectl-util";
import { getExecutableExtension, isEqual } from "./utilities/utility";
import { Kubectl } from './kubectl-object-model';
import { deploy } from './utilities/strategy-helpers/deployment-helper';
import { promote } from './actions/promote';
import { reject } from './actions/reject';
import { Kubectl } from './kubectl-object-model';
let kubectlPath = "";
@@ -45,12 +46,13 @@ function checkClusterContext() {
}
}
async function run() {
export async function run() {
checkClusterContext();
await setKubectlPath();
let manifestsInput = core.getInput('manifests');
if (!manifestsInput) {
core.setFailed('No manifests supplied to deploy');
return;
}
let namespace = core.getInput('namespace');
if (!namespace) {
+5 -5
View File
@@ -1,10 +1,10 @@
import * as core from '@actions/core';
import * as fs from 'fs';
import * as os from 'os';
import * as path from 'path';
import * as util from 'util';
import * as fs from 'fs';
import * as toolCache from '@actions/tool-cache';
import * as core from '@actions/core';
import * as util from 'util';
import { Kubectl } from '../kubectl-object-model';
const kubectlToolName = 'kubectl';
@@ -19,7 +19,7 @@ function getExecutableExtension(): string {
return '';
}
function getkubectlDownloadURL(version: string): string {
export function getkubectlDownloadURL(version: string): string {
switch (os.type()) {
case 'Linux':
return util.format('https://storage.googleapis.com/kubernetes-release/release/%s/bin/linux/amd64/kubectl', version);