diff --git a/dist/npmci.build.docker.d.ts b/dist/npmci.build.docker.d.ts index 4a7fec9..63f71c0 100644 --- a/dist/npmci.build.docker.d.ts +++ b/dist/npmci.build.docker.d.ts @@ -3,6 +3,7 @@ export declare let readDockerfiles: () => any; export declare let sortDockerfiles: (sortableArrayArg: Dockerfile[]) => any; export declare let mapDockerfiles: (sortedArray: Dockerfile[]) => any; export declare let buildDockerfiles: (sortedArrayArg: Dockerfile[]) => any; +export declare let pushDockerfiles: (sortedArrayArg: Dockerfile[]) => any; export declare class Dockerfile { filePath: string; repo: string; diff --git a/dist/npmci.build.docker.js b/dist/npmci.build.docker.js index dd3a00e..2d9d6b0 100644 --- a/dist/npmci.build.docker.js +++ b/dist/npmci.build.docker.js @@ -8,6 +8,7 @@ exports.build = function () { .then(exports.sortDockerfiles) .then(exports.mapDockerfiles) .then(exports.buildDockerfiles) + .then(exports.pushDockerfiles) .then(function () { done.resolve(); }); @@ -79,7 +80,15 @@ exports.buildDockerfiles = function (sortedArrayArg) { sortedArrayArg.forEach(function (dockerfileArg) { dockerfileArg.build(); }); - done.resolve(); + done.resolve(sortedArrayArg); + return done.promise; +}; +exports.pushDockerfiles = function (sortedArrayArg) { + var done = plugins.q.defer(); + sortedArrayArg.forEach(function (dockerfileArg) { + dockerfileArg.push(); + }); + done.resolve(sortedArrayArg); return done.promise; }; var Dockerfile = (function () { @@ -168,4 +177,4 @@ exports.cleanTagsArrayFunction = function (dockerfileArrayArg, trackingArrayArg) return cleanTagsArray; }; -//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5wbWNpLmJ1aWxkLmRvY2tlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsSUFBWSxPQUFPLFdBQU0saUJBQ3pCLENBQUMsQ0FEeUM7QUFDMUMsSUFBWSxRQUFRLFdBQU0sYUFBYSxDQUFDLENBQUE7QUFDeEMsMkJBQXVCLGNBQWMsQ0FBQy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9ja2VyZmlsZUFycmF5QXJnLmZvckVhY2goZnVuY3Rpb24oZG9ja2VyZmlsZUFyZyl7XHJcbiAgICAgICAgaWYodHJhY2tpbmdBcnJheUFyZy5pbmRleE9mKGRvY2tlcmZpbGVBcmcpID09IC0xKXtcclxuICAgICAgICAgICAgY2xlYW5UYWdzQXJyYXkucHVzaChkb2NrZXJmaWxlQXJnLmNsZWFuVGFnKTtcclxuICAgICAgICB9XHJcbiAgICB9KTtcclxuICAgIHJldHVybiBjbGVhblRhZ3NBcnJheTtcclxufSJdfQ== diff --git a/dist/npmci.publish.js b/dist/npmci.publish.js index 74d1b5b..6b324e1 100644 --- a/dist/npmci.publish.js +++ b/dist/npmci.publish.js @@ -28,6 +28,7 @@ var publishDocker = function () { NpmciEnv.dockerFilesBuilt.forEach(function (dockerfileArg) { dockerfileArg.push(); }); + done.resolve(); return done.promise; }; var publishDockerTest = function () { @@ -39,4 +40,4 @@ var publishDockerTest = function () { return done.promise; }; -//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5wbWNpLnB1Ymxpc2gudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLFFBQU8sZ0JBQWdCLENBQUMsQ0FBQTtBQUN4QixJQUFZLE9BQU8sV0FBTSxpQkFBaUIsQ0FBQyxDQUFBO0FBQzNDLDhCQUFzQixpQkFBaUIsQ0FBQyxDQUFBO0FBQ3hDLDJCQUFtQixjQUFjLENBQUMsQ0FBQTtBQUNsQyxJQUFZLFFBQVEsV0FBTSxhQUFhLENBQUMsQ0FBQTtBQUU3QixlQUFPLEdBQUcsVUFBQyxVQUF5QjtJQUF6QiwwQkFBeUIsR0FBekIsa0JBQXlCO0lBQzNDLE1BQU0sQ0FBQyxDQUFDLFVBQVUsQ0FBQyxDQUFBLENBQUM7UUFDaEIsS0FBSyxLQUFLO1lBQ04sTUFBTSxDQUFDLFVBQVUsRUFBRSxDQUFDO1FBQ3h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GJhc2goXCJucG0gcHVibGlzaFwiKTtcclxuICAgICAgICAgICAgcGx1Z2lucy5iZWF1dHlsb2cub2soXCJEb25lIVwiKSA7XHJcbiAgICAgICAgICAgIGRvbmUucmVzb2x2ZSgpO1xyXG4gICAgICAgIH0pO1xyXG4gICByZXR1cm4gZG9uZS5wcm9taXNlO1xyXG59XHJcblxyXG5sZXQgcHVibGlzaERvY2tlciA9IGZ1bmN0aW9uKCl7XHJcbiAgICBsZXQgZG9uZSA9IHBsdWdpbnMucS5kZWZlcigpO1xyXG4gICAgTnBtY2lFbnYuZG9ja2VyRmlsZXNCdWlsdC5mb3JFYWNoKGZ1bmN0aW9uKGRvY2tlcmZpbGVBcmcpe1xyXG4gICAgICAgIGRvY2tlcmZpbGVBcmcucHVzaCgpO1xyXG4gICAgfSk7XHJcbiAgICBkb25lLnJlc29sdmUoKTtcclxuICAgIHJldHVybiBkb25lLnByb21pc2U7XHJcbn07XHJcblxyXG5sZXQgcHVibGlzaERvY2tlclRlc3QgPSBmdW5jdGlvbigpe1xyXG4gICAgbGV0IGRvbmUgPSBwbHVnaW5zLnEuZGVmZXIoKTtcclxuICAgIE5wbWNpRW52LmRvY2tlckZpbGVzQnVpbHQuZm9yRWFjaChmdW5jdGlvbihkb2NrZXJmaWxlQXJnKXtcclxuICAgICAgICBkb2NrZXJmaWxlQXJnLnB1c2goKTtcclxuICAgIH0pO1xyXG4gICAgZG9uZS5yZXNvbHZlKCk7XHJcbiAgICByZXR1cm4gZG9uZS5wcm9taXNlO1xyXG59Il19 diff --git a/test/test.js b/test/test.js index cb5883b..72e1e90 100644 --- a/test/test.js +++ b/test/test.js @@ -11,6 +11,7 @@ process.cwd = function () { }; //require NPMCI files var NpmciBuildDocker = require("../dist/npmci.build.docker"); +var NpmciPublish = require("../dist/npmci.publish"); var NpmciTest = require("../dist/npmci.test"); var dockerfile1; var dockerfile2; @@ -46,6 +47,15 @@ describe("NPMCI", function () { }); }); }); + describe(".publish.docker", function () { + it("should publish all built Dockerfiles", function (done) { + NpmciPublish.publish("docker") + .then(function () { + done(); + }); + ; + }); + }); describe(".test.npm", function () { it("should source nvm using bash and install a specific node version", function (done) { NpmciTest.test("legacy") @@ -65,4 +75,4 @@ describe("NPMCI", function () { }); }); -//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInRlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLFFBQU8sY0FBYyxDQUFDLENBQUE7QUFDdEIsUUFBTyxRQUFRLENBQUMsQ0FBQTtBQUNoQixJQUFPLElBQUksV0FBVyxNQUFNLENBQUMsQ0FBQztBQUM5QixJQUFZLFNBQVMsV0FBTSxXQUUzQixDQUFDLENBRnFDO0FBQ3RDLG9CQUFvQjtBQUNwQixPQUFPLENBQUMsR0FBRyxDQUFDLGFBQWEsR0FBRyx1REFBdUQsQ0FBQztBQUNwRixPQUFPLENBQUMsR0FBRyxDQUFDLFVBQVUsR0FBRyxNQUFNLENBQUM7QUFDaEMsT0FBTyxDQUFDLEdBQUcsR0FBRztJQUNWLE1BQU0sQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLFNBQVMsRUFBQyxTQUFTLENBQUMsQ0FBQztBQUMxQyxDQUFDLENBQUM7QUFFRixxQkFBcUI7QUFDckIsSUFBTyxnQkFBZ0IsV0FBVyw0QkFBNEIsQ0FBQyxDQUFDO0FBQ2hFLElBQU8sU0FBUyxXQUFXLG9CQUFvQixDQUFDLENBQUM7QUFHakQsSUFBSSxXQUF1QyxDQUFDO0FBQzVDLElBQUksV0FBdUMsQ0FBQztBQUM1QyxJQUFJLGFBQTJDLENBQUM7QUFFaEQsUUFBUSxDQUFDLE9BQU8sRUFBQztJQUNiLFFBQVEsQ0FBQyxjQUFjLEVBQUM7UUFDcEIsRUFBRSxDQUFDLGlDQUFpQyxFQUFDO1lBQ2pDLFdBQVcsR0FBRyxJQUFJLGdCQUFnQixDQUFDLFVBQVUsQ0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YmxlQXJyYXkpXHJcbiAgICAgICAgICAgICAgICAudGhlbihmdW5jdGlvbihzb3J0ZWRBcnJheUFyZzpOcG1jaUJ1aWxkRG9ja2VyLkRvY2tlcmZpbGVbXSl7XHJcbiAgICAgICAgICAgICAgICAgICAgYmVhdXR5bG9nLnN1Y2Nlc3MoXCJmaW5hbCByZXN1bHRcIik7XHJcbiAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coc29ydGVkQXJyYXlBcmcpO1xyXG4gICAgICAgICAgICAgICAgICAgIGRvbmUoKTtcclxuICAgICAgICAgICAgICAgIH0pXHJcbiAgICAgICAgfSk7XHJcbiAgICAgICAgaXQoXCJzaG91bGQgY29ycmVjdGx5IGNoYWluIERvY2tlcmZpbGUgaGFuZGxpbmdcIixmdW5jdGlvbihkb25lKXtcclxuICAgICAgICAgICAgTnBtY2lCdWlsZERvY2tlci5idWlsZCgpXHJcbiAgICAgICAgICAgICAgICAudGhlbigoKT0+e1xyXG4gICAgICAgICAgICAgICAgICAgIGRvbmUoKTtcclxuICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgIH0pXHJcbiAgICB9KTtcclxuICAgIGRlc2NyaWJlKFwiLnRlc3QubnBtXCIsZnVuY3Rpb24oKXtcclxuICAgICAgICBpdChcInNob3VsZCBzb3VyY2UgbnZtIHVzaW5nIGJhc2ggYW5kIGluc3RhbGwgYSBzcGVjaWZpYyBub2RlIHZlcnNpb25cIixmdW5jdGlvbihkb25lKXtcclxuICAgICAgICAgICAgTnBtY2lUZXN0LnRlc3QoXCJsZWdhY3lcIilcclxuICAgICAgICAgICAgICAgIC50aGVuKCgpID0+IHtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gTnBtY2lUZXN0LnRlc3QoXCJsdHNcIik7XHJcbiAgICAgICAgICAgICAgICB9KVxyXG4gICAgICAgICAgICAgICAgLnRoZW4oKCkgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBOcG1jaVRlc3QudGVzdChcInN0YWJsZVwiKTtcclxuICAgICAgICAgICAgICAgIH0pXHJcbiAgICAgICAgICAgICAgICAudGhlbigoKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgIHJldHVybiBOcG1jaVRlc3QudGVzdChcImRvY2tlclwiKTtcclxuICAgICAgICAgICAgICAgIH0pXHJcbiAgICAgICAgICAgICAgICAudGhlbigoKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgZG9uZSgpO1xyXG4gICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgfSlcclxuICAgIH0pO1xyXG59KSJdfQ== +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInRlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLFFBQU8sY0FBYyxDQUFDLENBQUE7QUFDdEIsUUFBTyxRQUFRLENBQUMsQ0FBQTtBQUNoQixJQUFPLElBQUksV0FBVyxNQUFNLENBQUMsQ0FBQztBQUM5QixJQUFZLFNBQVMsV0FBTSxXQUUzQixDQUFDLENBRnFDO0FBQ3RDLG9CQUFvQjtBQUNwQixPQUFPLENBQUMsR0FBRyxDQUFDLGFBQWEsR0FBRyx1REFBdUQsQ0FBQztBQUNwRixPQUFPLENBQUMsR0FBRyxDQUFDLFVBQVUsR0FBRyxNQUFNLENBQUM7QUFDaEMsT0FBTyxDQUFDLEdBQUcsR0FBRztJQUNWLE1BQU0sQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLFNBQVMsRUFBQyxTQUFTLENBQUMsQ0FBQztBQUMxQyxDQUFDLENBQUM7QUFFRixxQkFBcUI7QUFDckIsSUFBTyxnQkFBZ0IsV0FBVyw0QkFBNEIsQ0FBQyxDQUFDO0FBQ2hFLElBQU8sWUFBWSxXQUFXLHVCQUF1QixDQUFDLENBQUM7QUFDdkQsSUFBTyxTQUFTLFdBQVcsb0JBQW9CLENBQUMsQ0FBQztBQUdqRCxJQUFJLFdBQ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AgICAgICBOcG1jaUJ1aWxkRG9ja2VyLnJlYWREb2NrZXJmaWxlcygpXHJcbiAgICAgICAgICAgICAgICAudGhlbihmdW5jdGlvbihyZWFkRG9ja2VyZmlsZXNBcnJheUFyZzpOcG1jaUJ1aWxkRG9ja2VyLkRvY2tlcmZpbGVbXSl7XHJcbiAgICAgICAgICAgICAgICAgICAgcmVhZERvY2tlcmZpbGVzQXJyYXlBcmdbMV0udmVyc2lvbi5zaG91bGQuZXF1YWwoXCJzb21ldGFnMVwiKTtcclxuICAgICAgICAgICAgICAgICAgICBzb3J0YWJsZUFycmF5ID0gcmVhZERvY2tlcmZpbGVzQXJyYXlBcmdcclxuICAgICAgICAgICAgICAgICAgICBkb25lKCk7XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICB9KVxyXG4gICAgICAgIGl0KFwic2hvdWxkIHNvcnQgYW4gYXJyYXkgb2YgRG9ja2VyZmlsZXNcIixmdW5jdGlvbihkb25lKXtcclxuICAgICAgICAgICAgTnBtY2lCdWlsZERvY2tlci5zb3J0RG9ja2VyZmlsZXMoc29ydGFibGVBcnJheSlcclxuICAgICAgICAgICAgICAgIC50aGVuKGZ1bmN0aW9uKHNvcnRlZEFycmF5QXJnOk5wbWNpQnVpbGREb2NrZXIuRG9ja2VyZmlsZVtdKXtcclxuICAgICAgICAgICAgICAgICAgICBiZWF1dHlsb2cuc3VjY2VzcyhcImZpbmFsIHJlc3VsdFwiKTtcclxuICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyhzb3J0ZWRBcnJheUFyZyk7XHJcbiAgICAgICAgICAgICAgICAgICAgZG9uZSgpO1xyXG4gICAgICAgICAgICAgICAgfSlcclxuICAgICAgICB9KTtcclxuICAgICAgICBpdChcInNob3VsZCBjb3JyZWN0bHkgY2hhaW4gRG9ja2VyZmlsZSBoYW5kbGluZ1wiLGZ1bmN0aW9uKGRvbmUpe1xyXG4gICAgICAgICAgICBOcG1jaUJ1aWxkRG9ja2VyLmJ1aWxkKClcclxuICAgICAgICAgICAgICAgIC50aGVuKCgpPT57XHJcbiAgICAgICAgICAgICAgICAgICAgZG9uZSgpO1xyXG4gICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgfSlcclxuICAgIH0pO1xyXG4gICAgZGVzY3JpYmUoXCIucHVibGlzaC5kb2NrZXJcIixmdW5jdGlvbigpe1xyXG4gICAgICAgIGl0KFwic2hvdWxkIHB1Ymxpc2ggYWxsIGJ1aWx0IERvY2tlcmZpbGVzXCIsZnVuY3Rpb24oZG9uZSl7XHJcbiAgICAgICAgICAgIE5wbWNpUHVibGlzaC5wdWJsaXNoKFwiZG9ja2VyXCIpXHJcbiAgICAgICAgICAgICAgICAudGhlbigoKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgZG9uZSgpO1xyXG4gICAgICAgICAgICAgICAgfSk7O1xyXG4gICAgICAgIH0pO1xyXG4gICAgfSk7XHJcbiAgICBkZXNjcmliZShcIi50ZXN0Lm5wbVwiLGZ1bmN0aW9uKCl7XHJcbiAgICAgICAgaXQoXCJzaG91bGQgc291cmNlIG52bSB1c2luZyBiYXNoIGFuZCBpbnN0YWxsIGEgc3BlY2lmaWMgbm9kZSB2ZXJzaW9uXCIsZnVuY3Rpb24oZG9uZSl7XHJcbiAgICAgICAgICAgIE5wbWNpVGVzdC50ZXN0KFwibGVnYWN5XCIpXHJcbiAgICAgICAgICAgICAgICAudGhlbigoKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIE5wbWNpVGVzdC50ZXN0KFwibHRzXCIpO1xyXG4gICAgICAgICAgICAgICAgfSlcclxuICAgICAgICAgICAgICAgIC50aGVuKCgpID0+IHtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gTnBtY2lUZXN0LnRlc3QoXCJzdGFibGVcIik7XHJcbiAgICAgICAgICAgICAgICB9KVxyXG4gICAgICAgICAgICAgICAgLnRoZW4oKCkgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgICByZXR1cm4gTnBtY2lUZXN0LnRlc3QoXCJkb2NrZXJcIik7XHJcbiAgICAgICAgICAgICAgICB9KVxyXG4gICAgICAgICAgICAgICAgLnRoZW4oKCkgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgIGRvbmUoKTtcclxuICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgIH0pXHJcbiAgICB9KTtcclxufSkiXX0= diff --git a/test/test.ts b/test/test.ts index 25e9aba..df00491 100644 --- a/test/test.ts +++ b/test/test.ts @@ -11,6 +11,7 @@ process.cwd = () => { //require NPMCI files import NpmciBuildDocker = require("../dist/npmci.build.docker"); +import NpmciPublish = require("../dist/npmci.publish"); import NpmciTest = require("../dist/npmci.test"); @@ -49,6 +50,14 @@ describe("NPMCI",function(){ }); }) }); + describe(".publish.docker",function(){ + it("should publish all built Dockerfiles",function(done){ + NpmciPublish.publish("docker") + .then(() => { + done(); + });; + }); + }); describe(".test.npm",function(){ it("should source nvm using bash and install a specific node version",function(done){ NpmciTest.test("legacy") diff --git a/ts/npmci.build.docker.ts b/ts/npmci.build.docker.ts index 21d399c..b73be6f 100644 --- a/ts/npmci.build.docker.ts +++ b/ts/npmci.build.docker.ts @@ -7,6 +7,7 @@ export let build = function(){ .then(sortDockerfiles) .then(mapDockerfiles) .then(buildDockerfiles) + .then(pushDockerfiles) .then(() => { done.resolve(); }); @@ -77,7 +78,16 @@ export let buildDockerfiles = function(sortedArrayArg:Dockerfile[]){ sortedArrayArg.forEach(function(dockerfileArg){ dockerfileArg.build(); }) - done.resolve(); + done.resolve(sortedArrayArg); + return done.promise; +} + +export let pushDockerfiles = function(sortedArrayArg:Dockerfile[]){ + let done = plugins.q.defer(); + sortedArrayArg.forEach(function(dockerfileArg){ + dockerfileArg.push(); + }); + done.resolve(sortedArrayArg); return done.promise; } diff --git a/ts/npmci.publish.ts b/ts/npmci.publish.ts index 9481fc6..26ec6b1 100644 --- a/ts/npmci.publish.ts +++ b/ts/npmci.publish.ts @@ -29,6 +29,7 @@ let publishDocker = function(){ NpmciEnv.dockerFilesBuilt.forEach(function(dockerfileArg){ dockerfileArg.push(); }); + done.resolve(); return done.promise; };