From 45e41500bcc6f450eb0983816349aa5eae88eab7 Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Tue, 7 Jun 2016 23:21:56 +0200 Subject: [PATCH] now using same docker push function across all stages --- dist/npmci.build.docker.d.ts | 1 - dist/npmci.build.docker.js | 11 +---------- dist/npmci.publish.js | 4 ++-- ts/npmci.build.docker.ts | 9 --------- ts/npmci.publish.ts | 2 +- 5 files changed, 4 insertions(+), 23 deletions(-) diff --git a/dist/npmci.build.docker.d.ts b/dist/npmci.build.docker.d.ts index e6903c7..8981b47 100644 --- a/dist/npmci.build.docker.d.ts +++ b/dist/npmci.build.docker.d.ts @@ -6,7 +6,6 @@ export declare let buildDockerfiles: (sortedArrayArg: Dockerfile[]) => any; export declare let pushDockerfiles: (sortedArrayArg: Dockerfile[]) => any; export declare let pullDockerfileImages: (sortableArrayArg: Dockerfile[], registryArg?: string) => any; export declare let testDockerfiles: (sortedArrayArg: Dockerfile[]) => any; -export declare let releaseDockerfiles: (sortedArrayArg: Dockerfile[], registryArg?: any) => any; export declare class Dockerfile { filePath: string; repo: string; diff --git a/dist/npmci.build.docker.js b/dist/npmci.build.docker.js index 460eb77..a2cd379 100644 --- a/dist/npmci.build.docker.js +++ b/dist/npmci.build.docker.js @@ -108,15 +108,6 @@ exports.testDockerfiles = function (sortedArrayArg) { done.resolve(sortedArrayArg); return done.promise; }; -exports.releaseDockerfiles = function (sortedArrayArg, registryArg) { - if (registryArg === void 0) { registryArg = NpmciEnv.dockerRegistry; } - var done = plugins.q.defer(); - sortedArrayArg.forEach(function (dockerfileArg) { - dockerfileArg.push(registryArg); - }); - done.resolve(sortedArrayArg); - return done.promise; -}; var Dockerfile = (function () { function Dockerfile(options) { this.filePath = options.filePath; @@ -230,4 +221,4 @@ exports.cleanTagsArrayFunction = function (dockerfileArrayArg, trackingArrayArg) return cleanTagsArray; }; -//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5wbWNpLm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cnQge2Jhc2hCYXJlfSBmcm9tIFwiLi9ucG1jaS5iYXNoXCI7XHJcblxyXG5leHBvcnQgbGV0IGJ1aWxkID0gZnVuY3Rpb24oKXtcclxuICAgIGxldCBkb25lID0gcGx1Z2lucy5xLmRlZmVyKCk7XHJcbiAgICByZWFkRG9ja2VyZmlsZXMoKVxyXG4gICAgICAgIC50aGVuKHNvcnREb2NrZXJmaWxlcylcclxuICAgICAgICAudGhlbihtYXBEb2NrZXJmaWxlcylcclxuICAgICAgICAudGhlbihidWlsZERvY2tlcmZpbGVzKVxyXG4gICAgICAgIC50aGVuKHB1c2hEb2NrZXJmaWxlcylcclxuICAgICAgICAudGhlbigoKSA9PiB7XHJcbiAgICAgICAgICAgIGRvbmUucmVzb2x2ZSgpO1xyXG4gICAgICAgIH0pO1xyXG4gICAgcmV0dXJuIGRvbmUucHJvbWlzZTtcclxufVxyXG5cclxuZXhwb3J0IGxldCByZWFkRG9ja2VyZmlsZXMgPSBmdW5jdGlvbigpe1xyXG4gICAgbGV0IGRvbmUgPSBwbHVnaW5zLnEuZGVmZXIoKTtcclxuICAgIGxldCByZWFkRG9ja2VyZmlsZXNBcnJheTpEb2NrZXJmaWxlW10gPSBbXVxyXG4gICAgcGx1Z2lucy5ndWxwLnNyYyhcIi4vRG9ja2VyZmlsZSpcIilcclxuICAgICAgICAucGlwZShwbHVnaW5zLnRocm91Z2gyLm9iaihmdW5jdGlvbihmaWxlLGVuYyxjYil7XHJcbiAgICAgICAgICAgIGxldCBteURvY2tlcmZpbGUgPSBuZXcgRG9ja2VyZmlsZSh7XHJcbiAgICAgICAgICAgICAgICBmaWxlUGF0aDpmaWxlLnBhdGgsXHJcbiAgICAgICAgICAgICAgICByZWFkOnRydWVcclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgIHJlYWREb2NrZXJmaWxlc0FycmF5LnB1c2gobXlEb2NrZXJmaWxlKTtcclxuICAgICAgICAgICAgY2IobnVsbCxmaWxlKTtcclxuICAgICAgIC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gdmVyc2lvbiA9IHZlcnNpb25BcmcgKyBcIl9cIiArIHN1ZmZpeEFyZztcclxuICAgIH07XHJcbiAgICB0YWdTdHJpbmcgPSByZWdpc3RyeSArIFwiL1wiICsgcmVwbyArIFwiOlwiICsgdmVyc2lvbjtcclxuICAgIHJldHVybiB0YWdTdHJpbmc7XHJcbn07XHJcblxyXG5leHBvcnQgbGV0IGNsZWFuVGFnc0FycmF5RnVuY3Rpb24gPSBmdW5jdGlvbihkb2NrZXJmaWxlQXJyYXlBcmc6RG9ja2VyZmlsZVtdLHRyYWNraW5nQXJyYXlBcmc6RG9ja2VyZmlsZVtdKTpzdHJpbmdbXXtcclxuICAgIGxldCBjbGVhblRhZ3NBcnJheTpzdHJpbmdbXSA9IFtdO1xyXG4gICAgZG9ja2VyZmlsZUFycmF5QXJnLmZvckVhY2goZnVuY3Rpb24oZG9ja2VyZmlsZUFyZyl7XHJcbiAgICAgICAgaWYodHJhY2tpbmdBcnJheUFyZy5pbmRleE9mKGRvY2tlcmZpbGVBcmcpID09IC0xKXtcclxuICAgICAgICAgICAgY2xlYW5UYWdzQXJyYXkucHVzaChkb2NrZXJmaWxlQXJnLmNsZWFuVGFnKTtcclxuICAgICAgICB9XHJcbiAgICB9KTtcclxuICAgIHJldHVybiBjbGVhblRhZ3NBcnJheTtcclxufSJdfQ== diff --git a/dist/npmci.publish.js b/dist/npmci.publish.js index c4dce69..23311c3 100644 --- a/dist/npmci.publish.js +++ b/dist/npmci.publish.js @@ -27,9 +27,9 @@ var publishDocker = function () { var done = plugins.q.defer(); NpmciBuildDocker.readDockerfiles() .then(NpmciBuildDocker.pullDockerfileImages) - .then(NpmciBuildDocker.releaseDockerfiles) + .then(NpmciBuildDocker.pushDockerfiles) .then(done.resolve); return done.promise; }; -//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5wbWNpLnB1Ymxpc2gudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI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9uKCl7XHJcbiAgICBsZXQgZG9uZSA9IHBsdWdpbnMucS5kZWZlcigpO1xyXG4gICAgICAgIE5wbWNpQnVpbGREb2NrZXIucmVhZERvY2tlcmZpbGVzKClcclxuICAgICAgICAudGhlbihOcG1jaUJ1aWxkRG9ja2VyLnB1bGxEb2NrZXJmaWxlSW1hZ2VzKVxyXG4gICAgICAgIC50aGVuKE5wbWNpQnVpbGREb2NrZXIucHVzaERvY2tlcmZpbGVzKVxyXG4gICAgICAgIC50aGVuKGRvbmUucmVzb2x2ZSk7XHJcbiAgICByZXR1cm4gZG9uZS5wcm9taXNlO1xyXG59OyJdfQ== diff --git a/ts/npmci.build.docker.ts b/ts/npmci.build.docker.ts index cb002d5..5abe100 100644 --- a/ts/npmci.build.docker.ts +++ b/ts/npmci.build.docker.ts @@ -110,15 +110,6 @@ export let testDockerfiles = (sortedArrayArg:Dockerfile[]) => { return done.promise; }; -export let releaseDockerfiles = (sortedArrayArg:Dockerfile[], registryArg = NpmciEnv.dockerRegistry) => { - let done = plugins.q.defer(); - sortedArrayArg.forEach(function(dockerfileArg){ - dockerfileArg.push(registryArg); - }); - done.resolve(sortedArrayArg); - return done.promise; -} - export class Dockerfile { filePath:string; repo:string; diff --git a/ts/npmci.publish.ts b/ts/npmci.publish.ts index 93f48f4..815107a 100644 --- a/ts/npmci.publish.ts +++ b/ts/npmci.publish.ts @@ -29,7 +29,7 @@ let publishDocker = function(){ let done = plugins.q.defer(); NpmciBuildDocker.readDockerfiles() .then(NpmciBuildDocker.pullDockerfileImages) - .then(NpmciBuildDocker.releaseDockerfiles) + .then(NpmciBuildDocker.pushDockerfiles) .then(done.resolve); return done.promise; }; \ No newline at end of file