adding spike env var

This commit is contained in:
Koushik Dey 2020-10-21 15:53:28 +05:30
parent 2f6bfda1e2
commit 4da86321ca
3 changed files with 3 additions and 3 deletions

View File

@ -9,7 +9,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
}); });
}; };
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
exports.run = void 0;
const core = require("@actions/core"); const core = require("@actions/core");
const path = require("path"); const path = require("path");
const fs = require("fs"); const fs = require("fs");
@ -114,9 +113,9 @@ function run() {
fs.writeFileSync(kubeconfigPath, kubeconfig); fs.writeFileSync(kubeconfigPath, kubeconfig);
fs.chmodSync(kubeconfigPath, '600'); fs.chmodSync(kubeconfigPath, '600');
core.exportVariable('KUBECONFIG', kubeconfigPath); core.exportVariable('KUBECONFIG', kubeconfigPath);
core.exportVariable('DockerFilePath', 'DockerFilePath/from/input');
console.log('KUBECONFIG environment variable is set'); console.log('KUBECONFIG environment variable is set');
yield setContext(kubeconfigPath); yield setContext(kubeconfigPath);
}); });
} }
exports.run = run;
run().catch(core.setFailed); run().catch(core.setFailed);

View File

@ -4,7 +4,7 @@
"private": true, "private": true,
"main": "lib/run.js", "main": "lib/run.js",
"scripts": { "scripts": {
"build": "tsc --outDir .\\lib\\ --rootDir .\\src\\" "build": "tsc --outDir ./lib/ --rootDir ./src/"
}, },
"keywords": [ "keywords": [
"actions", "actions",

View File

@ -109,6 +109,7 @@ async function run() {
fs.writeFileSync(kubeconfigPath, kubeconfig); fs.writeFileSync(kubeconfigPath, kubeconfig);
fs.chmodSync(kubeconfigPath, '600'); fs.chmodSync(kubeconfigPath, '600');
core.exportVariable('KUBECONFIG', kubeconfigPath); core.exportVariable('KUBECONFIG', kubeconfigPath);
core.exportVariable('DockerFilePath', 'DockerFilePath/from/input');
console.log('KUBECONFIG environment variable is set'); console.log('KUBECONFIG environment variable is set');
await setContext(kubeconfigPath); await setContext(kubeconfigPath);
} }