From 9f4a3783a12cb15e9014542cabead1cb538df23f Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Tue, 7 Jun 2016 04:31:25 +0200 Subject: [PATCH] full docker workflow now implemented --- dist/npmci.build.docker.js | 8 +++++--- dist/npmci.publish.js | 8 +++++--- dist/npmci.test.js | 19 ++++++++++++++----- test/test.js | 13 +++++++++---- test/test.ts | 11 ++++++++--- ts/npmci.build.docker.ts | 6 ++++-- ts/npmci.publish.ts | 6 +++--- ts/npmci.test.ts | 19 ++++++++++++++----- 8 files changed, 62 insertions(+), 28 deletions(-) diff --git a/dist/npmci.build.docker.js b/dist/npmci.build.docker.js index 3e4b383..9f01d4b 100644 --- a/dist/npmci.build.docker.js +++ b/dist/npmci.build.docker.js @@ -93,8 +93,10 @@ exports.pushDockerfiles = function (sortedArrayArg) { }; exports.pullDockerfileImages = function (sortableArrayArg) { var done = plugins.q.defer(); - sortableArrayArg; - done.resolve(); + sortableArrayArg.forEach(function (dockerfileArg) { + dockerfileArg.pull(); + }); + done.resolve(sortableArrayArg); return done.promise; }; exports.testDockerfiles = function (sortedArrayArg) { @@ -240,4 +242,4 @@ exports.cleanTagsArrayFunction = function (dockerfileArrayArg, trackingArrayArg) return cleanTagsArray; }; -//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5wbWNpLmJ1aWxkLmRvY2tlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsSUFBWSxPQUFPLFdBQU0saUJBQWlCLENBQUMsQ0FBQTtBQUMzQyxJQUFZLEtBQUssV0FBTSxlQUFlLENBQUMsQ0FBQTtBQUN2QyxJQUFZLFFBQVEsV0FBTSxhQUFhLENBQUMsQ0FBQTtBQUN4QywyQkFBdUIsY0FBYyxDQUFDLENBQUE7QUFFM0IsYUFBSyxHQUFHO0lBQ2YsSUFBSSxJQUFJLEdBQUcsT0FBTyxDQUFDLENBQUMsQ0FBQyxLQUFLLEVBQU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CBcIiArIHRoaXMucmVsZWFzZVRhZyk7XG4gICAgfVxuICAgIGdldElkKCl7XG4gICAgICAgIGxldCBjb250YWluZXJJZCA9IGJhc2hCYXJlKFwiZG9ja2VyIGluc3BlY3QgLS1mb3JtYXQ9XFxcInt7LklkfX1cXFwiIFwiICsgdGhpcy5idWlsZFRhZyk7XG4gICAgICAgIHJldHVybiBjb250YWluZXJJZDtcbiAgICB9O1xuICAgIHBhdGNoQ29udGVudHMoKXtcbiAgICAgICAgbGV0IGRvbmUgPSBwbHVnaW5zLnEuZGVmZXIoKTtcbiAgICAgICAgaWYodGhpcy5sb2NhbEJhc2VJbWFnZURlcGVuZGVudCA9PSB0cnVlKXtcbiAgICAgICAgICAgIHRoaXMucGF0Y2hlZENvbnRlbnQgPSB0aGlzLmNvbnRlbnQucmVwbGFjZSgvRlJPTVxcc1thLXpBLVowLTlcXC9cXC1cXDpdKi8sICdGUk9NICcgKyB0aGlzLmxvY2FsQmFzZURvY2tlcmZpbGUuYnVpbGRUYWcpO1xuICAgICAgICAgICAgcGx1Z2lucy5zbWFydGZpbGUubWVtb3J5LnRvRnNTeW5jKFxuICAgICAgICAgICAgICAgIHRoaXMucGF0Y2hlZENvbnRlbnQsXG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICBmaWxlTmFtZTpwbHVnaW5zLnBhdGgucGFyc2UodGhpcy5maWxlUGF0aCkubmFtZSxcbiAgICAgICAgICAgICAgICAgICAgZmlsZVBhdGg6cGx1Z2lucy5wYXRoLnBhcnNlKHRoaXMuZmlsZVBhdGgpLmRpclxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICk7XG4gICAgICAgIH1cbiAgICAgICAgZG9uZS5yZXNvbHZlKCk7XG4gICAgICAgIHJldHVybiBkb25lLnByb21pc2U7XG4gICAgfTtcbiAgICByZXN0b3JlQ29udGVudHMoKXtcbiAgICAgICAgbGV0IGRvbmUgPSBwbHVnaW5zLnEuZGVmZXIoKTtcbiAgICAgIC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ZXIgcHVzaCBcIiArIHRoaXMucmVsZWFzZVRhZyk7XG4gICAgfVxuICAgIGdldElkKCl7XG4gICAgICAgIGxldCBjb250YWluZXJJZCA9IGJhc2hCYXJlKFwiZG9ja2VyIGluc3BlY3QgLS1mb3JtYXQ9XFxcInt7LklkfX1cXFwiIFwiICsgdGhpcy5idWlsZFRhZyk7XG4gICAgICAgIHJldHVybiBjb250YWluZXJJZDtcbiAgICB9O1xuICAgIHBhdGNoQ29udGVudHMoKXtcbiAgICAgICAgbGV0IGRvbmUgPSBwbHVnaW5zLnEuZGVmZXIoKTtcbiAgICAgICAgaWYodGhpcy5sb2NhbEJhc2VJbWFnZURlcGVuZGVudCA9PSB0cnVlKXtcbiAgICAgICAgICAgIHRoaXMucGF0Y2hlZENvbnRlbnQgPSB0aGlzLmNvbnRlbnQucmVwbGFjZSgvRlJPTVxcc1thLXpBLVowLTlcXC9cXC1cXDpdKi8sICdGUk9NICcgKyB0aGlzLmxvY2FsQmFzZURvY2tlcmZpbGUuYnVpbGRUYWcpO1xuICAgICAgICAgICAgcGx1Z2lucy5zbWFydGZpbGUubWVtb3J5LnRvRnNTeW5jKFxuICAgICAgICAgICAgICAgIHRoaXMucGF0Y2hlZENvbnRlbnQsXG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICBmaWxlTmFtZTpwbHVnaW5zLnBhdGgucGFyc2UodGhpcy5maWxlUGF0aCkubmFtZSxcbiAgICAgICAgICAgICAgICAgICAgZmlsZVBhdGg6cGx1Z2lucy5wYXRoLnBhcnNlKHRoaXMuZmlsZVBhdGgpLmRpclxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICk7XG4gICAgICAgIH1cbiAgICAgICAgZG9uZS5yZXNvbHZlKCk7XG4gICAgICAgIHJldHVybiBkb25lLnByb21pc2U7XG4gICAgfTtcbiAgICByZXN0b3JlQ29udGVudHMoKXtcbiAgICAgICAgbGV0IGRvbmUgPSBwbHVnaW5zLnEuZGVmZXIoKTt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Y3Rpb24oZG9ja2VyZmlsZUFycmF5QXJnOkRvY2tlcmZpbGVbXSx0cmFja2luZ0FycmF5QXJnOkRvY2tlcmZpbGVbXSk6c3RyaW5nW117XG4gICAgbGV0IGNsZWFuVGFnc0FycmF5OnN0cmluZ1tdID0gW107XG4gICAgZG9ja2VyZmlsZUFycmF5QXJnLmZvckVhY2goZnVuY3Rpb24oZG9ja2VyZmlsZUFyZyl7XG4gICAgICAgIGlmKHRyYWNraW5nQXJyYXlBcmcuaW5kZXhPZihkb2NrZXJmaWxlQXJnKSA9PSAtMSl7XG4gICAgICAgICAgICBjbGVhblRhZ3NBcnJheS5wdXNoKGRvY2tlcmZpbGVBcmcuY2xlYW5UYWcpO1xuICAgICAgICB9XG4gICAgfSk7XG4gICAgcmV0dXJuIGNsZWFuVGFnc0FycmF5O1xufSJdfQ== diff --git a/dist/npmci.publish.js b/dist/npmci.publish.js index bebb065..f5ec0e1 100644 --- a/dist/npmci.publish.js +++ b/dist/npmci.publish.js @@ -25,9 +25,11 @@ var publishNpm = function () { }; var publishDocker = function () { var done = plugins.q.defer(); - NpmciBuildDocker.readDockerfiles(); - done.resolve(); + NpmciBuildDocker.readDockerfiles() + .then(NpmciBuildDocker.pullDockerfileImages) + .then(NpmciBuildDocker.releaseDockerfiles) + .then(done.resolve); return done.promise; }; -//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5wbWNpLnB1Ymxpc2gudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLFFBQU8sZ0JBQWdCLENBQUMsQ0FBQTtBQUN4QixJQUFZLE9BQU8sV0FBTSxpQkFBaUIsQ0FBQyxDQUFBO0FBQzNDLDhCQUFzQixpQkFBaUIsQ0FBQyxDQUFBO0FBQ3hDLDJCQUFtQixjQUFjLENBQUMsQ0FBQTtBQUVsQyxJQUFZLGdCQUFnQixXQUFNLHNCQUVsQyxDQUFDLENBRnVEO0FBRTdDLG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4gICAgICAgICAgICByZXR1cm4gcHVibGlzaERvY2tlcigpO1xuICAgIH1cbn07XG5cbmxldCBwdWJsaXNoTnBtICA9IGZ1bmN0aW9uKCl7XG4gICAgbGV0IGRvbmUgPSBwbHVnaW5zLnEuZGVmZXIoKTtcbiAgICBwcmVwYXJlKFwibnBtXCIpXG4gICAgICAgIC50aGVuKGZ1bmN0aW9uKCl7XG4gICAgICAgICAgICBiYXNoKFwibnBtIHB1Ymxpc2hcIik7XG4gICAgICAgICAgICBwbHVnaW5zLmJlYXV0eWxvZy5vayhcIkRvbmUhXCIpIDtcbiAgICAgICAgICAgIGRvbmUucmVzb2x2ZSgpO1xuICAgICAgICB9KTtcbiAgIHJldHVybiBkb25lLnByb21pc2U7XG59XG5cbmxldCBwdWJsaXNoRG9ja2VyID0gZnVuY3Rpb24oKXtcbiAgICBsZXQgZG9uZSA9IHBsdWdpbnMucS5kZWZlcigpO1xuICAgICAgICBOcG1jaUJ1aWxkRG9ja2VyLnJlYWREb2NrZXJmaWxlcygpXG4gICAgICAgIC50aGVuKE5wbWNpQnVpbGREb2NrZXIucHVsbERvY2tlcmZpbGVJbWFnZXMpXG4gICAgICAgIC50aGVuKE5wbWNpQnVpbGREb2NrZXIucmVsZWFzZURvY2tlcmZpbGVzKVxuICAgICAgICAudGhlbihkb25lLnJlc29sdmUpO1xuICAgIHJldHVybiBkb25lLnByb21pc2U7XG59OyJdfQ== diff --git a/dist/npmci.test.js b/dist/npmci.test.js index a9ca133..12ed356 100644 --- a/dist/npmci.test.js +++ b/dist/npmci.test.js @@ -3,6 +3,7 @@ require("typings-global"); var plugins = require("./npmci.plugins"); var npmci_bash_1 = require("./npmci.bash"); var npmci_install_1 = require("./npmci.install"); +var NpmciBuildDocker = require("./npmci.build.docker"); exports.test = function (versionArg) { var done = plugins.q.defer(); if (versionArg == "docker") { @@ -14,10 +15,8 @@ exports.test = function (versionArg) { else { npmci_install_1.install(versionArg) .then(npmDependencies) + .then(npmTest) .then(function () { - plugins.beautylog.info("now starting tests:"); - npmci_bash_1.bash("npm test"); - plugins.beautylog.success("test finished"); done.resolve(); }); } @@ -30,10 +29,20 @@ var npmDependencies = function () { done.resolve(); return done.promise; }; -var testDocker = function () { +var npmTest = function () { var done = plugins.q.defer(); + plugins.beautylog.info("now starting tests:"); + npmci_bash_1.bash("npm test"); done.resolve(); return done.promise; }; +var testDocker = function () { + var done = plugins.q.defer(); + NpmciBuildDocker.readDockerfiles() + .then(NpmciBuildDocker.pullDockerfileImages) + .then(NpmciBuildDocker.testDockerfiles) + .then(done.resolve); + return done.promise; +}; -//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5wbWNpLnRlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLFFBQU8sZ0JBQWdCLENBQUMsQ0FBQTtBQUN4QixJQUFZLE9BQU8sV0FBTSxpQkFBaUIsQ0FBQyxDQUFBO0FBQzNDLDJCQUFtQixjQUFjLENBQUMsQ0FBQTtBQUNsQyw4QkFBc0IsaUJBQWlCLENBQUMsQ0FBQTtBQUc3QixZQUFJLEdBQUcsVUFBQyxVQUFVO0lBQ3pCLElBQUksSUFBSSxHQUFHLE9BQU8sQ0FBQyxDQUFDLENBQUMsS0FBSyxFQUFFLENBQUM7SUFDN0IsRUFBRSxDQUFBLENBQUMsVUFBVSxJQUFJLFFBQVEsQ0FBQyxDQUFBLENBQUM7UUFDdkIsVUFBVSxFQUFFO2FBQ1AsSUFBSSxDQUFDO1lBQ0YsSUFBSSxDQUFDLE9BQU8sRUFBRSxDQUFDO1FBQ25CLENBQUMsQ0FBQyxDQUFDO0lBQ1gsQ0FBQztJQUFDLElBQUksQ0FBQyxDQUFDO1FBQ0osdUJBQU8sQ0FBQyxVQUFVLENBQUM7YUFDZCxJQUFJLENBQUMsZUFBZSxDQUFDO2FBQ3JCLElBQUksQ0FBQztZQUNGLE9BQU8sQ0FBQyxTQUFTLENBQUMsSU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uYmVhdXR5bG9nLmluZm8oXCJub3cgaW5zdGFsbGluZyBkZXBlbmRlbmNpZXM6XCIpO1xuICAgIGJhc2goXCJucG0gaW5zdGFsbFwiKTtcbiAgICBkb25lLnJlc29sdmUoKTtcbiAgICByZXR1cm4gZG9uZS5wcm9taXNlO1xufVxuXG5sZXQgbnBtVGVzdCA9ICgpID0+IHtcbiAgICBsZXQgZG9uZSA9IHBsdWdpbnMucS5kZWZlcigpO1xuICAgIHBsdWdpbnMuYmVhdXR5bG9nLmluZm8oXCJub3cgc3RhcnRpbmcgdGVzdHM6XCIpO1xuICAgIGJhc2goXCJucG0gdGVzdFwiKTtcbiAgICBkb25lLnJlc29sdmUoKTtcbiAgICByZXR1cm4gZG9uZS5wcm9taXNlO1xufVxuXG5sZXQgdGVzdERvY2tlciA9IGZ1bmN0aW9uKCl7XG4gICAgbGV0IGRvbmUgPSBwbHVnaW5zLnEuZGVmZXIoKTtcbiAgICBOcG1jaUJ1aWxkRG9ja2VyLnJlYWREb2NrZXJmaWxlcygpXG4gICAgICAgIC50aGVuKE5wbWNpQnVpbGREb2NrZXIucHVsbERvY2tlcmZpbGVJbWFnZXMpXG4gICAgICAgIC50aGVuKE5wbWNpQnVpbGREb2NrZXIudGVzdERvY2tlcmZpbGVzKVxuICAgICAgICAudGhlbihkb25lLnJlc29sdmUpXG4gICAgcmV0dXJuIGRvbmUucHJvbWlzZTtcbn1cblxuIl19 diff --git a/test/test.js b/test/test.js index 0467430..541993c 100644 --- a/test/test.js +++ b/test/test.js @@ -57,7 +57,7 @@ describe("NPMCI", function () { }); }); describe(".test.npm", function () { - it("should source nvm using bash and install a specific node version", function (done) { + it("should source nvm using bash and install a specific node version, then test it", function (done) { NpmciTest.test("legacy") .then(function () { return NpmciTest.test("lts"); @@ -66,8 +66,13 @@ describe("NPMCI", function () { return NpmciTest.test("stable"); }) .then(function () { - return NpmciTest.test("docker"); - }) + done(); + }); + }); + }); + describe("test.docker", function () { + it("should test dockerfiles", function (done) { + NpmciTest.test("docker") .then(function () { done(); }); @@ -75,4 +80,4 @@ describe("NPMCI", function () { }); }); -//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInRlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLFFBQU8sY0FBYyxDQUFDLENBQUE7QUFDdEIsUUFBTyxRQUFRLENBQUMsQ0FBQTtBQUNoQixJQUFPLElBQUksV0FBVyxNQUFNLENBQUMsQ0FBQztBQUM5QixJQUFZLFNBQVMsV0FBTSxXQUUzQixDQUFDLENBRnFDO0FBQ3RDLG9CQUFvQjtBQUNwQixPQUFPLENBQUMsR0FBRyxDQUFDLGFBQWEsR0FBRyx1REFBdUQsQ0FBQztBQUNwRixPQUFPLENBQUMsR0FBRyxDQUFDLFVBQVUsR0FBRyxNQUFNLENBQUM7QUFDaEMsT0FBTyxDQUFDLEdBQUcsR0FBRztJQUNWLE1BQU0sQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLFNBQVMsRUFBQyxTQUFTLENBQUMsQ0FBQztBQUMxQyxDQUFDLENBQUM7QUFFRixxQkFBcUI7QUFDckIsSUFBTyxnQkFBZ0IsV0FBVyw0QkFBNEIsQ0FBQyxDQUFDO0FBQ2hFLElBQU8sWUFBWSxXQUFXLHVCQUF1QixDQUFDLENBQUM7QUFDdkQsSUFBTyxTQUFTLFdBQVcsb0JBQW9CLENBQUMsQ0FBQztBQUdqRCxJQUFJLFdBQXVDLENBQUM7QUFDNUMsSUFBSSxXQUF1QyxDQUFDO0FBQzVDLElBQUksYUFBMkMsQ0FBQztBQUVoRCxRQUFRLENBQUMsT0FBTyxFQUFDO0lBQ2IsUUFBUSxDQUFDLGNBQWMsRUFBQztRQUNwQixFQUFFLENBQUMsaUNBQWlDLEVBQUM7WUFDakMsV0FBVyxHQUFHLElBQUksZ0JBQWdCLENBQUMsVUFBVSxDQUFDLEVBQUMsUUFBUSxFQUFDLGNBQWMsR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ZERvY2tlcmZpbGVzQXJyYXlBcmdcbiAgICAgICAgICAgICAgICAgICAgZG9uZSgpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICB9KVxuICAgICAgICBpdChcInNob3VsZCBzb3J0IGFuIGFycmF5IG9mIERvY2tlcmZpbGVzXCIsZnVuY3Rpb24oZG9uZSl7XG4gICAgICAgICAgICBOcG1jaUJ1aWxkRG9ja2VyLnNvcnREb2NrZXJmaWxlcyhzb3J0YWJsZUFycmF5KVxuICAgICAgICAgICAgICAgIC50aGVuKGZ1bmN0aW9uKHNvcnRlZEFycmF5QXJnOk5wbWNpQnVpbGREb2NrZXIuRG9ja2VyZmlsZVtdKXtcbiAgICAgICAgICAgICAgICAgICAgYmVhdXR5bG9nLnN1Y2Nlc3MoXCJmaW5hbCByZXN1bHRcIik7XG4gICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKHNvcnRlZEFycmF5QXJnKTtcbiAgICAgICAgICAgICAgICAgICAgZG9uZSgpO1xuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgIH0pO1xuICAgICAgICBpdChcInNob3VsZCBjb3JyZWN0bHkgY2hhaW4gRG9ja2VyZmlsZSBoYW5kbGluZ1wiLGZ1bmN0aW9uKGRvbmUpe1xuICAgICAgICAgICAgTnBtY2lCdWlsZERvY2tlci5idWlsZCgpXG4gICAgICAgICAgICAgICAgLnRoZW4oKCk9PntcbiAgICAgICAgICAgICAgICAgICAgZG9uZSgpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICB9KVxuICAgIH0pO1xuICAgIGRlc2NyaWJlKFwiLnB1Ymxpc2guZG9ja2VyXCIsZnVuY3Rpb24oKXtcbiAgICAgICAgaXQoXCJzaG91bGQgcHVibGlzaCBhbGwgYnVpbHQgRG9ja2VyZmlsZXNcIixmdW5jdGlvbihkb25lKXtcbiAgICAgICAgICAgIE5wbWNpUHVibGlzaC5wdWJsaXNoKFwiZG9ja2VyXCIpXG4gICAgICAgICAgICAgICAgLnRoZW4oKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBkb25lKCk7XG4gICAgICAgICAgICAgICAgfSk7O1xuICAgICAgICB9KTtcbiAgICB9KTtcbiAgICBkZXNjcmliZShcIi50ZXN0Lm5wbVwiLGZ1bmN0aW9uKCl7XG4gICAgICAgIGl0KFwic2hvdWxkIHNvdXJjZSBudm0gdXNpbmcgYmFzaCBhbmQgaW5zdGFsbCBhIHNwZWNpZmljIG5vZGUgdmVyc2lvblwiLGZ1bmN0aW9uKGRvbmUpe1xuICAgICAgICAgICAgTnBtY2lUZXN0LnRlc3QoXCJsZWdhY3lcIilcbiAgICAgICAgICAgICAgICAudGhlbigoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBOcG1jaVRlc3QudGVzdChcImx0c1wiKTtcbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgIC50aGVuKCgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIE5wbWNpVGVzdC50ZXN0KFwic3RhYmxlXCIpO1xuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgLnRoZW4oKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIE5wbWNpVGVzdC50ZXN0KFwiZG9ja2VyXCIpO1xuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgLnRoZW4oKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBkb25lKCk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgIH0pXG4gICAgfSk7XG59KSJdfQ== +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInRlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLFFBQU8sY0FBYyxDQUFDLENBQUE7QUFDdEIsUUFBTyxRQUFRLENBQUMsQ0FBQTtBQUNoQixJQUFPLElBQUksV0FBVyxNQUFNLENBQUMsQ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sZCBzb3J0IGFuIGFycmF5IG9mIERvY2tlcmZpbGVzXCIsZnVuY3Rpb24oZG9uZSl7XG4gICAgICAgICAgICBOcG1jaUJ1aWxkRG9ja2VyLnNvcnREb2NrZXJmaWxlcyhzb3J0YWJsZUFycmF5KVxuICAgICAgICAgICAgICAgIC50aGVuKGZ1bmN0aW9uKHNvcnRlZEFycmF5QXJnOk5wbWNpQnVpbGREb2NrZXIuRG9ja2VyZmlsZVtdKXtcbiAgICAgICAgICAgICAgICAgICAgYmVhdXR5bG9nLnN1Y2Nlc3MoXCJmaW5hbCByZXN1bHRcIik7XG4gICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKHNvcnRlZEFycmF5QXJnKTtcbiAgICAgICAgICAgICAgICAgICAgZG9uZSgpO1xuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgIH0pO1xuICAgICAgICBpdChcInNob3VsZCBjb3JyZWN0bHkgY2hhaW4gRG9ja2VyZmlsZSBoYW5kbGluZ1wiLGZ1bmN0aW9uKGRvbmUpe1xuICAgICAgICAgICAgTnBtY2lCdWlsZERvY2tlci5idWlsZCgpXG4gICAgICAgICAgICAgICAgLnRoZW4oKCk9PntcbiAgICAgICAgICAgICAgICAgICAgZG9uZSgpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICB9KVxuICAgIH0pO1xuICAgIGRlc2NyaWJlKFwiLnB1Ymxpc2guZG9ja2VyXCIsZnVuY3Rpb24oKXtcbiAgICAgICAgaXQoXCJzaG91bGQgcHVibGlzaCBhbGwgYnVpbHQgRG9ja2VyZmlsZXNcIixmdW5jdGlvbihkb25lKXtcbiAgICAgICAgICAgIE5wbWNpUHVibGlzaC5wdWJsaXNoKFwiZG9ja2VyXCIpXG4gICAgICAgICAgICAgICAgLnRoZW4oKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBkb25lKCk7XG4gICAgICAgICAgICAgICAgfSk7O1xuICAgICAgICB9KTtcbiAgICB9KTtcbiAgICBkZXNjcmliZShcIi50ZXN0Lm5wbVwiLGZ1bmN0aW9uKCl7XG4gICAgICAgIGl0KFwic2hvdWxkIHNvdXJjZSBudm0gdXNpbmcgYmFzaCBhbmQgaW5zdGFsbCBhIHNwZWNpZmljIG5vZGUgdmVyc2lvbiwgdGhlbiB0ZXN0IGl0XCIsZnVuY3Rpb24oZG9uZSl7XG4gICAgICAgICAgICBOcG1jaVRlc3QudGVzdChcImxlZ2FjeVwiKVxuICAgICAgICAgICAgICAgIC50aGVuKCgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIE5wbWNpVGVzdC50ZXN0KFwibHRzXCIpO1xuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgLnRoZW4oKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gTnBtY2lUZXN0LnRlc3QoXCJzdGFibGVcIik7XG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAudGhlbigoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGRvbmUoKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgfSlcbiAgICB9KTtcbiAgICBkZXNjcmliZShcInRlc3QuZG9ja2VyXCIsZnVuY3Rpb24oKXtcbiAgICAgICAgaXQoXCJzaG91bGQgdGVzdCBkb2NrZXJmaWxlc1wiLGZ1bmN0aW9uKGRvbmUpe1xuICAgICAgICAgICAgTnBtY2lUZXN0LnRlc3QoXCJkb2NrZXJcIilcbiAgICAgICAgICAgICAgICAudGhlbigoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGRvbmUoKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgfSlcbiAgICB9KTtcbn0pIl19 diff --git a/test/test.ts b/test/test.ts index df00491..c6b3d75 100644 --- a/test/test.ts +++ b/test/test.ts @@ -59,7 +59,7 @@ describe("NPMCI",function(){ }); }); describe(".test.npm",function(){ - it("should source nvm using bash and install a specific node version",function(done){ + it("should source nvm using bash and install a specific node version, then test it",function(done){ NpmciTest.test("legacy") .then(() => { return NpmciTest.test("lts"); @@ -68,8 +68,13 @@ describe("NPMCI",function(){ return NpmciTest.test("stable"); }) .then(() => { - return NpmciTest.test("docker"); - }) + done(); + }); + }) + }); + describe("test.docker",function(){ + it("should test dockerfiles",function(done){ + NpmciTest.test("docker") .then(() => { done(); }); diff --git a/ts/npmci.build.docker.ts b/ts/npmci.build.docker.ts index dc81e84..955400a 100644 --- a/ts/npmci.build.docker.ts +++ b/ts/npmci.build.docker.ts @@ -94,8 +94,10 @@ export let pushDockerfiles = function(sortedArrayArg:Dockerfile[]){ export let pullDockerfileImages = (sortableArrayArg:Dockerfile[]) => { let done = plugins.q.defer(); - sortableArrayArg; - done.resolve(); + sortableArrayArg.forEach((dockerfileArg) => { + dockerfileArg.pull(); + }); + done.resolve(sortableArrayArg); return done.promise; } diff --git a/ts/npmci.publish.ts b/ts/npmci.publish.ts index 95d0f70..93f48f4 100644 --- a/ts/npmci.publish.ts +++ b/ts/npmci.publish.ts @@ -28,8 +28,8 @@ let publishNpm = function(){ let publishDocker = function(){ let done = plugins.q.defer(); NpmciBuildDocker.readDockerfiles() - - - done.resolve(); + .then(NpmciBuildDocker.pullDockerfileImages) + .then(NpmciBuildDocker.releaseDockerfiles) + .then(done.resolve); return done.promise; }; \ No newline at end of file diff --git a/ts/npmci.test.ts b/ts/npmci.test.ts index a1c562b..75d83b2 100644 --- a/ts/npmci.test.ts +++ b/ts/npmci.test.ts @@ -3,6 +3,7 @@ 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(); @@ -14,10 +15,8 @@ export let test = (versionArg) => { } else { install(versionArg) .then(npmDependencies) + .then(npmTest) .then(()=>{ - plugins.beautylog.info("now starting tests:"); - bash("npm test"); - plugins.beautylog.success("test finished"); done.resolve(); }); } @@ -32,10 +31,20 @@ let npmDependencies = function(){ return done.promise; } -let testDocker = function(){ +let npmTest = () => { 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(); + NpmciBuildDocker.readDockerfiles() + .then(NpmciBuildDocker.pullDockerfileImages) + .then(NpmciBuildDocker.testDockerfiles) + .then(done.resolve) + return done.promise; +} +