From 6a0e74690db9cb80c12607287fc2d8b37e7d725d Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Fri, 3 Jun 2016 16:27:12 +0200 Subject: [PATCH] compile --- dist/npmci.build.js | 25 ++----------------------- dist/npmci.env.d.ts | 5 +++++ dist/npmci.env.js | 20 +++++++++++++++++++- dist/npmci.prepare.js | 5 ++++- dist/npmci.publish.js | 19 ++++++------------- 5 files changed, 36 insertions(+), 38 deletions(-) diff --git a/dist/npmci.build.js b/dist/npmci.build.js index 19e5b08..c9d3621 100644 --- a/dist/npmci.build.js +++ b/dist/npmci.build.js @@ -6,34 +6,13 @@ exports.build = function (commandArg) { switch (commandArg) { case "docker": return docker(); - case "docker-gitlab": - return dockerGitlab(); - default: - break; } }; var docker = function () { var done = plugins.q.defer(); - plugins.shelljs.exec("docker build -t " + env.repo.user + "/" + env.repo.repo + ":latest ."); + plugins.shelljs.exec("docker build -t " + env.dockerTag()); done.resolve(); return done.promise; }; -var dockerGitlab = function () { - var done = plugins.q.defer(); - var repo = new plugins.smartstring.GitRepo(process.env.CI_BUILD_REPO); - var dockerTag = "registry.gitlab.com/" + env.repo.user + "/" + env.repo.repo + ":" + dockerTagVersion() + " ."; - plugins.beautylog.info("now building docker image with tag " + dockerTag); - plugins.shelljs.exec("docker build -t " + dockerTag); - done.resolve(); - return done.promise; -}; -var dockerTagVersion = function () { - if (process.env.CI_BUILD_STAGE == "test") { - return "test"; - } - else { - return "latest"; - } -}; -//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5wbWNpLmJ1aWxkLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxRQUFPLGdCQUFnQixDQUFDLENBQUE7QUFDeEIsSUFBWSxPQUFPLFdBQU0saUJBQWlCLENBQUMsQ0FBQTtBQUUzQyxJQUFZLEdBQUcsV0FBTSxhQUFhLENBQUMsQ0FBQTtBQUV4QixhQUFLLEdBQUcsVUFBUy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zIGZyb20gXCIuL25wbWNpLnBsdWdpbnNcIjtcclxuaW1wb3J0IHtiYXNofSBmcm9tIFwiLi9ucG1jaS5iYXNoXCI7XHJcbmltcG9ydCAqIGFzIGVudiBmcm9tIFwiLi9ucG1jaS5lbnZcIjtcclxuXHJcbmV4cG9ydCBsZXQgYnVpbGQgPSBmdW5jdGlvbihjb21tYW5kQXJnKXtcclxuICAgIHN3aXRjaChjb21tYW5kQXJnKXtcclxuICAgICAgICBjYXNlIFwiZG9ja2VyXCI6XHJcbiAgICAgICAgICAgIHJldHVybiBkb2NrZXIoKTsgICBcclxuICAgIH1cclxufVxyXG5cclxubGV0IGRvY2tlciA9IGZ1bmN0aW9uKCl7XHJcbiAgICBsZXQgZG9uZSA9IHBsdWdpbnMucS5kZWZlcigpO1xyXG4gICAgcGx1Z2lucy5zaGVsbGpzLmV4ZWMoXCJkb2NrZXIgYnVpbGQgLXQgXCIgKyBlbnYuZG9ja2VyVGFnKCkpO1xyXG4gICAgZG9uZS5yZXNvbHZlKCk7XHJcbiAgICByZXR1cm4gZG9uZS5wcm9taXNlO1xyXG59XHJcblxyXG4iXX0= diff --git a/dist/npmci.env.d.ts b/dist/npmci.env.d.ts index 1286e9f..8c1c77b 100644 --- a/dist/npmci.env.d.ts +++ b/dist/npmci.env.d.ts @@ -3,3 +3,8 @@ import { GitRepo } from "smartstring"; export declare let repo: GitRepo; export declare let dockerTestTag: string; export declare let dockerReleaseTag: string; +export declare let dockerRegistry: string; +export declare let dockerTagVersion: () => string; +export declare let dockerTag: () => string; +export declare let dockerTagTest: () => string; +export declare let dockerTagRelease: () => string; diff --git a/dist/npmci.env.js b/dist/npmci.env.js index 358e299..af42203 100644 --- a/dist/npmci.env.js +++ b/dist/npmci.env.js @@ -2,5 +2,23 @@ require("typings-global"); var smartstring_1 = require("smartstring"); exports.repo = new smartstring_1.GitRepo(process.env.CI_BUILD_REPO); +exports.dockerRegistry = "docker.io"; // will be set by npmci.prepare +exports.dockerTagVersion = function () { + if (process.env.CI_BUILD_STAGE == "test") { + return "test"; + } + else { + return "latest"; + } +}; +exports.dockerTag = function () { + return exports.dockerRegistry + "/" + exports.repo.user + "/" + exports.repo.repo + ":" + exports.dockerTagVersion() + " ."; +}; +exports.dockerTagTest = function () { + return exports.dockerRegistry + "/" + exports.repo.user + "/" + exports.repo.repo + ":test ."; +}; +exports.dockerTagRelease = function () { + return exports.dockerRegistry + "/" + exports.repo.user + "/" + exports.repo.repo + ":latest ."; +}; -//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5wbWNpLmVudi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsUUFBTyxnQkFBZ0IsQ0FBQyxDQUFBO0FBR3hCLDRCQUFzQixhQUFhLENBQUMsQ0FBQTtBQUV6QixZQUFJLEdBQUcsSUFBSSxxQkFBTyxDQUFDLE9BQU8sQ0FBQyxHQUFHLENBQUMsYUFBYSxDQUFDLENBQUM7QUFFdEIiLCJmaWxlIjoibnBtY2kuZW52LmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IFwidHlwaW5ncy1nbG9iYWxcIjtcclxuaW1wb3J0ICogYXMgcGx1Z2lucyBmcm9tIFwiLi9ucG1jaS5wbHVnaW5zXCI7XHJcblxyXG5pbXBvcnQge0dpdFJlcG99IGZyb20gXCJzbWFydHN0cmluZ1wiO1xyXG5cclxuZXhwb3J0IGxldCByZXBvID0gbmV3IEdpdFJlcG8ocHJvY2Vzcy5lbnYuQ0lfQlVJTERfUkVQTyk7XHJcbmV4cG9ydCBsZXQgZG9ja2VyVGVzdFRhZzpzdHJpbmc7XHJcbmV4cG9ydCBsZXQgZG9ja2VyUmVsZWFzZVRhZzpzdHJpbmc7XHJcbiJdfQ== +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5wbWNpLmVudi50cyJdLCJuYW1lcyI6W10sIm1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5ICsgXCIvXCIgKyByZXBvLnVzZXIgKyBcIi9cIiArIHJlcG8ucmVwbyArIFwiOnRlc3QgLlwiO1xyXG59XHJcblxyXG5leHBvcnQgbGV0IGRvY2tlclRhZ1JlbGVhc2UgPSBmdW5jdGlvbigpe1xyXG4gICAgcmV0dXJuIGRvY2tlclJlZ2lzdHJ5ICsgXCIvXCIgKyByZXBvLnVzZXIgKyBcIi9cIiArIHJlcG8ucmVwbyArIFwiOmxhdGVzdCAuXCI7XHJcbn1cclxuIl19 diff --git a/dist/npmci.prepare.js b/dist/npmci.prepare.js index f292d03..4bca794 100644 --- a/dist/npmci.prepare.js +++ b/dist/npmci.prepare.js @@ -1,6 +1,7 @@ "use strict"; require("typings-global"); var plugins = require("./npmci.plugins"); +var env = require("./npmci.env"); var npm = function () { var done = plugins.q.defer(); var npmrcPrefix = "//registry.npmjs.org/:_authToken="; @@ -19,6 +20,7 @@ var npm = function () { }; var docker = function () { var done = plugins.q.defer(); + env.dockerRegistry = "docker.io"; var 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"); @@ -33,6 +35,7 @@ var docker = function () { }; var dockerGitlab = function () { var done = plugins.q.defer(); + env.dockerRegistry = "registry.gitlab.io"; var ciBuildToken = process.env.CI_BUILD_TOKEN; plugins.shelljs.exec("docker login -u gitlab-ci-token -p " + ciBuildToken + " registry.gitlab.com"); done.resolve(); @@ -51,4 +54,4 @@ exports.prepare = function (serviceArg) { } }; -//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5wbWNpLnByZXBhcmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLFFBQU8sZ0JBQWdCLENBQUMsQ0FBQTtBQUN4QixJQUFZLE9BQU8sV0FBTSxpQkFBaUIsQ0FBQyxDQUFBO0FBRzNDLEl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NvbHZlKCk7XHJcbiAgICByZXR1cm4gZG9uZS5wcm9taXNlO1xyXG59XHJcblxyXG5sZXQgZG9ja2VyR2l0bGFiID0gZnVuY3Rpb24oKXtcclxuICAgIGxldCBkb25lID0gcGx1Z2lucy5xLmRlZmVyKCk7XHJcbiAgICBsZXQgY2lCdWlsZFRva2VuID0gcHJvY2Vzcy5lbnYuQ0lfQlVJTERfVE9LRU5cclxuICAgIHBsdWdpbnMuc2hlbGxqcy5leGVjKFwiZG9ja2VyIGxvZ2luIC11IGdpdGxhYi1jaS10b2tlbiAtcCBcIiArIGNpQnVpbGRUb2tlbiArIFwiIHJlZ2lzdHJ5LmdpdGxhYi5jb21cIik7XHJcbiAgICBkb25lLnJlc29sdmUoKTtcclxuICAgIHJldHVybiBkb25lLnByb21pc2U7XHJcbn1cclxuXHJcbmV4cG9ydCBsZXQgcHJlcGFyZSA9IGZ1bmN0aW9uKHNlcnZpY2VBcmc6c3RyaW5nKXtcclxuICAgIHN3aXRjaCAoc2VydmljZUFyZykge1xyXG4gICAgICAgIGNhc2UgXCJucG1cIjpcclxuICAgICAgICAgICAgcmV0dXJuIG5wbSgpO1xyXG4gICAgICAgIGNhc2UgXCJkb2NrZXJcIjpcclxuICAgICAgICAgICAgcmV0dXJuIGRvY2tlcigpO1xyXG4gICAgICAgIGNhc2UgXCJkb2NrZXItZ2l0bGFiXCI6XHJcbiAgICAgICAgICAgIHJldHVybiBkb2NrZXJHaXRsYWIoKTtcclxuICAgICAgICBkZWZhdWx0OlxyXG4gICAgICAgICAgICBicmVhaztcclxuICAgIH1cclxufSJdfQ== +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5wbWNpLnByZXBhcmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLFFBQU8sZ0JBQWdCLENBQUMsQ0FBQTtBQUN4QixJQUFZLE9BQU8sV0FBTSxpQkFBaUIsQ0FBQyxDQUFBO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gICAgIGJyZWFrO1xyXG4gICAgfVxyXG59Il19 diff --git a/dist/npmci.publish.js b/dist/npmci.publish.js index 23ebd38..2633b22 100644 --- a/dist/npmci.publish.js +++ b/dist/npmci.publish.js @@ -3,23 +3,15 @@ require("typings-global"); var plugins = require("./npmci.plugins"); var npmci_prepare_1 = require("./npmci.prepare"); var npmci_bash_1 = require("./npmci.bash"); +var env = require("./npmci.env"); exports.publish = function (serviceArg) { if (serviceArg === void 0) { serviceArg = "npm"; } - var done = plugins.q.defer(); switch (serviceArg) { case "npm": - publishNpm() - .then(function () { - done.resolve(); - }); - break; + return publishNpm(); case "docker": - publishDocker() - .then(function () { - done.resolve(); - }); + return publishDocker(); } - return done.promise; }; var publishNpm = function () { var done = plugins.q.defer(); @@ -35,10 +27,11 @@ var publishDocker = function () { var done = plugins.q.defer(); npmci_prepare_1.prepare("docker") .then(function () { - npmci_bash_1.bash("docker push"); + npmci_bash_1.bash; + npmci_bash_1.bash("docker push " + env.dockerTag()); done.resolve(); }); return done.promise; }; -//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5wbWNpLnB1Ymxpc2gudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLFFBQU8sZ0JBQWdCLENBQUMsQ0FBQTtBQUN4QixJQUFZLE9BQU8sV0FBTSxpQkFBaUIsQ0FBQyxDQUFBO0FBQzNDLDhCQUFzQixpQkFBaUIsQ0FBQyxDQUFBO0FBQ3hDLDJCQUFtQixjQUFjLENBQUMsQ0FBQTtBQUV2QixlQUFPLEdBQUcsVUFBQyxVQUF5QjtJQUF6QiwwQkFBeUIsR0FBekIsa0JBQXlCO0lBQzNDLElBQUksSUFBSSxHQUFHLE9BQU8sQ0FBQyxDQUFDLENBQUMsS0FBSyxFQUFFLENBQUM7SUFDN0IsTUFBTSxDQUFDLENBQUMsVUFBVSxDQUFDLENBQUEsQ0FBQztRQUNoQixLQUFLLEtBQUs7W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