diff --git a/dist/index.d.ts b/dist/index.d.ts index 1a378bd..e76b3f1 100644 --- a/dist/index.d.ts +++ b/dist/index.d.ts @@ -1,4 +1,4 @@ -import "typings-global"; -export { build } from "./npmci.build"; -export { install } from "./npmci.install"; -export { publish } from "./npmci.publish"; +import 'typings-global'; +export { build } from './npmci.build'; +export { install } from './npmci.install'; +export { publish } from './npmci.publish'; diff --git a/dist/index.js b/dist/index.js index 09c26dd..86a0d0c 100644 --- a/dist/index.js +++ b/dist/index.js @@ -4,7 +4,7 @@ require("typings-global"); const plugins = require("./npmci.plugins"); const paths = require("./npmci.paths"); let npmciInfo = new plugins.projectinfo.ProjectinfoNpm(paths.NpmciPackageRoot); -plugins.beautylog.log("npmci version: " + npmciInfo.version); +plugins.beautylog.log('npmci version: ' + npmciInfo.version); const npmci_build_1 = require("./npmci.build"); const npmci_clean_1 = require("./npmci.clean"); const npmci_command_1 = require("./npmci.command"); @@ -24,58 +24,58 @@ let smartcli = new plugins.smartcli.Smartcli(); smartcli.addVersion(npmciInfo.version); // build smartcli.addCommand({ - commandName: "build" + commandName: 'build' }).then((argv) => { npmci_build_1.build(argv._[1]) .then(NpmciEnv.configStore); }); // clean smartcli.addCommand({ - commandName: "clean" + commandName: 'clean' }).then((argv) => { npmci_clean_1.clean() .then(NpmciEnv.configStore); }); // command smartcli.addCommand({ - commandName: "command" + commandName: 'command' }).then((argv) => { npmci_command_1.command() .then(NpmciEnv.configStore); }); // install smartcli.addCommand({ - commandName: "install" + commandName: 'install' }).then((argv) => { npmci_install_1.install(argv._[1]) .then(NpmciEnv.configStore); }); // prepare smartcli.addCommand({ - commandName: "prepare" + commandName: 'prepare' }).then((argv) => { npmci_prepare_1.prepare(argv._[1]) .then(NpmciEnv.configStore); }); // publish smartcli.addCommand({ - commandName: "publish" + commandName: 'publish' }).then((argv) => { npmci_publish_1.publish(argv._[1]) .then(NpmciEnv.configStore); }); // test smartcli.addCommand({ - commandName: "test" + commandName: 'test' }).then((argv) => { npmci_test_1.test(argv._[1]) .then(NpmciEnv.configStore); }); // trigger smartcli.addCommand({ - commandName: "trigger" + commandName: 'trigger' }).then((argv) => { npmci_trigger_1.trigger(); }); smartcli.startParse(); -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUNBLDBCQUF3QjtBQUN4QiwyQ0FBMkM7QUFDM0MsdUNBQXVDO0FBQ3ZDLElBQUksU0FBUyxHQUFHLElBQUksT0FBTyxDQUFDLFdBQVcsQ0FBQyxjQUFjLENBQUMsS0FBSyxDQUFDLGdCQUFnQixDQUFDLENBQUM7QUFDL0UsT0FBTyxDQUFDLFNBQVMsQ0FBQyxHQUFHLENBQUMsaUJBQWlCLEdBQUcsU0FBUyxDQUFDLE9BQU8sQ0FBQyxDQUFDO0FBRTdELCtDQUFtQztBQUNuQywrQ0FBb0M7QUFDcEMsbURBQXdDO0FBQ3hDLG1EQUF3QztBQUN4QyxtREFBd0M7QUFDeEMsbURBQXdDO0FBQ3hDLDZDQUFrQztBQUNsQyxtREFBd0M7QUFDeEMsd0NBQXdDO0FBRXhDLDZDQUFtQztBQUEzQiw4QkFBQSxLQUFLLENBQUE7QUFDYixpREFBd0M7QUFBaEMsa0NBQUEsT0FBTyxDQUFBO0FBQ2YsaURBQXdDO0FBQWhDLGtDQUFBLE9BQU8sQ0FBQTtBQUdmLElBQUksUUFBUSxHQUFHLElBQUksT0FBTyxDQUFDLFFBQVEsQ0FBQyxRQUFRLEVBQUUsQ0FBQztBQUMvQyxRQUFRLENBQUMsVUFBVSxDQUFDLFNBQVMsQ0FBQyxPQUFPLENBQUMsQ0FBQztBQUV2QyxRQUFRO0FBQ1IsUUFBUSxDQUFDLFVBQVUsQ0FBQztJQUNoQixXQUFXLEVBQUMsT0FBTztDQUN0QixDQUFDLENBQUMsSU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0NBQ3pCLENBQUMsQ0FBQyxJQUFJLENBQUMsQ0FBQyxJQUFJO0lBQ1QsdUJBQU8sQ0FBQyxJQUFJLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDO1NBQ2IsSUFBSSxDQUFDLFFBQVEsQ0FBQyxXQUFXLENBQUMsQ0FBQTtBQUNuQyxDQUFDLENBQUMsQ0FBQTtBQUVGLE9BQU87QUFDUCxRQUFRLENBQUMsVUFBVSxDQUFDO0lBQ2hCLFdBQVcsRUFBRSxNQUFNO0NBQ3RCLENBQUMsQ0FBQyxJQUFJLENBQUMsQ0FBQyxJQUFJO0lBQ1QsaUJBQUksQ0FBQyxJQUFJLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDO1NBQ1YsSUFBSSxDQUFDLFFBQVEsQ0FBQyxXQUFXLENBQUMsQ0FBQTtBQUNuQyxDQUFDLENBQUMsQ0FBQTtBQUVGLFVBQVU7QUFDVixRQUFRLENBQUMsVUFBVSxDQUFDO0lBQ2hCLFdBQVcsRUFBRSxTQUFTO0NBQ3pCLENBQUMsQ0FBQyxJQUFJLENBQUMsQ0FBQyxJQUFJO0lBQ1QsdUJBQU8sRUFBRSxDQUFBO0FBQ2IsQ0FBQyxDQUFDLENBQUE7QUFFRixRQUFRLENBQUMsVUFBVSxFQUFFLENBQUEifQ== \ No newline at end of file diff --git a/dist/npmci.bash.d.ts b/dist/npmci.bash.d.ts index a40a79c..0a3695a 100644 --- a/dist/npmci.bash.d.ts +++ b/dist/npmci.bash.d.ts @@ -1,4 +1,4 @@ -import "typings-global"; +import 'typings-global'; export declare let nvmAvailable: boolean; export declare let bash: (commandArg: string, retryArg?: number, bareArg?: boolean) => string; export declare let bashBare: (commandArg: any, retryArg?: number) => string; diff --git a/dist/npmci.bash.js b/dist/npmci.bash.js index 3564dcb..8a799af 100644 --- a/dist/npmci.bash.js +++ b/dist/npmci.bash.js @@ -1,7 +1,7 @@ "use strict"; require("typings-global"); const plugins = require("./npmci.plugins"); -let nvmSourceString = ""; +let nvmSourceString = ''; exports.nvmAvailable = false; let checkNvm = () => { if (plugins.shelljs.exec(`bash -c "source /usr/local/nvm/nvm.sh"`, { silent: true }).code === 0) { @@ -29,24 +29,24 @@ exports.bash = (commandArg, retryArg = 2, bareArg = false) => { } exitCode = execResult.code; stdOut = execResult.stdout; - if (exitCode !== 0 && i == retryArg) { + if (exitCode !== 0 && i === retryArg) { process.exit(1); } - else if (exitCode == 0) { + else if (exitCode === 0) { i = retryArg + 1; // if everything works out ok retrials are not wanted } else { - plugins.beautylog.warn("Something went wrong! Exit Code: " + exitCode.toString()); - plugins.beautylog.info("Retry " + (i + 1).toString() + " of " + retryArg.toString()); + plugins.beautylog.warn('Something went wrong! Exit Code: ' + exitCode.toString()); + plugins.beautylog.info('Retry ' + (i + 1).toString() + ' of ' + retryArg.toString()); } } } else { - plugins.beautylog.log("ShellExec would be: " + commandArg); + plugins.beautylog.log('ShellExec would be: ' + commandArg); } return stdOut; }; exports.bashBare = (commandArg, retryArg = 2) => { return exports.bash(commandArg, retryArg, true); }; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnBtY2kuYmFzaC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL25wbWNpLmJhc2gudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLDBCQUF3QjtBQUN4QiwyQ0FBMkM7QUFHM0MsSUFBSSxlQUFlLEdBQVcsRUFBRSxDQUFDO0FBQ3RCLFFBQUEsWUFBWSxHQUFZLEtBQUssQ0FBQztBQUN6QyxJQUFJLFFBQVEsR0FBRztJQUNYLEVBQUUsQ0FBQyxDQUFDLE9BQU8sQ0FBQyxPQUFPLENBQUMsSUFBSSxDQUFDLHdDQUF3QyxFQUFDLEVBQUMsTUFBTSxFQUFDLElBQUksRUFBQyxDQUFDLENBQUMsSUFBSSxLQUFLLENBQUMsQ0FBQyxDQUF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JBQ3hCLENBQUMsR0FBRyxRQUFRLEdBQUcsQ0FBQyxDQUFBLENBQUMscURBQXFEO1lBQzFFLENBQUM7WUFBQyxJQUFJLENBQUMsQ0FBQztnQkFDSixPQUFPLENBQUMsU0FBUyxDQUFDLElBQUksQ0FBQyxtQ0FBbUMsR0FBRyxRQUFRLENBQUMsUUFBUSxFQUFFLENBQUMsQ0FBQTtnQkFDakYsT0FBTyxDQUFDLFNBQVMsQ0FBQyxJQUFJLENBQUMsUUFBUSxHQUFHLENBQUMsQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDLFFBQVEsRUFBRSxHQUFHLE1BQU0sR0FBRyxRQUFRLENBQUMsUUFBUSxFQUFFLENBQUMsQ0FBQTtZQUN4RixDQUFDO1FBQ0wsQ0FBQztJQUNMLENBQUM7SUFBQyxJQUFJLENBQUMsQ0FBQztRQUNKLE9BQU8sQ0FBQyxTQUFTLENBQUMsR0FBRyxDQUFDLHNCQUFzQixHQUFHLFVBQVUsQ0FBQyxDQUFBO0lBQzlELENBQUM7SUFDRCxNQUFNLENBQUMsTUFBTSxDQUFBO0FBQ2pCLENBQUMsQ0FBQTtBQUVVLFFBQUEsUUFBUSxHQUFHLENBQUMsVUFBVSxFQUFFLFFBQVEsR0FBRyxDQUFDO0lBQzNDLE1BQU0sQ0FBQyxZQUFJLENBQUMsVUFBVSxFQUFFLFFBQVEsRUFBRSxJQUFJLENBQUMsQ0FBQTtBQUMzQyxDQUFDLENBQUEifQ== \ No newline at end of file diff --git a/dist/npmci.build.d.ts b/dist/npmci.build.d.ts index 35e0d39..32da757 100644 --- a/dist/npmci.build.d.ts +++ b/dist/npmci.build.d.ts @@ -1,10 +1,10 @@ /// -import "typings-global"; -import * as plugins from "./npmci.plugins"; +import 'typings-global'; +import * as plugins from './npmci.plugins'; /** * defines possible build services */ -export declare type TBuildService = "docker"; +export declare type TBuildService = 'docker'; /** * builds for a specific service */ diff --git a/dist/npmci.build.docker.d.ts b/dist/npmci.build.docker.d.ts index cb50b81..13bd264 100644 --- a/dist/npmci.build.docker.d.ts +++ b/dist/npmci.build.docker.d.ts @@ -1,6 +1,6 @@ /// /// -import * as plugins from "./npmci.plugins"; +import * as plugins from './npmci.plugins'; /** * builds a cwd of Dockerfiles by triggering a promisechain */ diff --git a/dist/npmci.build.docker.js b/dist/npmci.build.docker.js index cdd8dae..564d276 100644 --- a/dist/npmci.build.docker.js +++ b/dist/npmci.build.docker.js @@ -25,7 +25,7 @@ exports.build = function () { exports.readDockerfiles = function () { let done = plugins.q.defer(); let readDockerfilesArray = []; - plugins.gulp.src("./Dockerfile*") + plugins.gulp.src('./Dockerfile*') .pipe(plugins.through2.obj(function (file, enc, cb) { let myDockerfile = new Dockerfile({ filePath: file.path, @@ -51,16 +51,16 @@ exports.sortDockerfiles = function (sortableArrayArg) { let sorterFunction = function () { sortableArrayArg.forEach((dockerfileArg) => { let cleanTags = exports.cleanTagsArrayFunction(sortableArrayArg, sortedArray); - if (cleanTags.indexOf(dockerfileArg.baseImage) == -1 && sortedArray.indexOf(dockerfileArg) == -1) { + if (cleanTags.indexOf(dockerfileArg.baseImage) === -1 && sortedArray.indexOf(dockerfileArg) === -1) { sortedArray.push(dockerfileArg); } ; - if (cleanTagsOriginal.indexOf(dockerfileArg.baseImage) != -1) { + if (cleanTagsOriginal.indexOf(dockerfileArg.baseImage) !== -1) { dockerfileArg.localBaseImageDependent = true; } ; }); - if (sortableArrayArg.length == sortedArray.length) { + if (sortableArrayArg.length === sortedArray.length) { done.resolve(sortedArray); } else if (sorterFunctionCounter < 10) { @@ -80,7 +80,7 @@ exports.mapDockerfiles = function (sortedArray) { sortedArray.forEach((dockerfileArg) => { if (dockerfileArg.localBaseImageDependent) { sortedArray.forEach((dockfile2) => { - if (dockfile2.cleanTag == dockerfileArg.baseImage) { + if (dockfile2.cleanTag === dockerfileArg.baseImage) { dockerfileArg.localBaseDockerfile = dockfile2; } }); @@ -116,7 +116,7 @@ exports.pushDockerfiles = function (sortedArrayArg) { * pulls corresponding real Docker images for instances of Dockerfile from a registry. * This is needed if building, testing, and publishing of Docker images is carried out in seperate CI stages. */ -exports.pullDockerfileImages = (sortableArrayArg, registryArg = "registry.gitlab.com") => { +exports.pullDockerfileImages = (sortableArrayArg, registryArg = 'registry.gitlab.com') => { let done = plugins.q.defer(); sortableArrayArg.forEach((dockerfileArg) => { dockerfileArg.pull(registryArg); @@ -142,13 +142,13 @@ exports.testDockerfiles = (sortedArrayArg) => { class Dockerfile { constructor(options) { this.filePath = options.filePath; - this.repo = NpmciEnv.repo.user + "/" + NpmciEnv.repo.repo; + this.repo = NpmciEnv.repo.user + '/' + NpmciEnv.repo.repo; this.version = exports.dockerFileVersion(plugins.path.parse(options.filePath).base); - this.cleanTag = this.repo + ":" + this.version; + this.cleanTag = this.repo + ':' + this.version; this.buildTag = this.cleanTag; - this.testTag = exports.dockerTag("registry.gitlab.com", this.repo, this.version, "test"); + this.testTag = exports.dockerTag('registry.gitlab.com', this.repo, this.version, 'test'); this.releaseTag = exports.dockerTag(NpmciEnv.dockerRegistry, this.repo, this.version); - this.containerName = "dockerfile-" + this.version; + this.containerName = 'dockerfile-' + this.version; if (options.filePath && options.read) { this.content = plugins.smartfile.fs.toStringSync(plugins.path.resolve(options.filePath)); } @@ -162,8 +162,8 @@ class Dockerfile { */ build() { let done = plugins.q.defer(); - plugins.beautylog.info("now building Dockerfile for " + this.cleanTag); - npmci_bash_1.bashBare("docker build -t " + this.buildTag + " -f " + this.filePath + " ."); + plugins.beautylog.info('now building Dockerfile for ' + this.cleanTag); + npmci_bash_1.bashBare('docker build -t ' + this.buildTag + ' -f ' + this.filePath + ' .'); NpmciEnv.dockerFilesBuilt.push(this); done.resolve(); return done.promise; @@ -176,16 +176,16 @@ class Dockerfile { let done = plugins.q.defer(); let pushTag; switch (stageArg) { - case "release": + case 'release': pushTag = this.releaseTag; break; - case "test": + case 'test': default: pushTag = this.testTag; break; } - npmci_bash_1.bashBare("docker tag " + this.buildTag + " " + pushTag); - npmci_bash_1.bashBare("docker push " + pushTag); + npmci_bash_1.bashBare('docker tag ' + this.buildTag + ' ' + pushTag); + npmci_bash_1.bashBare('docker push ' + pushTag); done.resolve(); return done.promise; } @@ -195,26 +195,26 @@ class Dockerfile { */ pull(registryArg) { let pullTag = this.testTag; - npmci_bash_1.bashBare("docker pull " + pullTag); - npmci_bash_1.bashBare("docker tag " + pullTag + " " + this.buildTag); + npmci_bash_1.bashBare('docker pull ' + pullTag); + npmci_bash_1.bashBare('docker tag ' + pullTag + ' ' + this.buildTag); } ; /** * tests the Dockerfile; */ test() { - let testFile = plugins.path.join(paths.NpmciTestDir, "test_" + this.version + ".sh"); + let testFile = plugins.path.join(paths.NpmciTestDir, 'test_' + this.version + '.sh'); let testFileExists = plugins.smartfile.fs.fileExistsSync(testFile); if (testFileExists) { - npmci_bash_1.bashBare("docker run --name npmci_test_container " + this.buildTag + " mkdir /npmci_test"); - npmci_bash_1.bashBare("docker cp " + testFile + " npmci_test_container:/npmci_test/test.sh"); - npmci_bash_1.bashBare("docker commit npmci_test_container npmci_test_image"); - npmci_bash_1.bashBare("docker run npmci_test_image sh /npmci_test/test.sh"); - npmci_bash_1.bashBare("docker rm npmci_test_container"); - npmci_bash_1.bashBare("docker rmi --force npmci_test_image"); + npmci_bash_1.bashBare('docker run --name npmci_test_container ' + this.buildTag + ' mkdir /npmci_test'); + npmci_bash_1.bashBare('docker cp ' + testFile + ' npmci_test_container:/npmci_test/test.sh'); + npmci_bash_1.bashBare('docker commit npmci_test_container npmci_test_image'); + npmci_bash_1.bashBare('docker run npmci_test_image sh /npmci_test/test.sh'); + npmci_bash_1.bashBare('docker rm npmci_test_container'); + npmci_bash_1.bashBare('docker rmi --force npmci_test_image'); } else { - plugins.beautylog.warn("skipping tests for " + this.cleanTag + " because no testfile was found!"); + plugins.beautylog.warn('skipping tests for ' + this.cleanTag + ' because no testfile was found!'); } } ; @@ -222,7 +222,7 @@ class Dockerfile { * gets the id of a Dockerfile */ getId() { - let containerId = npmci_bash_1.bashBare("docker inspect --type=image --format=\"{{.Id}}\" " + this.buildTag); + let containerId = npmci_bash_1.bashBare('docker inspect --type=image --format=\"{{.Id}}\" ' + this.buildTag); return containerId; } ; @@ -235,11 +235,11 @@ exports.dockerFileVersion = function (dockerfileNameArg) { let versionString; let versionRegex = /Dockerfile_([a-zA-Z0-9\.]*)$/; let regexResultArray = versionRegex.exec(dockerfileNameArg); - if (regexResultArray && regexResultArray.length == 2) { + if (regexResultArray && regexResultArray.length === 2) { versionString = regexResultArray[1]; } else { - versionString = "latest"; + versionString = 'latest'; } return versionString; }; @@ -260,10 +260,10 @@ exports.dockerTag = function (registryArg, repoArg, versionArg, suffixArg) { let repo = repoArg; let version = versionArg; if (suffixArg) { - version = versionArg + "_" + suffixArg; + version = versionArg + '_' + suffixArg; } ; - tagString = registry + "/" + repo + ":" + version; + tagString = registry + '/' + repo + ':' + version; return tagString; }; /** @@ -272,10 +272,10 @@ exports.dockerTag = function (registryArg, repoArg, versionArg, suffixArg) { exports.cleanTagsArrayFunction = function (dockerfileArrayArg, trackingArrayArg) { let cleanTagsArray = []; dockerfileArrayArg.forEach(function (dockerfileArg) { - if (trackingArrayArg.indexOf(dockerfileArg) == -1) { + if (trackingArrayArg.indexOf(dockerfileArg) === -1) { cleanTagsArray.push(dockerfileArg.cleanTag); } }); return cleanTagsArray; }; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnBtY2kuYnVpbGQuZG9ja2VyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvbnBtY2kuYnVpbGQuZG9ja2VyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSwyQ0FBMkM7QUFDM0MsdUNBQXVDO0FBQ3ZDLHdDQUF3QztBQUN4Qyw2Q0FBc0M7QUFFdEM7O0dBRUc7QUFDUSxRQUFBLEtBQUssR0FBRztJQUNmLElBQUksSUFBSSxHQUFHLE9BQU8sQ0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LENBQUMsT0FBTyxDQUFDLGFBQWEsQ0FBQyxLQUFLLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQztZQUNqRCxjQUFjLENBQUMsSUFBSSxDQUFDLGFBQWEsQ0FBQyxRQUFRLENBQUMsQ0FBQTtRQUMvQyxDQUFDO0lBQ0wsQ0FBQyxDQUFDLENBQUE7SUFDRixNQUFNLENBQUMsY0FBYyxDQUFBO0FBQ3pCLENBQUMsQ0FBQSJ9 \ No newline at end of file diff --git a/dist/npmci.build.js b/dist/npmci.build.js index f64b0df..f9601d7 100644 --- a/dist/npmci.build.js +++ b/dist/npmci.build.js @@ -7,12 +7,12 @@ const buildDocker = require("./npmci.build.docker"); */ exports.build = function (commandArg) { switch (commandArg) { - case "docker": + case 'docker': return buildDocker.build(); default: - plugins.beautylog.log("build target " + commandArg + " not recognised!"); + plugins.beautylog.log('build target ' + commandArg + ' not recognised!'); } ; return; }; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnBtY2kuYnVpbGQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9ucG1jaS5idWlsZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsMEJBQXdCO0FBQ3hCLDJDQUEyQztBQUczQyxvREFBbUQ7QUFPbkQ7O0dBRUc7QUFDUSxRQUFBLEtBQUssR0FBRyxVQUFTLFVBQVU7SUFDbEMsTUFBTSxDQUFBLENBQUMsVUFBVSxDQUFDLENBQUEsQ0FBQztRQUNmLEtBQUssUUFBUTtZQUNULE1BQU0sQ0FBQyxXQUFXLENBQUMsS0FBSyxFQUFFLENBQUM7UUFDL0I7WUFDSSxPQUFPLENBQUMsU0FBUyxDQUFDLEdBQUcsQ0FBQyxlQUFlLEdBQUcsVUFBVSxHQUFHLGtCQUFrQixDQUFDLENBQUM7SUFDakYsQ0FBQztJQUFBLENBQUM7SUFDRixNQUFNLENBQUM7QUFDWCxDQUFDLENBQUEifQ== \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnBtY2kuYnVpbGQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9ucG1jaS5idWlsZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsMEJBQXVCO0FBQ3ZCLDJDQUEwQztBQUcxQyxvREFBbUQ7QUFPbkQ7O0dBRUc7QUFDUSxRQUFBLEtBQUssR0FBRyxVQUFTLFVBQVU7SUFDbEMsTUFBTSxDQUFDLENBQUMsVUFBVSxDQUFDLENBQUMsQ0FBQztRQUNqQixLQUFLLFFBQVE7WUFDVCxNQUFNLENBQUMsV0FBVyxDQUFDLEtBQUssRUFBRSxDQUFBO1FBQzlCO1lBQ0ksT0FBTyxDQUFDLFNBQVMsQ0FBQyxHQUFHLENBQUMsZUFBZSxHQUFHLFVBQVUsR0FBRyxrQkFBa0IsQ0FBQyxDQUFBO0lBQ2hGLENBQUM7SUFBQSxDQUFDO0lBQ0YsTUFBTSxDQUFBO0FBQ1YsQ0FBQyxDQUFBIn0= \ No newline at end of file diff --git a/dist/npmci.config.d.ts b/dist/npmci.config.d.ts new file mode 100644 index 0000000..6631064 --- /dev/null +++ b/dist/npmci.config.d.ts @@ -0,0 +1,6 @@ +/// +import * as q from 'q'; +export interface INpmciOptions { + globalNpmTools: string[]; +} +export declare let getConfig: () => q.Promise; diff --git a/dist/npmci.config.js b/dist/npmci.config.js new file mode 100644 index 0000000..9d06e3f --- /dev/null +++ b/dist/npmci.config.js @@ -0,0 +1,16 @@ +"use strict"; +const q = require("q"); +const plugins = require("./npmci.plugins"); +const paths = require("./npmci.paths"); +exports.getConfig = () => { + console.log('getting config'); + let done = q.defer(); + let npmciNpmextra = new plugins.npmextra.Npmextra(paths.cwd); + let defaultConfig = { + globalNpmTools: [] + }; + let npmciConfig = npmciNpmextra.dataFor('npmci', defaultConfig); + done.resolve(npmciConfig); + return done.promise; +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnBtY2kuY29uZmlnLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvbnBtY2kuY29uZmlnLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSx1QkFBc0I7QUFFdEIsMkNBQTBDO0FBQzFDLHVDQUFzQztBQU0zQixRQUFBLFNBQVMsR0FBRztJQUNuQixPQUFPLENBQUMsR0FBRyxDQUFDLGdCQUFnQixDQUFDLENBQUE7SUFDN0IsSUFBSSxJQUFJLEdBQUcsQ0FBQyxDQUFDLEtBQUssRUFBaUIsQ0FBQTtJQUNuQyxJQUFJLGFBQWEsR0FBRyxJQUFJLE9BQU8sQ0FBQyxRQUFRLENBQUMsUUFBUSxDQUFDLEtBQUssQ0FBQyxHQUFHLENBQUMsQ0FBQTtJQUM1RCxJQUFJLGFBQWEsR0FBa0I7UUFDL0IsY0FBYyxFQUFFLEVBQUU7S0FDckIsQ0FBQTtJQUNELElBQUksV0FBVyxHQUFHLGFBQWEsQ0FBQyxPQUFPLENBQWdCLE9BQU8sRUFBRSxhQUFhLENBQUMsQ0FBQTtJQUM5RSxJQUFJLENBQUMsT0FBTyxDQUFDLFdBQVcsQ0FBQyxDQUFBO0lBQ3pCLE1BQU0sQ0FBQyxJQUFJLENBQUMsT0FBTyxDQUFBO0FBQ3ZCLENBQUMsQ0FBQSJ9 \ No newline at end of file diff --git a/dist/npmci.install.js b/dist/npmci.install.js index 29f48d6..9b9179e 100644 --- a/dist/npmci.install.js +++ b/dist/npmci.install.js @@ -1,6 +1,7 @@ "use strict"; require("typings-global"); const plugins = require("./npmci.plugins"); +const configModule = require("./npmci.config"); const npmci_bash_1 = require("./npmci.bash"); const npmci_bash_2 = require("./npmci.bash"); exports.install = (versionArg) => { @@ -30,7 +31,15 @@ exports.install = (versionArg) => { ; npmci_bash_1.bash('node -v'); npmci_bash_1.bash('npm -v'); - done.resolve(); + // lets look for further config + configModule.getConfig() + .then(config => { + for (let npmTool of config.globalNpmTools) { + plugins.beautylog.info(`globally installing ${npmTool} from npm`); + npmci_bash_1.bash(`npm install --loglevel=silent -g ${npmTool}`); + } + done.resolve(); + }); return done.promise; }; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnBtY2kuaW5zdGFsbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL25wbWNpLmluc3RhbGwudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLDBCQUF3QjtBQUN4QiwyQ0FBMkM7QUFDM0MsNkNBQW9DO0FBQ3BDLDZDQUEyQztBQUVoQyxRQUFBLE9BQU8sR0FBRyxDQUFDLFVBQVU7SUFDNUIsSUFBSSxJQUFJLEdBQUcsT0FBTyxDQUFDLENBQUMsQ0FBQyxLQUFLLEVBQUUsQ0FBQTtJQUM1QixPQUFPLENBQUMsU0FBUyxDQUFDLEdBQUcsQ0FBQywrQkFBK0IsVUFBVSxFQUFFLENBQUMsQ0FBQTtJQUNsRSxJQUFJLE9BQWUsQ0FBQTtJQUNuQixFQUFFLENBQUMsQ0FBQyxVQUFVLEtBQUssUUFBUSxDQUFDLENBQUMsQ0FBQztRQUMxQixPQUFPLEdBQUcsUUFBUSxDQUFBO0lBQ3RCLENBQUM7SUFBQyxJQUFJLENBQUMsRUFBRSxDQUFDLENBQUMsVUFBVSxLQUFLLEtBQUssQ0FBQyxDQUFDLENBQUM7UUFDOUIsT0FBTyxHQUFHLEdBQUcsQ0FBQTtJQUNqQixDQUFDO0lBQUMsSUFBSSxDQUFDLEVBQUUsQ0FBQyxDQUFDLFVBQVUsS0FBSyxRQUFRLENBQUMsQ0FBQyxDQUFDO1FBQ2pDLE9BQU8sR0FBRyxHQUFHLENBQUE7SUFDakIsQ0FBQztJQUFDLElBQUksQ0FBQyxDQUFDO1FBQ0osT0FBTyxH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QUFJLE9BQU8sSUFBSSxNQUFNLENBQUMsY0FBYyxDQUFDLENBQUMsQ0FBQztZQUN4QyxPQUFPLENBQUMsU0FBUyxDQUFDLElBQUksQ0FBQyx1QkFBdUIsT0FBTyxXQUFXLENBQUMsQ0FBQTtZQUNqRSxpQkFBSSxDQUFDLHFDQUFxQyxPQUFPLEVBQUUsQ0FBQyxDQUFBO1FBQ3hELENBQUM7UUFDRCxJQUFJLENBQUMsT0FBTyxFQUFFLENBQUE7SUFDbEIsQ0FBQyxDQUFDLENBQUE7SUFDTixNQUFNLENBQUMsSUFBSSxDQUFDLE9BQU8sQ0FBQTtBQUN2QixDQUFDLENBQUEifQ== \ No newline at end of file diff --git a/dist/npmci.paths.d.ts b/dist/npmci.paths.d.ts index 7eed4ea..22c01e4 100644 --- a/dist/npmci.paths.d.ts +++ b/dist/npmci.paths.d.ts @@ -1,4 +1,4 @@ -import "typings-global"; +import 'typings-global'; export declare let cwd: string; export declare let NpmciPackageRoot: string; export declare let NpmciPackageConfig: string; diff --git a/dist/npmci.paths.js b/dist/npmci.paths.js index 47a9ce7..67fe60e 100644 --- a/dist/npmci.paths.js +++ b/dist/npmci.paths.js @@ -2,8 +2,8 @@ require("typings-global"); const plugins = require("./npmci.plugins"); exports.cwd = process.cwd(); -exports.NpmciPackageRoot = plugins.path.join(__dirname, "../"); -exports.NpmciPackageConfig = plugins.path.join(exports.NpmciPackageRoot, "./config.json"); +exports.NpmciPackageRoot = plugins.path.join(__dirname, '../'); +exports.NpmciPackageConfig = plugins.path.join(exports.NpmciPackageRoot, './config.json'); exports.NpmciProjectDir = exports.cwd; -exports.NpmciTestDir = plugins.path.join(exports.cwd, "./test"); -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnBtY2kucGF0aHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9ucG1jaS5wYXRocy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsMEJBQXdCO0FBQ3hCLDJDQUEyQztBQUVoQyxRQUFBLEdBQUcsR0FBRyxPQUFPLENBQUMsR0FBRyxFQUFFLENBQUM7QUFFcEIsUUFBQSxnQkFBZ0IsR0FBRyxPQUFPLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxTQUFTLEVBQUMsS0FBSyxDQUFDLENBQUM7QUFDdEQsUUFBQSxrQkFBa0IsR0FBRyxPQUFPLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyx3QkFBZ0IsRUFBQyxlQUFlLENBQUMsQ0FBQztBQUN6RSxRQUFBLGVBQWUsR0FBRyxXQUFHLENBQUM7QUFDdEIsUUFBQSxZQUFZLEdBQUcsT0FBTyxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsV0FBRyxFQUFDLFFBQVEsQ0FBQyxDQUFDIn0= \ No newline at end of file +exports.NpmciTestDir = plugins.path.join(exports.cwd, './test'); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnBtY2kucGF0aHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9ucG1jaS5wYXRocy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsMEJBQXVCO0FBQ3ZCLDJDQUEwQztBQUUvQixRQUFBLEdBQUcsR0FBRyxPQUFPLENBQUMsR0FBRyxFQUFFLENBQUE7QUFFbkIsUUFBQSxnQkFBZ0IsR0FBRyxPQUFPLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxTQUFTLEVBQUMsS0FBSyxDQUFDLENBQUE7QUFDckQsUUFBQSxrQkFBa0IsR0FBRyxPQUFPLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyx3QkFBZ0IsRUFBQyxlQUFlLENBQUMsQ0FBQTtBQUN4RSxRQUFBLGVBQWUsR0FBRyxXQUFHLENBQUE7QUFDckIsUUFBQSxZQUFZLEdBQUcsT0FBTyxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsV0FBRyxFQUFDLFFBQVEsQ0FBQyxDQUFBIn0= \ No newline at end of file diff --git a/dist/npmci.plugins.d.ts b/dist/npmci.plugins.d.ts index dd3899f..593a22b 100644 --- a/dist/npmci.plugins.d.ts +++ b/dist/npmci.plugins.d.ts @@ -1,17 +1,18 @@ -import "typings-global"; -export import beautylog = require("beautylog"); +import 'typings-global'; +export import beautylog = require('beautylog'); export declare let gulp: any; -export declare let gulpFunction: any; -export declare let lodash: any; -export import path = require("path"); -export import projectinfo = require("projectinfo"); -export import q = require("q"); +export import gulpFunction = require('gulp-function'); +export import lodash = require('lodash'); +export import npmextra = require('npmextra'); +export import path = require('path'); +export import projectinfo = require('projectinfo'); +export import q = require('q'); export declare let request: any; -export import shelljs = require("shelljs"); -export import smartcli = require("smartcli"); -export import smartfile = require("smartfile"); -export import smartparam = require("smartparam"); -export import smartsocket = require("smartsocket"); -export import smartssh = require("smartssh"); -export import smartstring = require("smartstring"); -export declare let through2: any; +export import shelljs = require('shelljs'); +export import smartcli = require('smartcli'); +export import smartfile = require('smartfile'); +export import smartparam = require('smartparam'); +export import smartsocket = require('smartsocket'); +export import smartssh = require('smartssh'); +export import smartstring = require('smartstring'); +export import through2 = require('through2'); diff --git a/dist/npmci.plugins.js b/dist/npmci.plugins.js index cf48e96..e202995 100644 --- a/dist/npmci.plugins.js +++ b/dist/npmci.plugins.js @@ -1,13 +1,14 @@ "use strict"; require("typings-global"); exports.beautylog = require("beautylog"); -exports.gulp = require("gulp"); +exports.gulp = require('gulp'); exports.gulpFunction = require("gulp-function"); exports.lodash = require("lodash"); +exports.npmextra = require("npmextra"); exports.path = require("path"); exports.projectinfo = require("projectinfo"); exports.q = require("q"); -exports.request = require("request"); +exports.request = require('request'); exports.shelljs = require("shelljs"); exports.smartcli = require("smartcli"); exports.smartfile = require("smartfile"); @@ -16,4 +17,4 @@ exports.smartsocket = require("smartsocket"); exports.smartssh = require("smartssh"); exports.smartstring = require("smartstring"); exports.through2 = require("through2"); -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnBtY2kucGx1Z2lucy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL25wbWNpLnBsdWdpbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLDBCQUF3QjtBQUN4Qix5Q0FBK0M7QUFDcEMsUUFBQSxJQUFJLEdBQUcsT0FBTyxDQUFDLE1BQU0sQ0FBQyxDQUFDO0FBQ3ZCLFFBQUEsWUFBWSxHQUFHLE9BQU8sQ0FBQyxlQUFlLENBQUMsQ0FBQztBQUN4QyxRQUFBLE1BQU0sR0FBRyxPQUFPLENBQUMsUUFBUSxDQUFDLENBQUM7QUFDdEMsK0JBQXFDO0FBQ3JDLDZDQUFtRDtBQUNuRCx5QkFBK0I7QUFDcEIsUUFBQSxPQUFPLEdBQUcsT0FBTyxDQUFDLFNBQVMsQ0FBQyxDQUFDO0FBQ3hDLHFDQUEyQztBQUMzQyx1Q0FBNkM7QUFDN0MseUNBQStDO0FBQy9DLDJDQUFpRDtBQUNqRCw2Q0FBbUQ7QUFDbkQsdUNBQTZDO0FBQzdDLDZDQUFtRDtBQUN4QyxRQUFBLFFBQVEsR0FBRyxPQUFPLENBQUMsVUFBVSxDQUFDLENBQUMifQ== \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnBtY2kucGx1Z2lucy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL25wbWNpLnBsdWdpbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLDBCQUF1QjtBQUN2Qix5Q0FBOEM7QUFDbkMsUUFBQSxJQUFJLEdBQUcsT0FBTyxDQUFDLE1BQU0sQ0FBQyxDQUFBO0FBQ2pDLGdEQUFxRDtBQUNyRCxtQ0FBd0M7QUFDeEMsdUNBQTRDO0FBQzVDLCtCQUFvQztBQUNwQyw2Q0FBa0Q7QUFDbEQseUJBQThCO0FBQ25CLFFBQUEsT0FBTyxHQUFHLE9BQU8sQ0FBQyxTQUFTLENBQUMsQ0FBQTtBQUN2QyxxQ0FBMEM7QUFDMUMsdUNBQTRDO0FBQzVDLHlDQUE4QztBQUM5QywyQ0FBZ0Q7QUFDaEQsNkNBQWtEO0FBQ2xELHVDQUE0QztBQUM1Qyw2Q0FBa0Q7QUFDbEQsdUNBQTRDIn0= \ No newline at end of file diff --git a/dist/npmci.prepare.d.ts b/dist/npmci.prepare.d.ts index 2ef0ab7..51838b9 100644 --- a/dist/npmci.prepare.d.ts +++ b/dist/npmci.prepare.d.ts @@ -1,10 +1,10 @@ /// -import "typings-global"; -import * as plugins from "./npmci.plugins"; +import 'typings-global'; +import * as plugins from './npmci.plugins'; /** * defines possible prepare services */ -export declare type TPrepService = "npm" | "docker" | "docker-gitlab" | "ssh"; +export declare type TPrepService = 'npm' | 'docker' | 'docker-gitlab' | 'ssh'; /** * the main exported prepare function * @param servieArg describes the service to prepare diff --git a/dist/npmci.prepare.js b/dist/npmci.prepare.js index 6e5d199..66832f5 100644 --- a/dist/npmci.prepare.js +++ b/dist/npmci.prepare.js @@ -8,17 +8,17 @@ const sshModule = require("./npmci.ssh"); */ let npm = function () { let done = plugins.q.defer(); - let npmrcPrefix = "//registry.npmjs.org/:_authToken="; + let npmrcPrefix = '//registry.npmjs.org/:_authToken='; let npmToken = process.env.NPMCI_TOKEN_NPM; let npmrcFileString = npmrcPrefix + npmToken; if (npmToken) { - plugins.beautylog.info("found access token"); + plugins.beautylog.info('found access token'); } else { - plugins.beautylog.error("no access token found! Exiting!"); + plugins.beautylog.error('no access token found! Exiting!'); process.exit(1); } - plugins.smartfile.memory.toFsSync(npmrcFileString, "/root/.npmrc"); + plugins.smartfile.memory.toFsSync(npmrcFileString, '/root/.npmrc'); done.resolve(); return done.promise; }; @@ -27,17 +27,17 @@ let npm = function () { */ let docker = function () { let done = plugins.q.defer(); - env.setDockerRegistry("docker.io"); + env.setDockerRegistry('docker.io'); let dockerRegex = /^([a-zA-Z0-9\.]*)\|([a-zA-Z0-9\.]*)/; if (!process.env.NPMCI_LOGIN_DOCKER) { - plugins.beautylog.error("You have to specify Login Data to the Docker Registry"); + plugins.beautylog.error('You have to specify Login Data to the Docker Registry'); process.exit(1); } - plugins.shelljs.exec("docker login -u gitlab-ci-token -p " + process.env.CI_BUILD_TOKEN + " " + "registry.gitlab.com"); // Always also login to GitLab Registry + plugins.shelljs.exec('docker login -u gitlab-ci-token -p ' + process.env.CI_BUILD_TOKEN + ' ' + 'registry.gitlab.com'); // Always also login to GitLab Registry let dockerRegexResultArray = dockerRegex.exec(process.env.NPMCI_LOGIN_DOCKER); let username = dockerRegexResultArray[1]; let password = dockerRegexResultArray[2]; - plugins.shelljs.exec("docker login -u " + username + " -p " + password); + plugins.shelljs.exec('docker login -u ' + username + ' -p ' + password); done.resolve(); return done.promise; }; @@ -46,8 +46,8 @@ let docker = function () { */ let dockerGitlab = function () { let done = plugins.q.defer(); - env.setDockerRegistry("registry.gitlab.com"); - plugins.shelljs.exec("docker login -u gitlab-ci-token -p " + process.env.CI_BUILD_TOKEN + " " + "registry.gitlab.com"); + env.setDockerRegistry('registry.gitlab.com'); + plugins.shelljs.exec('docker login -u gitlab-ci-token -p ' + process.env.CI_BUILD_TOKEN + ' ' + 'registry.gitlab.com'); done.resolve(); return done.promise; }; @@ -66,16 +66,16 @@ let ssh = function () { */ exports.prepare = function (serviceArg) { switch (serviceArg) { - case "npm": + case 'npm': return npm(); - case "docker": + case 'docker': return docker(); - case "docker-gitlab": + case 'docker-gitlab': return dockerGitlab(); - case "ssh": + case 'ssh': return ssh(); default: break; } }; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnBtY2kucHJlcGFyZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL25wbWN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DLENBQUEifQ== \ No newline at end of file diff --git a/dist/npmci.publish.d.ts b/dist/npmci.publish.d.ts index 72d916e..8492ed9 100644 --- a/dist/npmci.publish.d.ts +++ b/dist/npmci.publish.d.ts @@ -1,10 +1,10 @@ /// -import "typings-global"; -import * as plugins from "./npmci.plugins"; +import 'typings-global'; +import * as plugins from './npmci.plugins'; /** * type of supported services */ -export declare type TPubService = "npm" | "docker"; +export declare type TPubService = 'npm' | 'docker'; /** * the main exported publish function. * @param pubServiceArg references targeted service to publish to diff --git a/dist/npmci.publish.js b/dist/npmci.publish.js index f71c20c..ac908c0 100644 --- a/dist/npmci.publish.js +++ b/dist/npmci.publish.js @@ -8,11 +8,11 @@ const NpmciBuildDocker = require("./npmci.build.docker"); * the main exported publish function. * @param pubServiceArg references targeted service to publish to */ -exports.publish = (pubServiceArg = "npm") => { +exports.publish = (pubServiceArg = 'npm') => { switch (pubServiceArg) { - case "npm": + case 'npm': return publishNpm(); - case "docker": + case 'docker': return publishDocker(); } }; @@ -21,10 +21,10 @@ exports.publish = (pubServiceArg = "npm") => { */ let publishNpm = function () { let done = plugins.q.defer(); - npmci_prepare_1.prepare("npm") + npmci_prepare_1.prepare('npm') .then(function () { - npmci_bash_1.bash("npm publish"); - plugins.beautylog.ok("Done!"); + npmci_bash_1.bash('npm publish'); + plugins.beautylog.ok('Done!'); done.resolve(); }); return done.promise; @@ -40,4 +40,4 @@ let publishDocker = function () { .then(done.resolve); return done.promise; }; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnBtY2kucHVibGlzaC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL25wbWNpLnB1Ymxpc2gudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLDBCQUF3QjtBQUN4QiwyQ0FBMkM7QUFDM0MsbURBQXdDO0FBQ3hDLDZDQUFrQztBQUVsQyx5REFBd0Q7QUFPeEQ7OztHQUdHO0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HQUFHLE9BQU8sQ0FBQyxDQUFDLENBQUMsS0FBSyxFQUFFLENBQUE7SUFDeEIsZ0JBQWdCLENBQUMsZUFBZSxFQUFFO1NBQ2pDLElBQUksQ0FBQyxnQkFBZ0IsQ0FBQyxvQkFBb0IsQ0FBQztTQUMzQyxJQUFJLENBQUMsZ0JBQWdCLENBQUMsZUFBZSxDQUFDO1NBQ3RDLElBQUksQ0FBQyxJQUFJLENBQUMsT0FBTyxDQUFDLENBQUE7SUFDdkIsTUFBTSxDQUFDLElBQUksQ0FBQyxPQUFPLENBQUE7QUFDdkIsQ0FBQyxDQUFBIn0= \ No newline at end of file diff --git a/dist/npmci.servezone.js b/dist/npmci.servezone.js index 9cb0fbb..2bcd3a6 100644 --- a/dist/npmci.servezone.js +++ b/dist/npmci.servezone.js @@ -13,10 +13,10 @@ let servezoneRegexResultArray = servezoneRegex.exec(process.env.NPMCI_SERVEZONE) * the data object that is used for the smartsocket client object */ let smartsocketClientConstructorOptions = { - alias: "npmci", + alias: 'npmci', password: servezoneRegexResultArray[3], port: parseInt(servezoneRegexResultArray[2]), - role: "ci", + role: 'ci', url: servezoneRegexResultArray[1] }; /** @@ -25,4 +25,4 @@ let smartsocketClientConstructorOptions = { exports.run = (configArg) => { new plugins.smartsocket.SmartsocketClient(smartsocketClientConstructorOptions); }; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnBtY2kuc2VydmV6b25lLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvbnBtY2kuc2VydmV6b25lLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSwyQ0FBMkM7QUFFM0M7OztHQUdHO0FBQ0gsSUFBSSxjQUFjLEdBQUcsbUJBQW1CLENBQUM7QUFFekM7O0dBRUc7QUFDSCxJQUFJLHlCQUF5QixHQUFHLGNBQWMsQ0FBQyxJQUFJLENBQUMsT0FBTyxDQUFDLEdBQUcsQ0FBQ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FQUFFLElBQUk7SUFDVixHQUFHLEVBQUUseUJBQXlCLENBQUMsQ0FBQyxDQUFDO0NBQ3BDLENBQUE7QUFFRDs7R0FFRztBQUNRLFFBQUEsR0FBRyxHQUFHLENBQUMsU0FBUztJQUN2QixJQUFJLE9BQU8sQ0FBQyxXQUFXLENBQUMsaUJBQWlCLENBQ3JDLG1DQUFtQyxDQUN0QyxDQUFBO0FBQ0wsQ0FBQyxDQUFBIn0= \ No newline at end of file diff --git a/dist/npmci.ssh.d.ts b/dist/npmci.ssh.d.ts index f47163a..2ddaeb5 100644 --- a/dist/npmci.ssh.d.ts +++ b/dist/npmci.ssh.d.ts @@ -1,6 +1,6 @@ /// -import "typings-global"; -import * as plugins from "./npmci.plugins"; +import 'typings-global'; +import * as plugins from './npmci.plugins'; /** * checks for ENV vars in form of NPMCI_SSHKEY_* and deploys any found ones */ diff --git a/dist/npmci.ssh.js b/dist/npmci.ssh.js index 7a92b84..7e2327d 100644 --- a/dist/npmci.ssh.js +++ b/dist/npmci.ssh.js @@ -9,12 +9,12 @@ let sshInstance; exports.ssh = () => { let done = plugins.q.defer(); sshInstance = new plugins.smartssh.SshInstance(); // init ssh instance - plugins.smartparam.forEachMinimatch(process.env, "NPMCI_SSHKEY_*", evaluateSshEnv); + plugins.smartparam.forEachMinimatch(process.env, 'NPMCI_SSHKEY_*', evaluateSshEnv); if (!process.env.NPMTS_TEST) { sshInstance.writeToDisk(); } else { - plugins.beautylog.log("In test mode, so not storing SSH keys to disk!"); + plugins.beautylog.log('In test mode, so not storing SSH keys to disk!'); } ; done.resolve(); @@ -26,18 +26,18 @@ exports.ssh = () => { let evaluateSshEnv = (sshkeyEnvVarArg) => { let resultArray = sshRegex.exec(sshkeyEnvVarArg); let sshKey = new plugins.smartssh.SshKey(); - plugins.beautylog.info("Found SSH identity for " + resultArray[1]); + plugins.beautylog.info('Found SSH identity for ' + resultArray[1]); if (notUndefined(resultArray[1])) { - plugins.beautylog.log("---> host defined!"); + plugins.beautylog.log('---> host defined!'); sshKey.host = resultArray[1]; } if (notUndefined(resultArray[2])) { - plugins.beautylog.log("---> privKey defined!"); + plugins.beautylog.log('---> privKey defined!'); sshKey.privKeyBase64 = resultArray[2]; } ; if (notUndefined(resultArray[3])) { - "---> pubKey defined!"; + '---> pubKey defined!'; sshKey.pubKeyBase64 = resultArray[3]; } ; @@ -47,6 +47,6 @@ let evaluateSshEnv = (sshkeyEnvVarArg) => { * checks if not undefined */ let notUndefined = (stringArg) => { - return (stringArg && stringArg != "undefined" && stringArg != "##"); + return (stringArg && stringArg !== 'undefined' && stringArg !== '##'); }; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnBtY2kuc3NoLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvbnBtY2kuc3NoLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSwwQkFBd0I7QUFDeEIsMkNBQTJDO0FBRTNDLElBQUksUUFBUSxHQUFHLG1CQUFtQixDQUFBO0FBQ2xDLElBQUksV0FBd0MsQ0FBQztBQUU3Qzs7R0FFRztBQUNRLFFBQUEsR0FBRyxHQUFHO0lBQ2IsSUFBSSxJQUFJLEdBQUcsT0FBTyxDQUFDLENBQUMsQ0FBQyxLQUFLLEVBQUUsQ0FBQztJQUM3QixXQUFXLEdBQUcsSUFBSSxPQUFPLENBQUMsUUFBUSxDQUFDLFdBQVcsRUFBRSxDQUFDLENBQUMsb0JBQW9CO0lBQ3RFLE9BQU8sQ0FBQyxVQUFVLENBQUMsZ0JBQWdCLENBQUMsT0FBTyxDQUFDLEdBQUcsRUFBQyxnQkFBZ0IsRUFBQyxjQUFjLENBQUMsQ0FBQztJQUNqRixFQUFFLENBQUEsQ0FBQyxDQUFDLE9BQU8sQ0FBQyxHQUFHLENBQUMsVUFBVSxDQUFDLENBQUEsQ0FBQztRQUN4QixXQUFXLENBQUMsV0FBVyxFQUFFLENBQUM7SUFDOUIs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sWUFBWSxDQUFDLFdBQVcsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQztRQUMvQixPQUFPLENBQUMsU0FBUyxDQUFDLEdBQUcsQ0FBQyx1QkFBdUIsQ0FBQyxDQUFBO1FBQzlDLE1BQU0sQ0FBQyxhQUFhLEdBQUcsV0FBVyxDQUFDLENBQUMsQ0FBQyxDQUFBO0lBQ3pDLENBQUM7SUFBQSxDQUFDO0lBQ0YsRUFBRSxDQUFDLENBQUMsWUFBWSxDQUFDLFdBQVcsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQztRQUMvQixzQkFBc0IsQ0FBQTtRQUN0QixNQUFNLENBQUMsWUFBWSxHQUFHLFdBQVcsQ0FBQyxDQUFDLENBQUMsQ0FBQTtJQUN4QyxDQUFDO0lBQUEsQ0FBQztJQUVGLFdBQVcsQ0FBQyxNQUFNLENBQUMsTUFBTSxDQUFDLENBQUE7QUFDOUIsQ0FBQyxDQUFBO0FBRUQ7O0dBRUc7QUFDSCxJQUFJLFlBQVksR0FBRyxDQUFDLFNBQWlCO0lBQ2pDLE1BQU0sQ0FBQyxDQUFDLFNBQVMsSUFBSSxTQUFTLEtBQUssV0FBVyxJQUFJLFNBQVMsS0FBSyxJQUFJLENBQUMsQ0FBQTtBQUN6RSxDQUFDLENBQUEifQ== \ No newline at end of file diff --git a/dist/npmci.test.d.ts b/dist/npmci.test.d.ts index 8b2b2e8..576719a 100644 --- a/dist/npmci.test.d.ts +++ b/dist/npmci.test.d.ts @@ -1,4 +1,4 @@ /// -import "typings-global"; -import * as plugins from "./npmci.plugins"; +import 'typings-global'; +import * as plugins from './npmci.plugins'; export declare let test: (versionArg: any) => plugins.q.Promise<{}>; diff --git a/dist/npmci.test.js b/dist/npmci.test.js index ef98f94..5c45736 100644 --- a/dist/npmci.test.js +++ b/dist/npmci.test.js @@ -6,7 +6,7 @@ const npmci_install_1 = require("./npmci.install"); const NpmciBuildDocker = require("./npmci.build.docker"); exports.test = (versionArg) => { let done = plugins.q.defer(); - if (versionArg == "docker") { + if (versionArg === 'docker') { testDocker() .then(() => { done.resolve(); @@ -24,15 +24,15 @@ exports.test = (versionArg) => { }; let npmDependencies = function () { let done = plugins.q.defer(); - plugins.beautylog.info("now installing dependencies:"); - npmci_bash_1.bash("npm install"); + plugins.beautylog.info('now installing dependencies:'); + npmci_bash_1.bash('npm install'); done.resolve(); return done.promise; }; let npmTest = () => { let done = plugins.q.defer(); - plugins.beautylog.info("now starting tests:"); - npmci_bash_1.bash("npm test"); + plugins.beautylog.info('now starting tests:'); + npmci_bash_1.bash('npm test'); done.resolve(); return done.promise; }; @@ -44,4 +44,4 @@ let testDocker = function () { .then(done.resolve); return done.promise; }; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnBtY2kudGVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL25wbWNpLnRlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLDBCQUF3QjtBQUN4QiwyQ0FBMkM7QUFDM0MsNkNBQWtDO0FBQ2xDLG1EQUF3QztBQUV4Qyx5REFBeUQ7QUFFOUMsUUFBQSxJQUFJLEdBQUcsQ0FBQyxVQUFVO0lBQ3pCLElBQUksSUFBSSxHQUFHLE9BQU8sQ0FBQyxDQUFDLENBQUMsS0FBSyxFQUFFLENBQUM7SUFDN0IsRUFBRSxDQUFBLENBQUMsVUFBVSxJQUFJLFFBQVEsQ0FBQyxDQUFBLENBQUM7UUFDdkIsVUFBVSxFQUFFO2FBQ1AsSUFBSSxDQUFDO1lBQ0YsSUFBSSxDQUFDLE9BQU8sRUFBRSxDQUFDO1FBQ25CLENBQUMsQ0FBQyxDQUFDO0lBQ1gsQ0FBQztJQUFDLElBQUksQ0FBQyxDQUFDO1FBQ0osdUJBQU8sQ0FBQyxVQUFVLENBQUM7YUFDZCxJQUFJLENBQUMsZ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.trigger.d.ts b/dist/npmci.trigger.d.ts index 41db310..656841e 100644 --- a/dist/npmci.trigger.d.ts +++ b/dist/npmci.trigger.d.ts @@ -1,4 +1,4 @@ /// -import "typings-global"; -import * as plugins from "./npmci.plugins"; +import 'typings-global'; +import * as plugins from './npmci.plugins'; export declare let trigger: () => plugins.q.Promise<{}>; diff --git a/dist/npmci.trigger.js b/dist/npmci.trigger.js index 6ed33b5..f91de82 100644 --- a/dist/npmci.trigger.js +++ b/dist/npmci.trigger.js @@ -4,8 +4,8 @@ const plugins = require("./npmci.plugins"); let triggerValueRegex = /^([a-zA-Z0-9\.]*)\|([a-zA-Z0-9\.]*)\|([a-zA-Z0-9\.]*)\|([a-zA-Z0-9\.]*)\|?([a-zA-Z0-9\.\-\/]*)/; exports.trigger = function () { let done = plugins.q.defer(); - plugins.beautylog.info("now running triggers"); - plugins.smartparam.forEachMinimatch(process.env, "NPMCI_TRIGGER_*", evaluateTrigger); + plugins.beautylog.info('now running triggers'); + plugins.smartparam.forEachMinimatch(process.env, 'NPMCI_TRIGGER_*', evaluateTrigger); done.resolve(); return done.promise; }; @@ -16,14 +16,14 @@ let evaluateTrigger = (triggerEnvVarArg) => { let regexProjectTriggerToken = triggerRegexResultArray[3]; let regexRefName = triggerRegexResultArray[4]; let regexTriggerName; - if (triggerRegexResultArray.length == 6) { + if (triggerRegexResultArray.length === 6) { regexTriggerName = triggerRegexResultArray[5]; } else { - regexTriggerName = "Unnamed Trigger"; + regexTriggerName = 'Unnamed Trigger'; } - plugins.beautylog.info("Found Trigger!"); - plugins.beautylog.log("triggering build for ref " + regexRefName + " of " + regexTriggerName); - plugins.request.post("https://gitlab.com/api/v3/projects/" + regexProjectId + "/trigger/builds", { form: { token: regexProjectTriggerToken, ref: regexRefName } }); + plugins.beautylog.info('Found Trigger!'); + plugins.beautylog.log('triggering build for ref ' + regexRefName + ' of ' + regexTriggerName); + plugins.request.post('https://gitlab.com/api/v3/projects/' + regexProjectId + '/trigger/builds', { form: { token: reg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DLE9BQU8sQ0FBQyxTQUFTLENBQUMsR0FBRyxDQUFDLDJCQUEyQixHQUFHLFlBQVksR0FBRyxNQUFNLEdBQUcsZ0JBQWdCLENBQUMsQ0FBQTtJQUM3RixPQUFPLENBQUMsT0FBTyxDQUFDLElBQUksQ0FBQyxxQ0FBcUMsR0FBRyxjQUFjLEdBQUcsaUJBQWlCLEVBQUUsRUFBRSxJQUFJLEVBQUUsRUFBRSxLQUFLLEVBQUUsd0JBQXdCLEVBQUUsR0FBRyxFQUFFLFlBQVksRUFBRSxFQUFFLENBQUMsQ0FBQTtBQUN0SyxDQUFDLENBQUEifQ== \ No newline at end of file diff --git a/package.json b/package.json index 0411b6a..cc42975 100644 --- a/package.json +++ b/package.json @@ -27,24 +27,26 @@ "typings-test": "^1.0.3" }, "dependencies": { - "@types/lodash": "^4.14.39", - "@types/node": "^6.0.47", + "@types/lodash": "^4.14.40", + "@types/node": "^6.0.51", "@types/q": "0.x.x", "@types/request": "0.x.x", - "@types/shelljs": "^0.3.32", + "@types/shelljs": "^0.3.33", + "@types/through2": "^2.0.32", "beautylog": "^6.0.0", "gulp": "^3.9.1", "gulp-function": "^2.2.0", - "lodash": "^4.17.0", + "lodash": "^4.17.2", + "npmextra": "^2.0.3", "projectinfo": "^1.0.4", "q": "^1.4.1", - "request": "^2.78.0", + "request": "^2.79.0", "shelljs": "^0.7.5", - "smartcli": "^1.0.10", + "smartcli": "^1.0.15", "smartfile": "^4.1.0", "smartparam": "^0.1.1", "smartsocket": "^1.1.7", - "smartssh": "^1.1.5", + "smartssh": "^1.2.1", "smartstring": "^2.0.22", "through2": "^2.0.1", "typings-global": "^1.0.14" diff --git a/test/assets/npmextra.json b/test/assets/npmextra.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/test/assets/npmextra.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/test/test.js b/test/test.js index e7429da..5133764 100644 --- a/test/test.js +++ b/test/test.js @@ -2,7 +2,6 @@ require("typings-test"); const should = require("should"); const path = require("path"); -const beautylog = require("beautylog"); // set up environment process.env.CI_BUILD_REPO = 'https://yyyyyy:xxxxxxxx@gitlab.com/mygroup/myrepo.git'; process.env.NPMCI_SSHKEY_1 = 'hostString|somePrivKey|##'; @@ -10,6 +9,7 @@ process.env.NPMTS_TEST = 'true'; process.cwd = () => { return path.join(__dirname, 'assets/'); }; +// require NPMCI files const NpmciBuildDocker = require("../dist/npmci.build.docker"); const NpmciPublish = require("../dist/npmci.publish"); const NpmciTest = require("../dist/npmci.test"); @@ -36,7 +36,6 @@ describe('NPMCI', function () { it('should sort an array of Dockerfiles', function (done) { NpmciBuildDocker.sortDockerfiles(sortableArray) .then(function (sortedArrayArg) { - beautylog.success('final result'); console.log(sortedArrayArg); done(); }); @@ -87,4 +86,4 @@ describe('NPMCI', function () { }); }); }); -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInRlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLHdCQUFxQjtBQUNyQixpQ0FBZ0M7QUFDaEMsNkJBQTZCO0FBQzdCLHVDQUFzQztBQUV0QyxxQkFBcUI7QUFDckIsT0FBTyxDQUFDLEdBQUcsQ0FBQyxhQUFhLEdBQUcsdURBQXVELENBQUE7QUFDbkYsT0FBTyxDQUFDLEdBQUcsQ0FBQyxjQUFjLEdBQUcsMkJBQTJCLENBQUE7QUFDeEQsT0FBTyxDQUFDLEdBQUcsQ0FBQyxVQUFVLEdBQUcsTUFBTSxDQUFBO0FBQy9CLE9BQU8sQ0FBQyxHQUFHLEdBQUc7SUFDVixNQUFNLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxTQUFTLEVBQUMsU0FBUyxDQUFDLENBQUE7QUFDekMsQ0FBQyxDQUFBO0FBSUQsK0RBQStEO0FBQy9ELHNEQUFzRDtBQUN0RCxnREFBZ0Q7QUFD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Q0FBQyxDQUFDLENBQUE7UUFDVixDQUFDLENBQUMsQ0FBQTtJQUNOLENBQUMsQ0FBQyxDQUFBO0FBQ04sQ0FBQyxDQUFDLENBQUEifQ== \ No newline at end of file diff --git a/test/test.ts b/test/test.ts index 15114e9..cccc5e9 100644 --- a/test/test.ts +++ b/test/test.ts @@ -1,7 +1,6 @@ import 'typings-test' import * as should from 'should' -import path = require('path') -import * as beautylog from 'beautylog' +import * as path from 'path' // set up environment process.env.CI_BUILD_REPO = 'https://yyyyyy:xxxxxxxx@gitlab.com/mygroup/myrepo.git' @@ -12,7 +11,6 @@ process.cwd = () => { } // require NPMCI files -import npmci = require('../dist/index') import NpmciBuildDocker = require('../dist/npmci.build.docker') import NpmciPublish = require('../dist/npmci.publish') import NpmciTest = require('../dist/npmci.test') @@ -44,7 +42,6 @@ describe('NPMCI',function(){ it('should sort an array of Dockerfiles',function(done){ NpmciBuildDocker.sortDockerfiles(sortableArray) .then(function(sortedArrayArg: NpmciBuildDocker.Dockerfile[]){ - beautylog.success('final result') console.log(sortedArrayArg) done() }) diff --git a/ts/index.ts b/ts/index.ts index 3fe83d0..3ba3955 100644 --- a/ts/index.ts +++ b/ts/index.ts @@ -1,89 +1,88 @@ #!/usr/bin/env node -import "typings-global"; -import * as plugins from "./npmci.plugins"; -import * as paths from "./npmci.paths"; -let npmciInfo = new plugins.projectinfo.ProjectinfoNpm(paths.NpmciPackageRoot); -plugins.beautylog.log("npmci version: " + npmciInfo.version); +import 'typings-global' +import * as plugins from './npmci.plugins' +import * as paths from './npmci.paths' +let npmciInfo = new plugins.projectinfo.ProjectinfoNpm(paths.NpmciPackageRoot) +plugins.beautylog.log('npmci version: ' + npmciInfo.version) -import {build} from "./npmci.build" -import {clean} from "./npmci.clean"; -import {command} from "./npmci.command"; -import {install} from "./npmci.install"; -import {publish} from "./npmci.publish"; -import {prepare} from "./npmci.prepare"; -import {test} from "./npmci.test"; -import {trigger} from "./npmci.trigger"; -import * as NpmciEnv from "./npmci.env"; +import {build} from './npmci.build' +import {clean} from './npmci.clean' +import {command} from './npmci.command' +import {install} from './npmci.install' +import {publish} from './npmci.publish' +import {prepare} from './npmci.prepare' +import {test} from './npmci.test' +import {trigger} from './npmci.trigger' +import * as NpmciEnv from './npmci.env' -export {build} from "./npmci.build" -export {install} from "./npmci.install"; -export {publish} from "./npmci.publish"; +export {build} from './npmci.build' +export {install} from './npmci.install'; +export {publish} from './npmci.publish'; - -let smartcli = new plugins.smartcli.Smartcli(); -smartcli.addVersion(npmciInfo.version); +let smartcli = new plugins.smartcli.Smartcli() +smartcli.addVersion(npmciInfo.version) // build smartcli.addCommand({ - commandName:"build" + commandName: 'build' }).then((argv) => { build(argv._[1]) - .then(NpmciEnv.configStore); -}); + .then(NpmciEnv.configStore) +}) // clean smartcli.addCommand({ - commandName:"clean" + commandName: 'clean' }).then((argv) => { clean() - .then(NpmciEnv.configStore); -}); + .then(NpmciEnv.configStore) +}) // command smartcli.addCommand({ - commandName:"command" + commandName: 'command' }).then((argv) => { command() - .then(NpmciEnv.configStore); -}); + .then(NpmciEnv.configStore) +}) // install smartcli.addCommand({ - commandName:"install" + commandName: 'install' }).then((argv) => { install(argv._[1]) - .then(NpmciEnv.configStore); -}); + .then(NpmciEnv.configStore) +}) // prepare smartcli.addCommand({ - commandName:"prepare" + commandName: 'prepare' }).then((argv) => { prepare(argv._[1]) - .then(NpmciEnv.configStore); -}); + .then(NpmciEnv.configStore) +}) // publish smartcli.addCommand({ - commandName:"publish" + commandName: 'publish' }).then((argv) => { publish(argv._[1]) - .then(NpmciEnv.configStore); -}); + .then(NpmciEnv.configStore) +}) // test smartcli.addCommand({ - commandName:"test" + commandName: 'test' }).then((argv) => { test(argv._[1]) - .then(NpmciEnv.configStore); -}); + .then(NpmciEnv.configStore) +}) // trigger smartcli.addCommand({ - commandName:"trigger" + commandName: 'trigger' }).then((argv) => { - trigger(); -}); + trigger() +}) -smartcli.startParse(); \ No newline at end of file +smartcli.startParse() diff --git a/ts/npmci.bash.ts b/ts/npmci.bash.ts index a19f8d2..8ec5791 100644 --- a/ts/npmci.bash.ts +++ b/ts/npmci.bash.ts @@ -1,50 +1,49 @@ -import "typings-global"; -import * as plugins from "./npmci.plugins"; +import 'typings-global' +import * as plugins from './npmci.plugins' - -let nvmSourceString: string = ""; -export let nvmAvailable: boolean = false; +let nvmSourceString: string = '' +export let nvmAvailable: boolean = false let checkNvm = () => { - if (plugins.shelljs.exec(`bash -c "source /usr/local/nvm/nvm.sh"`,{silent:true}).code === 0) { + if (plugins.shelljs.exec(`bash -c "source /usr/local/nvm/nvm.sh"`,{silent: true}).code === 0) { nvmSourceString = `source /usr/local/nvm/nvm.sh && ` - nvmAvailable = true; - } else if (plugins.shelljs.exec(`bash -c "source ~/.nvm/nvm.sh"`,{silent:true}).code === 0) { + nvmAvailable = true + } else if (plugins.shelljs.exec(`bash -c "source ~/.nvm/nvm.sh"`,{silent: true}).code === 0) { nvmSourceString = `source ~/.nvm/nvm.sh && ` - nvmAvailable = true; + nvmAvailable = true }; -}; -checkNvm(); +} +checkNvm() export let bash = (commandArg: string, retryArg = 2, bareArg = false) => { - let exitCode: number; - let stdOut: string; - let execResult; + let exitCode: number + let stdOut: string + let execResult if (!process.env.NPMTS_TEST) { // NPMTS_TEST is used during testing for (let i = 0; i <= retryArg; i++) { if (!bareArg) { execResult = plugins.shelljs.exec( `bash -c "${nvmSourceString} ${commandArg}"` - ); + ) } else { - execResult = plugins.shelljs.exec(commandArg); + execResult = plugins.shelljs.exec(commandArg) } - exitCode = execResult.code; - stdOut = execResult.stdout; - if (exitCode !== 0 && i == retryArg) { - process.exit(1); - } else if (exitCode == 0) { - i = retryArg + 1; // if everything works out ok retrials are not wanted + exitCode = execResult.code + stdOut = execResult.stdout + if (exitCode !== 0 && i === retryArg) { + process.exit(1) + } else if (exitCode === 0) { + i = retryArg + 1 // if everything works out ok retrials are not wanted } else { - plugins.beautylog.warn("Something went wrong! Exit Code: " + exitCode.toString()); - plugins.beautylog.info("Retry " + (i + 1).toString() + " of " + retryArg.toString()); + plugins.beautylog.warn('Something went wrong! Exit Code: ' + exitCode.toString()) + plugins.beautylog.info('Retry ' + (i + 1).toString() + ' of ' + retryArg.toString()) } } } else { - plugins.beautylog.log("ShellExec would be: " + commandArg) + plugins.beautylog.log('ShellExec would be: ' + commandArg) } - return stdOut; + return stdOut } export let bashBare = (commandArg, retryArg = 2) => { - return bash(commandArg, retryArg, true); -} \ No newline at end of file + return bash(commandArg, retryArg, true) +} diff --git a/ts/npmci.build.docker.ts b/ts/npmci.build.docker.ts index 232d4ec..975f25b 100644 --- a/ts/npmci.build.docker.ts +++ b/ts/npmci.build.docker.ts @@ -1,43 +1,43 @@ -import * as plugins from "./npmci.plugins"; -import * as paths from "./npmci.paths"; -import * as NpmciEnv from "./npmci.env"; -import {bashBare} from "./npmci.bash"; +import * as plugins from './npmci.plugins' +import * as paths from './npmci.paths' +import * as NpmciEnv from './npmci.env' +import {bashBare} from './npmci.bash' /** * builds a cwd of Dockerfiles by triggering a promisechain */ export let build = function(){ - let done = plugins.q.defer(); + let done = plugins.q.defer() readDockerfiles() .then(sortDockerfiles) .then(mapDockerfiles) .then(buildDockerfiles) .then(pushDockerfiles) .then(() => { - done.resolve(); - }); - return done.promise; + done.resolve() + }) + return done.promise } /** * creates instance of class Dockerfile for all Dockerfiles in cwd * @returns Promise */ -export let readDockerfiles = function():plugins.q.Promise{ - let done = plugins.q.defer(); - let readDockerfilesArray:Dockerfile[] = [] - plugins.gulp.src("./Dockerfile*") +export let readDockerfiles = function(): plugins.q.Promise{ + let done = plugins.q.defer() + let readDockerfilesArray: Dockerfile[] = [] + plugins.gulp.src('./Dockerfile*') .pipe(plugins.through2.obj(function(file,enc,cb){ let myDockerfile = new Dockerfile({ - filePath:file.path, - read:true - }); - readDockerfilesArray.push(myDockerfile); - cb(null,file); + filePath: file.path, + read: true + }) + readDockerfilesArray.push(myDockerfile) + cb(null,file) },function(){ - done.resolve(readDockerfilesArray); - })); - return done.promise; + done.resolve(readDockerfilesArray) + })) + return done.promise } /** @@ -45,249 +45,249 @@ export let readDockerfiles = function():plugins.q.Promise{ * @param sortableArrayArg an array of instances of class Dockerfile * @returns Promise */ -export let sortDockerfiles = function(sortableArrayArg:Dockerfile[]):plugins.q.Promise{ - let done = plugins.q.defer(); - let sortedArray:Dockerfile[] = []; - let cleanTagsOriginal = cleanTagsArrayFunction(sortableArrayArg,sortedArray); - let sorterFunctionCounter:number = 0; +export let sortDockerfiles = function(sortableArrayArg: Dockerfile[]): plugins.q.Promise{ + let done = plugins.q.defer() + let sortedArray: Dockerfile[] = [] + let cleanTagsOriginal = cleanTagsArrayFunction(sortableArrayArg,sortedArray) + let sorterFunctionCounter: number = 0 let sorterFunction = function(){ - sortableArrayArg.forEach((dockerfileArg)=>{ - let cleanTags = cleanTagsArrayFunction(sortableArrayArg,sortedArray); - if(cleanTags.indexOf(dockerfileArg.baseImage) == -1 && sortedArray.indexOf(dockerfileArg) == -1){ - sortedArray.push(dockerfileArg); + sortableArrayArg.forEach((dockerfileArg) => { + let cleanTags = cleanTagsArrayFunction(sortableArrayArg,sortedArray) + if (cleanTags.indexOf(dockerfileArg.baseImage) === -1 && sortedArray.indexOf(dockerfileArg) === -1) { + sortedArray.push(dockerfileArg) }; - if(cleanTagsOriginal.indexOf(dockerfileArg.baseImage) != -1){ - dockerfileArg.localBaseImageDependent = true; + if (cleanTagsOriginal.indexOf(dockerfileArg.baseImage) !== -1) { + dockerfileArg.localBaseImageDependent = true }; - }); - if(sortableArrayArg.length == sortedArray.length){ - done.resolve(sortedArray); + }) + if (sortableArrayArg.length === sortedArray.length) { + done.resolve(sortedArray) } else if (sorterFunctionCounter < 10) { - sorterFunctionCounter++; - sorterFunction(); + sorterFunctionCounter++ + sorterFunction() }; } - sorterFunction(); - return done.promise; -}; + sorterFunction() + return done.promise +} /** * maps local Dockerfiles dependencies to the correspoding Dockerfile class instances */ -export let mapDockerfiles = function(sortedArray:Dockerfile[]):plugins.q.Promise{ - let done = plugins.q.defer(); +export let mapDockerfiles = function(sortedArray: Dockerfile[]): plugins.q.Promise{ + let done = plugins.q.defer() sortedArray.forEach((dockerfileArg) => { - if(dockerfileArg.localBaseImageDependent){ - sortedArray.forEach((dockfile2:Dockerfile) => { - if(dockfile2.cleanTag == dockerfileArg.baseImage){ - dockerfileArg.localBaseDockerfile = dockfile2; + if (dockerfileArg.localBaseImageDependent) { + sortedArray.forEach((dockfile2: Dockerfile) => { + if (dockfile2.cleanTag === dockerfileArg.baseImage) { + dockerfileArg.localBaseDockerfile = dockfile2 } }) }; - }); - done.resolve(sortedArray); - return done.promise; + }) + done.resolve(sortedArray) + return done.promise } /** * builds the correspoding real docker image for each Dockerfile class instance */ -export let buildDockerfiles = (sortedArrayArg:Dockerfile[]) => { - let done = plugins.q.defer(); +export let buildDockerfiles = (sortedArrayArg: Dockerfile[]) => { + let done = plugins.q.defer() sortedArrayArg.forEach(function(dockerfileArg){ - dockerfileArg.build(); + dockerfileArg.build() }) - done.resolve(sortedArrayArg); - return done.promise; + done.resolve(sortedArrayArg) + return done.promise } /** * pushes the real Dockerfile images to a Docker registry */ -export let pushDockerfiles = function(sortedArrayArg:Dockerfile[]){ - let done = plugins.q.defer(); +export let pushDockerfiles = function(sortedArrayArg: Dockerfile[]){ + let done = plugins.q.defer() sortedArrayArg.forEach(function(dockerfileArg){ - dockerfileArg.push(NpmciEnv.buildStage); - }); - done.resolve(sortedArrayArg); - return done.promise; + dockerfileArg.push(NpmciEnv.buildStage) + }) + done.resolve(sortedArrayArg) + return done.promise } /** * pulls corresponding real Docker images for instances of Dockerfile from a registry. * This is needed if building, testing, and publishing of Docker images is carried out in seperate CI stages. */ -export let pullDockerfileImages = (sortableArrayArg:Dockerfile[],registryArg = "registry.gitlab.com") => { - let done = plugins.q.defer(); +export let pullDockerfileImages = (sortableArrayArg: Dockerfile[],registryArg = 'registry.gitlab.com') => { + let done = plugins.q.defer() sortableArrayArg.forEach((dockerfileArg) => { - dockerfileArg.pull(registryArg); - }); - done.resolve(sortableArrayArg); - return done.promise; + dockerfileArg.pull(registryArg) + }) + done.resolve(sortableArrayArg) + return done.promise } /** * tests all Dockerfiles in by calling class Dockerfile.test(); * @param sortedArrayArg Dockerfile[] that contains all Dockerfiles in cwd */ -export let testDockerfiles = (sortedArrayArg:Dockerfile[]) => { - let done = plugins.q.defer(); +export let testDockerfiles = (sortedArrayArg: Dockerfile[]) => { + let done = plugins.q.defer() sortedArrayArg.forEach(function(dockerfileArg){ - dockerfileArg.test(); - }); - done.resolve(sortedArrayArg); - return done.promise; -}; + dockerfileArg.test() + }) + done.resolve(sortedArrayArg) + return done.promise +} /** * class Dockerfile represents a Dockerfile on disk in npmci */ export class Dockerfile { - filePath:string; - repo:string; - version:string; - cleanTag:string; - buildTag:string; - testTag:string; - releaseTag:string; - containerName:string - content:string; - baseImage:string; - localBaseImageDependent:boolean; - localBaseDockerfile:Dockerfile; - constructor(options:{filePath?:string,fileContents?:string|Buffer,read?:boolean}){ - this.filePath = options.filePath; - this.repo = NpmciEnv.repo.user + "/" + NpmciEnv.repo.repo; - this.version = dockerFileVersion(plugins.path.parse(options.filePath).base); - this.cleanTag = this.repo + ":" + this.version; - this.buildTag = this.cleanTag; - this.testTag = dockerTag("registry.gitlab.com",this.repo,this.version,"test"); - this.releaseTag = dockerTag(NpmciEnv.dockerRegistry,this.repo,this.version); - this.containerName = "dockerfile-" + this.version; - if(options.filePath && options.read){ - this.content = plugins.smartfile.fs.toStringSync(plugins.path.resolve(options.filePath)); + filePath: string + repo: string + version: string + cleanTag: string + buildTag: string + testTag: string + releaseTag: string + containerName: string + content: string + baseImage: string + localBaseImageDependent: boolean + localBaseDockerfile: Dockerfile + constructor(options: {filePath?: string,fileContents?: string|Buffer,read?: boolean}) { + this.filePath = options.filePath + this.repo = NpmciEnv.repo.user + '/' + NpmciEnv.repo.repo + this.version = dockerFileVersion(plugins.path.parse(options.filePath).base) + this.cleanTag = this.repo + ':' + this.version + this.buildTag = this.cleanTag + this.testTag = dockerTag('registry.gitlab.com',this.repo,this.version,'test') + this.releaseTag = dockerTag(NpmciEnv.dockerRegistry,this.repo,this.version) + this.containerName = 'dockerfile-' + this.version + if (options.filePath && options.read) { + this.content = plugins.smartfile.fs.toStringSync(plugins.path.resolve(options.filePath)) }; - this.baseImage = dockerBaseImage(this.content); - this.localBaseImageDependent = false; + this.baseImage = dockerBaseImage(this.content) + this.localBaseImageDependent = false }; /** * builds the Dockerfile */ - build(){ - let done = plugins.q.defer(); - plugins.beautylog.info("now building Dockerfile for " + this.cleanTag); - bashBare("docker build -t " + this.buildTag + " -f " + this.filePath + " ."); - NpmciEnv.dockerFilesBuilt.push(this); - done.resolve(); - return done.promise; + build() { + let done = plugins.q.defer() + plugins.beautylog.info('now building Dockerfile for ' + this.cleanTag) + bashBare('docker build -t ' + this.buildTag + ' -f ' + this.filePath + ' .') + NpmciEnv.dockerFilesBuilt.push(this) + done.resolve() + return done.promise }; /** * pushes the Dockerfile to a registry */ - push(stageArg){ - let done = plugins.q.defer(); - let pushTag; - switch (stageArg){ - case "release": - pushTag = this.releaseTag; - break; - case "test": + push(stageArg) { + let done = plugins.q.defer() + let pushTag + switch (stageArg) { + case 'release': + pushTag = this.releaseTag + break + case 'test': default: - pushTag = this.testTag; - break; + pushTag = this.testTag + break } - bashBare("docker tag " + this.buildTag + " " + pushTag); - bashBare("docker push " + pushTag); - done.resolve(); - return done.promise; + bashBare('docker tag ' + this.buildTag + ' ' + pushTag) + bashBare('docker push ' + pushTag) + done.resolve() + return done.promise }; /** * pulls the Dockerfile from a registry */ - pull(registryArg:string){ - let pullTag = this.testTag; - bashBare("docker pull " + pullTag); - bashBare("docker tag " + pullTag + " " + this.buildTag); + pull(registryArg: string) { + let pullTag = this.testTag + bashBare('docker pull ' + pullTag) + bashBare('docker tag ' + pullTag + ' ' + this.buildTag) }; /** * tests the Dockerfile; */ - test(){ - let testFile:string = plugins.path.join(paths.NpmciTestDir,"test_" + this.version + ".sh"); - let testFileExists:boolean = plugins.smartfile.fs.fileExistsSync(testFile); - if(testFileExists){ - bashBare("docker run --name npmci_test_container " + this.buildTag + " mkdir /npmci_test"); - bashBare("docker cp " + testFile + " npmci_test_container:/npmci_test/test.sh"); - bashBare("docker commit npmci_test_container npmci_test_image"); - bashBare("docker run npmci_test_image sh /npmci_test/test.sh"); - bashBare("docker rm npmci_test_container"); - bashBare("docker rmi --force npmci_test_image"); + test() { + let testFile: string = plugins.path.join(paths.NpmciTestDir,'test_' + this.version + '.sh') + let testFileExists: boolean = plugins.smartfile.fs.fileExistsSync(testFile) + if (testFileExists) { + bashBare('docker run --name npmci_test_container ' + this.buildTag + ' mkdir /npmci_test') + bashBare('docker cp ' + testFile + ' npmci_test_container:/npmci_test/test.sh') + bashBare('docker commit npmci_test_container npmci_test_image') + bashBare('docker run npmci_test_image sh /npmci_test/test.sh') + bashBare('docker rm npmci_test_container') + bashBare('docker rmi --force npmci_test_image') } else { - plugins.beautylog.warn("skipping tests for " + this.cleanTag + " because no testfile was found!"); + plugins.beautylog.warn('skipping tests for ' + this.cleanTag + ' because no testfile was found!') } }; /** * gets the id of a Dockerfile */ - getId(){ - let containerId = bashBare("docker inspect --type=image --format=\"{{.Id}}\" " + this.buildTag); - return containerId; + getId() { + let containerId = bashBare('docker inspect --type=image --format=\"{{.Id}}\" ' + this.buildTag) + return containerId }; } /** * */ -export let dockerFileVersion = function(dockerfileNameArg:string):string{ - let versionString:string; - let versionRegex = /Dockerfile_([a-zA-Z0-9\.]*)$/; - let regexResultArray = versionRegex.exec(dockerfileNameArg); - if(regexResultArray && regexResultArray.length == 2){ - versionString = regexResultArray[1]; +export let dockerFileVersion = function(dockerfileNameArg: string): string{ + let versionString: string + let versionRegex = /Dockerfile_([a-zA-Z0-9\.]*)$/ + let regexResultArray = versionRegex.exec(dockerfileNameArg) + if (regexResultArray && regexResultArray.length === 2) { + versionString = regexResultArray[1] } else { - versionString = "latest"; + versionString = 'latest' } - return versionString; + return versionString } /** * */ -export let dockerBaseImage = function(dockerfileContentArg:string){ +export let dockerBaseImage = function(dockerfileContentArg: string){ let baseImageRegex = /FROM\s([a-zA-z0-9\/\-\:]*)\n?/ let regexResultArray = baseImageRegex.exec(dockerfileContentArg) - return regexResultArray[1]; + return regexResultArray[1] } /** * */ -export let dockerTag = function(registryArg:string,repoArg:string,versionArg:string,suffixArg?:string):string{ - let tagString:string; - let registry = registryArg; - let repo = repoArg; - let version = versionArg; - if(suffixArg){ - version = versionArg + "_" + suffixArg; +export let dockerTag = function(registryArg: string,repoArg: string,versionArg: string,suffixArg?: string): string{ + let tagString: string + let registry = registryArg + let repo = repoArg + let version = versionArg + if (suffixArg) { + version = versionArg + '_' + suffixArg }; - tagString = registry + "/" + repo + ":" + version; - return tagString; -}; + tagString = registry + '/' + repo + ':' + version + return tagString +} /** * */ -export let cleanTagsArrayFunction = function(dockerfileArrayArg:Dockerfile[],trackingArrayArg:Dockerfile[]):string[]{ - let cleanTagsArray:string[] = []; +export let cleanTagsArrayFunction = function(dockerfileArrayArg: Dockerfile[],trackingArrayArg: Dockerfile[]): string[]{ + let cleanTagsArray: string[] = [] dockerfileArrayArg.forEach(function(dockerfileArg){ - if(trackingArrayArg.indexOf(dockerfileArg) == -1){ - cleanTagsArray.push(dockerfileArg.cleanTag); + if (trackingArrayArg.indexOf(dockerfileArg) === -1) { + cleanTagsArray.push(dockerfileArg.cleanTag) } - }); - return cleanTagsArray; -} \ No newline at end of file + }) + return cleanTagsArray +} diff --git a/ts/npmci.build.ts b/ts/npmci.build.ts index 451ad41..559e05d 100644 --- a/ts/npmci.build.ts +++ b/ts/npmci.build.ts @@ -1,26 +1,23 @@ -import "typings-global"; -import * as plugins from "./npmci.plugins"; -import {bash} from "./npmci.bash"; -import * as env from "./npmci.env"; -import * as buildDocker from "./npmci.build.docker" +import 'typings-global' +import * as plugins from './npmci.plugins' +import {bash} from './npmci.bash' +import * as env from './npmci.env' +import * as buildDocker from './npmci.build.docker' /** * defines possible build services */ -export type TBuildService = "docker"; +export type TBuildService = 'docker'; /** * builds for a specific service */ -export let build = function(commandArg):plugins.q.Promise { - switch(commandArg){ - case "docker": - return buildDocker.build(); +export let build = function(commandArg): plugins.q.Promise { + switch (commandArg) { + case 'docker': + return buildDocker.build() default: - plugins.beautylog.log("build target " + commandArg + " not recognised!"); + plugins.beautylog.log('build target ' + commandArg + ' not recognised!') }; - return; + return } - - - diff --git a/ts/npmci.config.ts b/ts/npmci.config.ts new file mode 100644 index 0000000..72ab66e --- /dev/null +++ b/ts/npmci.config.ts @@ -0,0 +1,20 @@ +import * as q from 'q' + +import * as plugins from './npmci.plugins' +import * as paths from './npmci.paths' + +export interface INpmciOptions { + globalNpmTools: string[] +} + +export let getConfig = () => { + console.log('getting config') + let done = q.defer() + let npmciNpmextra = new plugins.npmextra.Npmextra(paths.cwd) + let defaultConfig: INpmciOptions = { + globalNpmTools: [] + } + let npmciConfig = npmciNpmextra.dataFor('npmci', defaultConfig) + done.resolve(npmciConfig) + return done.promise +} diff --git a/ts/npmci.install.ts b/ts/npmci.install.ts index 610fda6..b9e3a14 100644 --- a/ts/npmci.install.ts +++ b/ts/npmci.install.ts @@ -1,8 +1,8 @@ -import 'typings-global'; -import * as plugins from './npmci.plugins'; -import { bash } from './npmci.bash'; +import 'typings-global' +import * as plugins from './npmci.plugins' +import * as configModule from './npmci.config' +import { bash } from './npmci.bash' import { nvmAvailable } from './npmci.bash' - export let install = (versionArg) => { let done = plugins.q.defer() plugins.beautylog.log(`now installing node version ${versionArg}`) @@ -24,6 +24,15 @@ export let install = (versionArg) => { }; bash('node -v') bash('npm -v') - done.resolve() + + // lets look for further config + configModule.getConfig() + .then(config => { + for (let npmTool of config.globalNpmTools) { + plugins.beautylog.info(`globally installing ${npmTool} from npm`) + bash(`npm install --loglevel=silent -g ${npmTool}`) + } + done.resolve() + }) return done.promise -} \ No newline at end of file +} diff --git a/ts/npmci.paths.ts b/ts/npmci.paths.ts index 3efb837..bbfafe9 100644 --- a/ts/npmci.paths.ts +++ b/ts/npmci.paths.ts @@ -1,9 +1,9 @@ -import "typings-global"; -import * as plugins from "./npmci.plugins"; +import 'typings-global' +import * as plugins from './npmci.plugins' -export let cwd = process.cwd(); +export let cwd = process.cwd() -export let NpmciPackageRoot = plugins.path.join(__dirname,"../"); -export let NpmciPackageConfig = plugins.path.join(NpmciPackageRoot,"./config.json"); -export let NpmciProjectDir = cwd; -export let NpmciTestDir = plugins.path.join(cwd,"./test"); \ No newline at end of file +export let NpmciPackageRoot = plugins.path.join(__dirname,'../') +export let NpmciPackageConfig = plugins.path.join(NpmciPackageRoot,'./config.json') +export let NpmciProjectDir = cwd +export let NpmciTestDir = plugins.path.join(cwd,'./test') diff --git a/ts/npmci.plugins.ts b/ts/npmci.plugins.ts index f32d00d..c38e14c 100644 --- a/ts/npmci.plugins.ts +++ b/ts/npmci.plugins.ts @@ -1,17 +1,18 @@ -import "typings-global"; -export import beautylog = require("beautylog"); -export let gulp = require("gulp"); -export let gulpFunction = require("gulp-function"); -export let lodash = require("lodash"); -export import path = require("path"); -export import projectinfo = require("projectinfo"); -export import q = require("q"); -export let request = require("request"); -export import shelljs = require("shelljs"); -export import smartcli = require("smartcli"); -export import smartfile = require("smartfile"); -export import smartparam = require("smartparam"); -export import smartsocket = require("smartsocket"); -export import smartssh = require("smartssh"); -export import smartstring = require("smartstring"); -export let through2 = require("through2"); \ No newline at end of file +import 'typings-global' +export import beautylog = require('beautylog') +export let gulp = require('gulp') +export import gulpFunction = require('gulp-function') +export import lodash = require('lodash') +export import npmextra = require('npmextra') +export import path = require('path') +export import projectinfo = require('projectinfo') +export import q = require('q') +export let request = require('request') +export import shelljs = require('shelljs') +export import smartcli = require('smartcli') +export import smartfile = require('smartfile') +export import smartparam = require('smartparam') +export import smartsocket = require('smartsocket') +export import smartssh = require('smartssh') +export import smartstring = require('smartstring') +export import through2 = require('through2') diff --git a/ts/npmci.prepare.ts b/ts/npmci.prepare.ts index 4c67ab6..e0f270a 100644 --- a/ts/npmci.prepare.ts +++ b/ts/npmci.prepare.ts @@ -1,94 +1,94 @@ -import "typings-global"; -import * as plugins from "./npmci.plugins"; -import {bash} from "./npmci.bash"; -import * as env from "./npmci.env" -import * as sshModule from "./npmci.ssh" +import 'typings-global' +import * as plugins from './npmci.plugins' +import {bash} from './npmci.bash' +import * as env from './npmci.env' +import * as sshModule from './npmci.ssh' -//types +// types /** * defines possible prepare services */ -export type TPrepService = "npm" | "docker" | "docker-gitlab" | "ssh"; +export type TPrepService = 'npm' | 'docker' | 'docker-gitlab' | 'ssh'; /** * authenticates npm with token from env var */ let npm = function(){ - let done = plugins.q.defer(); - - let npmrcPrefix:string = "//registry.npmjs.org/:_authToken="; - let npmToken:string = process.env.NPMCI_TOKEN_NPM; - let npmrcFileString = npmrcPrefix + npmToken; - - if(npmToken){ - plugins.beautylog.info("found access token"); + let done = plugins.q.defer() + + let npmrcPrefix: string = '//registry.npmjs.org/:_authToken=' + let npmToken: string = process.env.NPMCI_TOKEN_NPM + let npmrcFileString = npmrcPrefix + npmToken + + if (npmToken) { + plugins.beautylog.info('found access token') } else { - plugins.beautylog.error("no access token found! Exiting!"); - process.exit(1); + plugins.beautylog.error('no access token found! Exiting!') + process.exit(1) } - plugins.smartfile.memory.toFsSync(npmrcFileString,"/root/.npmrc"); - done.resolve(); - return done.promise; -}; + plugins.smartfile.memory.toFsSync(npmrcFileString,'/root/.npmrc') + done.resolve() + return done.promise +} /** * logs in docker */ let docker = function(){ - let done = plugins.q.defer(); - env.setDockerRegistry("docker.io"); + let done = plugins.q.defer() + env.setDockerRegistry('docker.io') let dockerRegex = /^([a-zA-Z0-9\.]*)\|([a-zA-Z0-9\.]*)/ - if(!process.env.NPMCI_LOGIN_DOCKER){ - plugins.beautylog.error("You have to specify Login Data to the Docker Registry"); - process.exit(1); + if (!process.env.NPMCI_LOGIN_DOCKER) { + plugins.beautylog.error('You have to specify Login Data to the Docker Registry') + process.exit(1) } - plugins.shelljs.exec("docker login -u gitlab-ci-token -p " + process.env.CI_BUILD_TOKEN + " " + "registry.gitlab.com"); // Always also login to GitLab Registry - let dockerRegexResultArray = dockerRegex.exec(process.env.NPMCI_LOGIN_DOCKER); - let username = dockerRegexResultArray[1]; - let password = dockerRegexResultArray[2]; - plugins.shelljs.exec("docker login -u " + username + " -p " + password); - done.resolve(); - return done.promise; + plugins.shelljs.exec('docker login -u gitlab-ci-token -p ' + process.env.CI_BUILD_TOKEN + ' ' + 'registry.gitlab.com') // Always also login to GitLab Registry + let dockerRegexResultArray = dockerRegex.exec(process.env.NPMCI_LOGIN_DOCKER) + let username = dockerRegexResultArray[1] + let password = dockerRegexResultArray[2] + plugins.shelljs.exec('docker login -u ' + username + ' -p ' + password) + done.resolve() + return done.promise } /** * prepare docker for gitlab registry */ let dockerGitlab = function(){ - let done = plugins.q.defer(); - env.setDockerRegistry("registry.gitlab.com"); - plugins.shelljs.exec("docker login -u gitlab-ci-token -p " + process.env.CI_BUILD_TOKEN + " " + "registry.gitlab.com"); - done.resolve(); - return done.promise; + let done = plugins.q.defer() + env.setDockerRegistry('registry.gitlab.com') + plugins.shelljs.exec('docker login -u gitlab-ci-token -p ' + process.env.CI_BUILD_TOKEN + ' ' + 'registry.gitlab.com') + done.resolve() + return done.promise } /** * prepare ssh */ let ssh = function(){ - let done = plugins.q.defer(); + let done = plugins.q.defer() sshModule.ssh() - .then(done.resolve); - return done.promise; -}; + .then(done.resolve) + return done.promise +} /** * the main exported prepare function * @param servieArg describes the service to prepare */ -export let prepare = function(serviceArg:TPrepService){ +export let prepare = function(serviceArg: TPrepService){ switch (serviceArg) { - case "npm": - return npm(); - case "docker": - return docker(); - case "docker-gitlab": - return dockerGitlab(); - case "ssh": - return ssh(); + case 'npm': + return npm() + case 'docker': + return docker() + case 'docker-gitlab': + return dockerGitlab() + case 'ssh': + return ssh() default: - break; + break } -} \ No newline at end of file +} diff --git a/ts/npmci.publish.ts b/ts/npmci.publish.ts index ecc7614..c44ee2f 100644 --- a/ts/npmci.publish.ts +++ b/ts/npmci.publish.ts @@ -1,50 +1,50 @@ -import "typings-global"; -import * as plugins from "./npmci.plugins"; -import {prepare} from "./npmci.prepare"; -import {bash} from "./npmci.bash"; -import * as NpmciEnv from "./npmci.env"; -import * as NpmciBuildDocker from "./npmci.build.docker" +import 'typings-global' +import * as plugins from './npmci.plugins' +import {prepare} from './npmci.prepare' +import {bash} from './npmci.bash' +import * as NpmciEnv from './npmci.env' +import * as NpmciBuildDocker from './npmci.build.docker' /** * type of supported services */ -export type TPubService = "npm" | "docker"; +export type TPubService = 'npm' | 'docker'; /** * the main exported publish function. * @param pubServiceArg references targeted service to publish to */ -export let publish = (pubServiceArg:TPubService = "npm") => { - switch (pubServiceArg){ - case "npm": - return publishNpm(); - case "docker": - return publishDocker(); +export let publish = (pubServiceArg: TPubService = 'npm') => { + switch (pubServiceArg) { + case 'npm': + return publishNpm() + case 'docker': + return publishDocker() } -}; +} /** * tries to publish current cwd to NPM registry */ let publishNpm = function(){ - let done = plugins.q.defer(); - prepare("npm") + let done = plugins.q.defer() + prepare('npm') .then(function(){ - bash("npm publish"); - plugins.beautylog.ok("Done!") ; - done.resolve(); - }); - return done.promise; + bash('npm publish') + plugins.beautylog.ok('Done!') + done.resolve() + }) + return done.promise } /** * tries to pubish current cwd to Docker registry */ let publishDocker = function(){ - let done = plugins.q.defer(); + let done = plugins.q.defer() NpmciBuildDocker.readDockerfiles() .then(NpmciBuildDocker.pullDockerfileImages) .then(NpmciBuildDocker.pushDockerfiles) - .then(done.resolve); - return done.promise; -}; \ No newline at end of file + .then(done.resolve) + return done.promise +} diff --git a/ts/npmci.servezone.ts b/ts/npmci.servezone.ts index d681a81..99d5b69 100644 --- a/ts/npmci.servezone.ts +++ b/ts/npmci.servezone.ts @@ -1,26 +1,26 @@ -import * as plugins from "./npmci.plugins"; +import * as plugins from './npmci.plugins' /** * servezoneRegex is the regex that parses the servezone connection data * parses strings in the form of "servezone.example.com|3000|somepassword" */ -let servezoneRegex = /^(.*)\|(.*)\|(.*)/; +let servezoneRegex = /^(.*)\|(.*)\|(.*)/ /** * holds the results of the parsed servezone env string */ -let servezoneRegexResultArray = servezoneRegex.exec(process.env.NPMCI_SERVEZONE); +let servezoneRegexResultArray = servezoneRegex.exec(process.env.NPMCI_SERVEZONE) /** * the data object that is used for the smartsocket client object */ let smartsocketClientConstructorOptions = { - alias: "npmci", + alias: 'npmci', password: servezoneRegexResultArray[3], port: parseInt(servezoneRegexResultArray[2]), - role: "ci", + role: 'ci', url: servezoneRegexResultArray[1] -}; +} /** * the main run function to submit a service to a servezone @@ -28,5 +28,5 @@ let smartsocketClientConstructorOptions = { export let run = (configArg) => { new plugins.smartsocket.SmartsocketClient( smartsocketClientConstructorOptions - ); -}; \ No newline at end of file + ) +} diff --git a/ts/npmci.ssh.ts b/ts/npmci.ssh.ts index ad9f210..f276604 100644 --- a/ts/npmci.ssh.ts +++ b/ts/npmci.ssh.ts @@ -1,51 +1,51 @@ -import "typings-global"; -import * as plugins from "./npmci.plugins"; +import 'typings-global' +import * as plugins from './npmci.plugins' let sshRegex = /^(.*)\|(.*)\|(.*)/ -let sshInstance:plugins.smartssh.SshInstance; +let sshInstance: plugins.smartssh.SshInstance /** * checks for ENV vars in form of NPMCI_SSHKEY_* and deploys any found ones */ export let ssh = () => { - let done = plugins.q.defer(); - sshInstance = new plugins.smartssh.SshInstance(); // init ssh instance - plugins.smartparam.forEachMinimatch(process.env,"NPMCI_SSHKEY_*",evaluateSshEnv); - if(!process.env.NPMTS_TEST){ - sshInstance.writeToDisk(); + let done = plugins.q.defer() + sshInstance = new plugins.smartssh.SshInstance() // init ssh instance + plugins.smartparam.forEachMinimatch(process.env,'NPMCI_SSHKEY_*',evaluateSshEnv) + if (!process.env.NPMTS_TEST) { + sshInstance.writeToDisk() } else { - plugins.beautylog.log("In test mode, so not storing SSH keys to disk!"); + plugins.beautylog.log('In test mode, so not storing SSH keys to disk!') }; - done.resolve(); - return done.promise; -}; + done.resolve() + return done.promise +} /** * gets called for each found SSH ENV Var and deploys it */ let evaluateSshEnv = (sshkeyEnvVarArg) => { - let resultArray = sshRegex.exec(sshkeyEnvVarArg); - let sshKey = new plugins.smartssh.SshKey(); - plugins.beautylog.info("Found SSH identity for " + resultArray[1]); - if(notUndefined(resultArray[1])){ - plugins.beautylog.log("---> host defined!") - sshKey.host = resultArray[1]; + let resultArray = sshRegex.exec(sshkeyEnvVarArg) + let sshKey = new plugins.smartssh.SshKey() + plugins.beautylog.info('Found SSH identity for ' + resultArray[1]) + if (notUndefined(resultArray[1])) { + plugins.beautylog.log('---> host defined!') + sshKey.host = resultArray[1] } - if(notUndefined(resultArray[2])){ - plugins.beautylog.log("---> privKey defined!") - sshKey.privKeyBase64 = resultArray[2]; + if (notUndefined(resultArray[2])) { + plugins.beautylog.log('---> privKey defined!') + sshKey.privKeyBase64 = resultArray[2] }; - if(notUndefined(resultArray[3])){ - "---> pubKey defined!" - sshKey.pubKeyBase64 = resultArray[3]; + if (notUndefined(resultArray[3])) { + '---> pubKey defined!' + sshKey.pubKeyBase64 = resultArray[3] }; - - sshInstance.addKey(sshKey); -}; + + sshInstance.addKey(sshKey) +} /** * checks if not undefined */ -let notUndefined = (stringArg:string) => { - return (stringArg && stringArg != "undefined" && stringArg != "##"); -} \ No newline at end of file +let notUndefined = (stringArg: string) => { + return (stringArg && stringArg !== 'undefined' && stringArg !== '##') +} diff --git a/ts/npmci.test.ts b/ts/npmci.test.ts index 75d83b2..1439ef8 100644 --- a/ts/npmci.test.ts +++ b/ts/npmci.test.ts @@ -1,50 +1,50 @@ -import "typings-global"; -import * as plugins from "./npmci.plugins"; -import {bash} from "./npmci.bash"; -import {install} from "./npmci.install"; -import * as env from "./npmci.env"; -import * as NpmciBuildDocker from "./npmci.build.docker"; +import 'typings-global' +import * as plugins from './npmci.plugins' +import {bash} from './npmci.bash' +import {install} from './npmci.install' +import * as env from './npmci.env' +import * as NpmciBuildDocker from './npmci.build.docker' export let test = (versionArg) => { - let done = plugins.q.defer(); - if(versionArg == "docker"){ + let done = plugins.q.defer() + if (versionArg === 'docker') { testDocker() - .then(()=>{ - done.resolve(); - }); + .then(() => { + done.resolve() + }) } else { install(versionArg) .then(npmDependencies) .then(npmTest) - .then(()=>{ - done.resolve(); - }); + .then(() => { + done.resolve() + }) } - return done.promise; + return done.promise } let npmDependencies = function(){ - let done = plugins.q.defer(); - plugins.beautylog.info("now installing dependencies:"); - bash("npm install"); - done.resolve(); - return done.promise; + let done = plugins.q.defer() + plugins.beautylog.info('now installing dependencies:') + bash('npm install') + done.resolve() + return done.promise } let npmTest = () => { - let done = plugins.q.defer(); - plugins.beautylog.info("now starting tests:"); - bash("npm test"); - done.resolve(); - return done.promise; + let done = plugins.q.defer() + plugins.beautylog.info('now starting tests:') + bash('npm test') + done.resolve() + return done.promise } let testDocker = function(){ - let done = plugins.q.defer(); + let done = plugins.q.defer() NpmciBuildDocker.readDockerfiles() .then(NpmciBuildDocker.pullDockerfileImages) .then(NpmciBuildDocker.testDockerfiles) .then(done.resolve) - return done.promise; + return done.promise } diff --git a/ts/npmci.trigger.ts b/ts/npmci.trigger.ts index afa5a34..233eb31 100644 --- a/ts/npmci.trigger.ts +++ b/ts/npmci.trigger.ts @@ -1,32 +1,31 @@ -import "typings-global"; -import * as plugins from "./npmci.plugins"; -import {prepare} from "./npmci.prepare"; -import {bash} from "./npmci.bash"; +import 'typings-global' +import * as plugins from './npmci.plugins' +import { prepare } from './npmci.prepare' +import { bash } from './npmci.bash' - -let triggerValueRegex = /^([a-zA-Z0-9\.]*)\|([a-zA-Z0-9\.]*)\|([a-zA-Z0-9\.]*)\|([a-zA-Z0-9\.]*)\|?([a-zA-Z0-9\.\-\/]*)/; +let triggerValueRegex = /^([a-zA-Z0-9\.]*)\|([a-zA-Z0-9\.]*)\|([a-zA-Z0-9\.]*)\|([a-zA-Z0-9\.]*)\|?([a-zA-Z0-9\.\-\/]*)/ export let trigger = function () { - let done = plugins.q.defer(); - plugins.beautylog.info("now running triggers"); - plugins.smartparam.forEachMinimatch(process.env, "NPMCI_TRIGGER_*", evaluateTrigger); - done.resolve(); - return done.promise; + let done = plugins.q.defer() + plugins.beautylog.info('now running triggers') + plugins.smartparam.forEachMinimatch(process.env, 'NPMCI_TRIGGER_*', evaluateTrigger) + done.resolve() + return done.promise } let evaluateTrigger = (triggerEnvVarArg) => { - let triggerRegexResultArray = triggerValueRegex.exec(triggerEnvVarArg); - let regexDomain = triggerRegexResultArray[1]; - let regexProjectId = triggerRegexResultArray[2]; - let regexProjectTriggerToken = triggerRegexResultArray[3]; - let regexRefName = triggerRegexResultArray[4]; - let regexTriggerName; - if (triggerRegexResultArray.length == 6) { - regexTriggerName = triggerRegexResultArray[5]; + let triggerRegexResultArray = triggerValueRegex.exec(triggerEnvVarArg) + let regexDomain = triggerRegexResultArray[1] + let regexProjectId = triggerRegexResultArray[2] + let regexProjectTriggerToken = triggerRegexResultArray[3] + let regexRefName = triggerRegexResultArray[4] + let regexTriggerName + if (triggerRegexResultArray.length === 6) { + regexTriggerName = triggerRegexResultArray[5] } else { - regexTriggerName = "Unnamed Trigger"; + regexTriggerName = 'Unnamed Trigger' } - plugins.beautylog.info("Found Trigger!"); - plugins.beautylog.log("triggering build for ref " + regexRefName + " of " + regexTriggerName); - plugins.request.post("https://gitlab.com/api/v3/projects/" + regexProjectId + "/trigger/builds", { form: { token: regexProjectTriggerToken, ref: regexRefName } }); -} \ No newline at end of file + plugins.beautylog.info('Found Trigger!') + plugins.beautylog.log('triggering build for ref ' + regexRefName + ' of ' + regexTriggerName) + plugins.request.post('https://gitlab.com/api/v3/projects/' + regexProjectId + '/trigger/builds', { form: { token: regexProjectTriggerToken, ref: regexRefName } }) +}