fixed docker login
This commit is contained in:
parent
677f730b34
commit
8dd0f230c0
2
dist/npmci.build.d.ts
vendored
Normal file
2
dist/npmci.build.d.ts
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
import "typings-global";
|
||||
export declare let build: (commandArg: any) => any;
|
9
dist/npmci.build.js
vendored
Normal file
9
dist/npmci.build.js
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
"use strict";
|
||||
require("typings-global");
|
||||
var plugins = require("./npmci.plugins");
|
||||
exports.build = function (commandArg) {
|
||||
var done = plugins.q.defer();
|
||||
return done.promise;
|
||||
};
|
||||
|
||||
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5wbWNpLmJ1aWxkLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxRQUFPLGdCQUFnQixDQUFDLENBQUE7QUFDeEIsSUFBWSxPQUFPLFdBQU0saUJBQWlCLENBQUMsQ0FBQTtBQUdoQyxhQUFLLEdBQUcsVUFBUyxVQUFVO0lBQ2xDLElBQUksSUFBSSxHQUFHLE9BQU8sQ0FBQyxDQUFDLENBQUMsS0FBSyxFQUFFLENBQUM7SUFDN0IsTUFBTSxDQUFDLElBQUksQ0FBQyxPQUFPLENBQUM7QUFDeEIsQ0FBQyxDQUFBIiwiZmlsZSI6Im5wbWNpLmJ1aWxkLmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IFwidHlwaW5ncy1nbG9iYWxcIjtcclxuaW1wb3J0ICogYXMgcGx1Z2lucyBmcm9tIFwiLi9ucG1jaS5wbHVnaW5zXCI7XHJcbmltcG9ydCB7YmFzaH0gZnJvbSBcIi4vbnBtY2kuYmFzaFwiO1xyXG5cclxuZXhwb3J0IGxldCBidWlsZCA9IGZ1bmN0aW9uKGNvbW1hbmRBcmcpe1xyXG4gICAgbGV0IGRvbmUgPSBwbHVnaW5zLnEuZGVmZXIoKTtcclxuICAgIHJldHVybiBkb25lLnByb21pc2U7XHJcbn0iXX0=
|
1
dist/npmci.env.d.ts
vendored
Normal file
1
dist/npmci.env.d.ts
vendored
Normal file
@ -0,0 +1 @@
|
||||
export declare let env: () => void;
|
5
dist/npmci.env.js
vendored
Normal file
5
dist/npmci.env.js
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
"use strict";
|
||||
exports.env = function () {
|
||||
};
|
||||
|
||||
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5wbWNpLmVudi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQVcsV0FBRyxHQUFHO0FBRWpCLENBQUMsQ0FBQyIsImZpbGUiOiJucG1jaS5lbnYuanMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgbGV0IGVudiA9IGZ1bmN0aW9uKCl7XHJcbiAgICBcclxufTsiXX0=
|
11
dist/npmci.prepare.js
vendored
11
dist/npmci.prepare.js
vendored
@ -1,13 +1,18 @@
|
||||
"use strict";
|
||||
require("typings-global");
|
||||
var plugins = require("./npmci.plugins");
|
||||
var npmci_bash_1 = require("./npmci.bash");
|
||||
var docker = function () {
|
||||
var done = plugins.q.defer();
|
||||
var dockerRegex = /^([a-zA-Z0-9\.]*)\|([a-zA-Z0-9\.]*)/;
|
||||
var dockerRegexResultArray = dockerRegex.exec("process.env.NPMCI_LOGIN_DOCKER");
|
||||
if (!process.env.NPMCI_LOGIN_DOCKER) {
|
||||
plugins.beautylog.error("You have to specify Login Data to the Docker Registry");
|
||||
process.exit(1);
|
||||
}
|
||||
var dockerRegexResultArray = dockerRegex.exec(process.env.NPMCI_LOGIN_DOCKER);
|
||||
var username = dockerRegexResultArray[1];
|
||||
var password = dockerRegexResultArray[2];
|
||||
plugins.shelljs.exec("docker login -u " + username + " -p " + password);
|
||||
npmci_bash_1.bash("docker login -u " + username + " -p " + password);
|
||||
done.resolve();
|
||||
return done.promise;
|
||||
};
|
||||
@ -36,4 +41,4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SB7XHJcbiAgICAgICAgcGx1Z2lucy5iZWF1dHlsb2cuZXJyb3IoXCJubyBhY2Nlc3MgdG9rZW4gZm91bmQhIEV4aXRpbmchXCIpO1xyXG4gICAgICAgIHByb2Nlc3MuZXhpdCgxKTtcclxuICAgIH1cclxuICAgIHBsdWdpbnMuc21hcnRmaWxlLm1lbW9yeS50b0ZzU3luYyhucG1yY0ZpbGVTdHJpbmcse2ZpbGVOYW1lOlwiLm5wbXJjXCIsZmlsZVBhdGg6XCIvcm9vdFwifSk7XHJcbiAgICBkb25lLnJlc29sdmUoKTtcclxuICAgIHJldHVybiBkb25lLnByb21pc2U7XHJcbn07XHJcblxyXG5leHBvcnQgbGV0IHByZXBhcmUgPSBmdW5jdGlvbihzZXJ2aWNlQXJnOnN0cmluZyl7XHJcbiAgICBzd2l0Y2ggKHNlcnZpY2VBcmcpIHtcclxuICAgICAgICBjYXNlIFwibnBtXCI6XHJcbiAgICAgICAgICAgIHJldHVybiBucG0oKTtcclxuICAgICAgICBjYXNlIFwiZG9ja2VyXCI6XHJcbiAgICAgICAgICAgIHJldHVybiBkb2NrZXIoKTtcclxuICAgIH1cclxufSJdfQ==
|
||||
|
@ -5,7 +5,11 @@ import {bash} from "./npmci.bash";
|
||||
let docker = function(){
|
||||
let done = plugins.q.defer();
|
||||
let dockerRegex = /^([a-zA-Z0-9\.]*)\|([a-zA-Z0-9\.]*)/
|
||||
let dockerRegexResultArray = dockerRegex.exec("process.env.NPMCI_LOGIN_DOCKER");
|
||||
if(!process.env.NPMCI_LOGIN_DOCKER){
|
||||
plugins.beautylog.error("You have to specify Login Data to the Docker Registry");
|
||||
process.exit(1);
|
||||
}
|
||||
let dockerRegexResultArray = dockerRegex.exec(process.env.NPMCI_LOGIN_DOCKER);
|
||||
let username = dockerRegexResultArray[1];
|
||||
let password = dockerRegexResultArray[2];
|
||||
bash("docker login -u " + username + " -p " + password);
|
||||
|
Loading…
Reference in New Issue
Block a user