now handles docker registries the right way

This commit is contained in:
Philipp Kunz 2017-08-28 02:24:06 +02:00
parent 3b3a303c55
commit dca4010f97
15 changed files with 59 additions and 209 deletions

View File

@ -19,11 +19,11 @@ exports.handleCli = (argvArg) => __awaiter(this, void 0, void 0, function* () {
let action = argvArg._[1]; let action = argvArg._[1];
switch (action) { switch (action) {
default: default:
plugins.beautylog.error(`>>npmci node ...<< action >>${action}<< not supported`); plugins.beautylog.error(`>>npmci cloudflare ...<< action >>${action}<< not supported`);
} }
} }
else { else {
plugins.beautylog.log(`>>npmci node ...<< cli arguments invalid... Please read the documentation.`); plugins.beautylog.log(`>>npmci cloudflare ...<< cli arguments invalid... Please read the documentation.`);
} }
}); });
exports.purge = (argvArg) => __awaiter(this, void 0, void 0, function* () { exports.purge = (argvArg) => __awaiter(this, void 0, void 0, function* () {
@ -33,4 +33,4 @@ exports.purge = (argvArg) => __awaiter(this, void 0, void 0, function* () {
}); });
npmciCflare.purgeZone(argvArg._[1]); npmciCflare.purgeZone(argvArg._[1]);
}); });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90cy9tb2RfY2xvdWRmbGFyZS9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O0FBQUEseUNBQXdDO0FBRXhDLElBQUksV0FBVyxHQUFHLElBQUksT0FBTyxDQUFDLE1BQU0sQ0FBQyxhQUFhLEVBQUUsQ0FBQTtBQUVwRDs7O0dBR0c7QUFDUSxRQUFBLFNBQVMsR0FBRyxDQUFPLE9BQU87SUFDbkMsRUFBRSxDQUFDLENBQUMsT0FBTyxDQUFDLENBQUMsQ0FBQyxNQUFNLElBQUksQ0FBQyxDQUFDLENBQUMsQ0FBQztRQUMxQixJQUFJLE1BQU0sR0FBVyxPQUFPLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQ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sR0FBVyxPQUFPLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFBO1FBQ2pDLE1BQU0sQ0FBQyxDQUFDLE1BQU0sQ0FBQyxDQUFDLENBQUM7WUFDZjtnQkFDRSxPQUFPLENBQUMsU0FBUyxDQUFDLEtBQUssQ0FBQyxxQ0FBcUMsTUFBTSxrQkFBa0IsQ0FBQyxDQUFBO1FBQzFGLENBQUM7SUFDSCxDQUFDO0lBQUMsSUFBSSxDQUFDLENBQUM7UUFDTixPQUFPLENBQUMsU0FBUyxDQUFDLEdBQUcsQ0FBQyxrRkFBa0YsQ0FBQyxDQUFBO0lBQzNHLENBQUM7QUFDSCxDQUFDLENBQUEsQ0FBQTtBQUVVLFFBQUEsS0FBSyxHQUFHLENBQU8sT0FBTztJQUMvQixXQUFXLENBQUMsSUFBSSxDQUFDO1FBQ2YsS0FBSyxFQUFFLEVBQUU7UUFDVCxHQUFHLEVBQUUsRUFBRTtLQUNSLENBQUMsQ0FBQTtJQUNGLFdBQVcsQ0FBQyxTQUFTLENBQUMsT0FBTyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFBO0FBQ3JDLENBQUMsQ0FBQSxDQUFBIn0=

View File

@ -11,6 +11,10 @@ export declare let handleCli: (argvArg: any) => Promise<void>;
* builds a cwd of Dockerfiles by triggering a promisechain * builds a cwd of Dockerfiles by triggering a promisechain
*/ */
export declare let build: () => Promise<void>; export declare let build: () => Promise<void>;
/**
* login to the DockerRegistries
*/
export declare let login: () => Promise<void>;
/** /**
* logs in docker * logs in docker
*/ */

View File

@ -9,7 +9,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
}; };
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
const plugins = require("./mod.plugins"); const plugins = require("./mod.plugins");
const NpmciEnv = require("../npmci.env");
const helpers = require("./mod.helpers"); const helpers = require("./mod.helpers");
exports.helpers = helpers; exports.helpers = helpers;
// classes // classes
@ -31,8 +30,8 @@ exports.handleCli = (argvArg) => __awaiter(this, void 0, void 0, function* () {
case 'build': case 'build':
yield exports.build(); yield exports.build();
break; break;
case 'prepare': case 'login':
yield exports.prepare(); yield exports.login();
break; break;
case 'test': case 'test':
yield exports.test(); yield exports.test();
@ -44,28 +43,35 @@ exports.handleCli = (argvArg) => __awaiter(this, void 0, void 0, function* () {
yield exports.pull(argvArg); yield exports.pull(argvArg);
break; break;
default: default:
plugins.beautylog.error(`>>npmci node ...<< action >>${action}<< not supported`); plugins.beautylog.error(`>>npmci docker ...<< action >>${action}<< not supported`);
} }
} }
else { else {
plugins.beautylog.log(`>>npmci node ...<< cli arguments invalid... Please read the documentation.`); plugins.beautylog.log(`>>npmci docker ...<< cli arguments invalid... Please read the documentation.`);
} }
}); });
/** /**
* builds a cwd of Dockerfiles by triggering a promisechain * builds a cwd of Dockerfiles by triggering a promisechain
*/ */
exports.build = () => __awaiter(this, void 0, void 0, function* () { exports.build = () => __awaiter(this, void 0, void 0, function* () {
yield exports.prepare();
plugins.beautylog.log('now building Dockerfiles...'); plugins.beautylog.log('now building Dockerfiles...');
yield helpers.readDockerfiles() yield helpers.readDockerfiles()
.then(helpers.sortDockerfiles) .then(helpers.sortDockerfiles)
.then(helpers.mapDockerfiles) .then(helpers.mapDockerfiles)
.then(helpers.buildDockerfiles); .then(helpers.buildDockerfiles);
}); });
/**
* login to the DockerRegistries
*/
exports.login = () => __awaiter(this, void 0, void 0, function* () {
yield exports.prepare();
yield npmciRegistryStorage.loginAll();
});
/** /**
* logs in docker * logs in docker
*/ */
exports.prepare = () => __awaiter(this, void 0, void 0, function* () { exports.prepare = () => __awaiter(this, void 0, void 0, function* () {
NpmciEnv.setDockerRegistry('docker.io'); // TODO: checkup why we set this here
// Always login to GitLab Registry // Always login to GitLab Registry
if (!process.env.CI_BUILD_TOKEN || process.env.CI_BUILD_TOKEN === '') { if (!process.env.CI_BUILD_TOKEN || process.env.CI_BUILD_TOKEN === '') {
plugins.beautylog.error('No registry token specified by gitlab!'); plugins.beautylog.error('No registry token specified by gitlab!');
@ -79,11 +85,11 @@ exports.prepare = () => __awaiter(this, void 0, void 0, function* () {
// handle registries // handle registries
yield plugins.smartparam.forEachMinimatch(process.env, 'NPMCI_LOGIN_DOCKER*', (envString) => __awaiter(this, void 0, void 0, function* () { yield plugins.smartparam.forEachMinimatch(process.env, 'NPMCI_LOGIN_DOCKER*', (envString) => __awaiter(this, void 0, void 0, function* () {
npmciRegistryStorage.addRegistry(mod_classes_dockerregistry_1.DockerRegistry.fromEnvString(envString)); npmciRegistryStorage.addRegistry(mod_classes_dockerregistry_1.DockerRegistry.fromEnvString(envString));
yield npmciRegistryStorage.loginAll();
})); }));
return; return;
}); });
exports.push = (argvArg) => __awaiter(this, void 0, void 0, function* () { exports.push = (argvArg) => __awaiter(this, void 0, void 0, function* () {
yield exports.prepare();
let registryUrlArg = argvArg._[2]; let registryUrlArg = argvArg._[2];
let suffix = null; let suffix = null;
if (argvArg._.length >= 4) { if (argvArg._.length >= 4) {
@ -93,11 +99,16 @@ exports.push = (argvArg) => __awaiter(this, void 0, void 0, function* () {
.then(helpers.sortDockerfiles) .then(helpers.sortDockerfiles)
.then(helpers.mapDockerfiles); .then(helpers.mapDockerfiles);
let localDockerRegistry = npmciRegistryStorage.getRegistryByUrl(registryUrlArg); let localDockerRegistry = npmciRegistryStorage.getRegistryByUrl(registryUrlArg);
if (!localDockerRegistry) {
plugins.beautylog.error(`Cannot push to registry ${registryUrlArg}, because it was not found in the authenticated registry list.`);
process.exit(1);
}
for (let dockerfile of dockerfileArray) { for (let dockerfile of dockerfileArray) {
dockerfile.push(localDockerRegistry, suffix); dockerfile.push(localDockerRegistry, suffix);
} }
}); });
exports.pull = (argvArg) => __awaiter(this, void 0, void 0, function* () { exports.pull = (argvArg) => __awaiter(this, void 0, void 0, function* () {
yield exports.prepare();
let registryUrlArg = argvArg._[2]; let registryUrlArg = argvArg._[2];
let suffix = null; let suffix = null;
if (argvArg._.length >= 4) { if (argvArg._.length >= 4) {
@ -112,7 +123,8 @@ exports.pull = (argvArg) => __awaiter(this, void 0, void 0, function* () {
} }
}); });
exports.test = () => __awaiter(this, void 0, void 0, function* () { exports.test = () => __awaiter(this, void 0, void 0, function* () {
yield exports.prepare();
return yield helpers.readDockerfiles() return yield helpers.readDockerfiles()
.then(helpers.testDockerfiles); .then(helpers.testDockerfiles);
}); });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90cy9tb2RfZG9ja2VyL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7QUFBQSx5Q0FBd0M7QUFFeEMseUNBQXdDO0FBR3hDLHlDQUF3QztBQVl0QywwQkFBTztBQVZULFVBQVU7QUFDVixxRUFBcUQ7QUFRbkQscUJBUk8sbUNBQVUsQ0FRUDtBQVBaLDZFQUE2RDtBQUM3RCwrRUFBK0Q7QUFFL0QsWUFBWTtBQUNaLElBQUksb0JBQW9CLEdBQUcsSUFBSSw2Q0FBZSxFQUFFLENBQUE7QUFTaEQ7OztHQUdHO0FBQ1EsUUFBQSxTQUFTLEdBQUcsQ0FBTyxPQUFPO0lBQ25DLGtCQUFVLEdBQUcsT0FBTyxDQUFBO0lBQ3BCLEVBQUUsQ0FBQyxDQUFDLE9BQU8sQ0FBQyxDQUFDLENBQUMsTUFBTSxJQUFJLENBQUMsQ0FBQyxDQUFDLENBQUM7UUFDMUIsSUFBSSxNQUFNLEdBQVcsT0FBTyxDQUFDLENBQUMsQ0FBRSxDQUFDLENBQUUsQ0FBQTtRQUNuQyxNQUFNLENBQUMsQ0FBQyxNQUFNLENBQUMsQ0FBQyxDQUFDO1lBQ2YsS0FBSyxPQUFPO2dCQUNWLE1BQU0sYUFBSyxFQUFFLENBQUE7Z0JBQ2IsS0FBSyxDQUFBO1l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EMsQ0FBQyxDQUFBLENBQUEifQ==

View File

@ -38,7 +38,6 @@ class Dockerfile {
plugins.beautylog.info('now building Dockerfile for ' + this.cleanTag); plugins.beautylog.info('now building Dockerfile for ' + this.cleanTag);
let buildCommand = `docker build -t ${this.buildTag} -f ${this.filePath} .`; let buildCommand = `docker build -t ${this.buildTag} -f ${this.filePath} .`;
yield npmci_bash_1.bash(buildCommand); yield npmci_bash_1.bash(buildCommand);
NpmciEnv.dockerFilesBuilt.push(this);
return; return;
}); });
} }
@ -93,4 +92,4 @@ class Dockerfile {
} }
} }
exports.Dockerfile = Dockerfile; exports.Dockerfile = Dockerfile;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9kLmNsYXNzZXMuZG9ja2VyZmlsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3RzL21vZF9kb2NrZXIvbW9kLmNsYXNzZXMuZG9ja2VyZmlsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O0FBQUEseUNBQXdDO0FBQ3hDLHlDQUF3QztBQUN4Qyw4Q0FBb0M7QUFDcEMsd0NBQXVDO0FBR3ZDLHlDQUF3QztBQUV4Qzs7R0FFRztBQUNIO0lBV0UsWUFBYSxPQUE4RTtRQUN6RixJQUFJLENBQUMsUUFBUSxHQUFHLE9BQU8sQ0FBQyxRQUFRLENBQUE7UUFDaEMsSUFBSSxDQUFDLElBQUksR0FBRyxRQUFRLENBQUMsSUFBSSxDQUFDLElBQUksR0FBRyxHQUFHLEdBQUcsUUFBUSxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUE7UUFDekQsSUFBSSxDQUFDLE9BQU8sR0FBRyxPQUFPLENBQUMsaUJBQWlCLENBQUMsT0FBTyxDQUFDLElBQUksQ0FBQyxLQUFLLENBQUMsT0FBTyxDQUFDLFFBQVEsQ0FBQyxDQUFDLElBQUksQ0FBQyxDQUFBO1FBQ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UFDbkcsQ0FBQztRQUNILENBQUM7S0FBQTtJQUVEOztPQUVHO0lBQ0csS0FBSzs7WUFDVCxJQUFJLFdBQVcsR0FBRyxNQUFNLGlCQUFJLENBQUMsbURBQW1ELEdBQUcsSUFBSSxDQUFDLFFBQVEsQ0FBQyxDQUFBO1lBQ2pHLE1BQU0sQ0FBQyxXQUFXLENBQUE7UUFDcEIsQ0FBQztLQUFBO0NBQ0Y7QUEvRUQsZ0NBK0VDIn0=

View File

@ -28,11 +28,11 @@ exports.handleCli = (argvArg) => __awaiter(this, void 0, void 0, function* () {
yield exports.test(); yield exports.test();
break; break;
default: default:
plugins.beautylog.error(`>>npmci node ...<< action >>${action}<< not supported`); plugins.beautylog.error(`>>npmci npm ...<< action >>${action}<< not supported`);
} }
} }
else { else {
plugins.beautylog.log(`>>npmci node ...<< cli arguments invalid... Please read the documentation.`); plugins.beautylog.log(`>>npmci npm ...<< cli arguments invalid... Please read the documentation.`);
} }
}); });
/** /**
@ -65,4 +65,4 @@ exports.test = () => __awaiter(this, void 0, void 0, function* () {
plugins.beautylog.info('now starting tests:'); plugins.beautylog.info('now starting tests:');
yield npmci_bash_1.bash('yarn test'); yield npmci_bash_1.bash('yarn test');
}); });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90cy9tb2RfbnBtL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7QUFBQSx5Q0FBd0M7QUFFeEMsOENBS3NCO0FBRXRCOzs7R0FHRztBQUNRLFFBQUEsU0FBUyxHQUFHLENBQU8sT0FBTztJQUNuQyxFQUFFLENBQUMsQ0FBQyxPQUFPLENBQUMsQ0FBQyxDQUFDLE1BQU0sSUFBSSxDQUFDLENBQUMsQ0FBQyxDQUFDO1FBQzFCLElBQUksTUFBTSxHQUFXLE9BQU8sQ0FBQy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NBQWlDLENBQUMsQ0FBQTtRQUMxRCxPQUFPLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQyxDQUFBO0lBQ2pCLENBQUM7SUFDRCxPQUFPLENBQUMsU0FBUyxDQUFDLE1BQU0sQ0FBQyxRQUFRLENBQUMsZUFBZSxFQUFFLGNBQWMsQ0FBQyxDQUFBO0lBQ2xFLE1BQU0sQ0FBQTtBQUNSLENBQUMsQ0FBQSxDQUFBO0FBRUQsSUFBSSxPQUFPLEdBQUc7SUFDWixPQUFPLENBQUMsU0FBUyxDQUFDLElBQUksQ0FBQyw4QkFBOEIsQ0FBQyxDQUFBO0lBQ3RELEVBQUUsQ0FBQyxDQUFDLE1BQU0sMEJBQWEsQ0FBQyxPQUFPLENBQUMsQ0FBQyxDQUFDO1FBQ2hDLE1BQU0saUJBQUksQ0FBQyxjQUFjLENBQUMsQ0FBQTtJQUM1QixDQUFDO0lBQUMsSUFBSSxDQUFDLENBQUM7UUFDTixNQUFNLGlCQUFJLENBQUMsYUFBYSxDQUFDLENBQUE7SUFDM0IsQ0FBQztBQUNILENBQUMsQ0FBQSxDQUFBO0FBRVUsUUFBQSxJQUFJLEdBQUc7SUFDaEIsT0FBTyxDQUFDLFNBQVMsQ0FBQyxJQUFJLENBQUMscUJBQXFCLENBQUMsQ0FBQTtJQUM3QyxNQUFNLGlCQUFJLENBQUMsV0FBVyxDQUFDLENBQUE7QUFDekIsQ0FBQyxDQUFBLENBQUEifQ==

11
dist/npmci.cli.js vendored
View File

@ -12,7 +12,6 @@ const plugins = require("./npmci.plugins");
const paths = require("./npmci.paths"); const paths = require("./npmci.paths");
let npmciInfo = new plugins.projectinfo.ProjectinfoNpm(paths.NpmciPackageRoot); let npmciInfo = new plugins.projectinfo.ProjectinfoNpm(paths.NpmciPackageRoot);
plugins.beautylog.log('npmci version: ' + npmciInfo.version); plugins.beautylog.log('npmci version: ' + npmciInfo.version);
const NpmciEnv = require("./npmci.env");
const npmciMods = require("./npmci.mods"); const npmciMods = require("./npmci.mods");
let smartcli = new plugins.smartcli.Smartcli(); let smartcli = new plugins.smartcli.Smartcli();
smartcli.addVersion(npmciInfo.version); smartcli.addVersion(npmciInfo.version);
@ -21,7 +20,6 @@ smartcli.addCommand('clean')
.then((argv) => __awaiter(this, void 0, void 0, function* () { .then((argv) => __awaiter(this, void 0, void 0, function* () {
let modClean = yield npmciMods.modClean.load(); let modClean = yield npmciMods.modClean.load();
yield modClean.clean(); yield modClean.clean();
yield NpmciEnv.configStore();
})).catch(err => { })).catch(err => {
console.log(err); console.log(err);
process.exit(1); process.exit(1);
@ -31,7 +29,6 @@ smartcli.addCommand('cloudflare')
.then((argvArg) => __awaiter(this, void 0, void 0, function* () { .then((argvArg) => __awaiter(this, void 0, void 0, function* () {
let modPurge = yield npmciMods.modCloudflare.load(); let modPurge = yield npmciMods.modCloudflare.load();
yield modPurge.handleCli(argvArg); yield modPurge.handleCli(argvArg);
yield NpmciEnv.configStore();
})).catch(err => { })).catch(err => {
console.log(err); console.log(err);
}); });
@ -40,7 +37,6 @@ smartcli.addCommand('command')
.then((argv) => __awaiter(this, void 0, void 0, function* () { .then((argv) => __awaiter(this, void 0, void 0, function* () {
let modCommand = yield npmciMods.modCommand.load(); let modCommand = yield npmciMods.modCommand.load();
yield modCommand.command(); yield modCommand.command();
yield NpmciEnv.configStore();
})).catch(err => { })).catch(err => {
console.log(err); console.log(err);
process.exit(1); process.exit(1);
@ -50,7 +46,6 @@ smartcli.addCommand('docker')
.then((argvArg) => __awaiter(this, void 0, void 0, function* () { .then((argvArg) => __awaiter(this, void 0, void 0, function* () {
let modDocker = yield npmciMods.modDocker.load(); let modDocker = yield npmciMods.modDocker.load();
yield modDocker.handleCli(argvArg); yield modDocker.handleCli(argvArg);
NpmciEnv.configStore();
})).catch(err => { })).catch(err => {
console.log(err); console.log(err);
process.exit(1); process.exit(1);
@ -60,7 +55,6 @@ smartcli.addCommand('node')
.then((argvArg) => __awaiter(this, void 0, void 0, function* () { .then((argvArg) => __awaiter(this, void 0, void 0, function* () {
let modNode = yield npmciMods.modNode.load(); let modNode = yield npmciMods.modNode.load();
yield modNode.handleCli(argvArg); yield modNode.handleCli(argvArg);
yield NpmciEnv.configStore();
})).catch(err => { })).catch(err => {
console.log(err); console.log(err);
}); });
@ -69,7 +63,6 @@ smartcli.addCommand('npm')
.then((argvArg) => __awaiter(this, void 0, void 0, function* () { .then((argvArg) => __awaiter(this, void 0, void 0, function* () {
let modNpm = yield npmciMods.modNpm.load(); let modNpm = yield npmciMods.modNpm.load();
yield modNpm.handleCli(argvArg); yield modNpm.handleCli(argvArg);
yield NpmciEnv.configStore();
})).catch(err => { })).catch(err => {
console.log(err); console.log(err);
}); });
@ -78,7 +71,6 @@ smartcli.addCommand('ssh')
.then((argvArg) => __awaiter(this, void 0, void 0, function* () { .then((argvArg) => __awaiter(this, void 0, void 0, function* () {
let modSsh = yield npmciMods.modSsh.load(); let modSsh = yield npmciMods.modSsh.load();
yield modSsh.handleCli(argvArg); yield modSsh.handleCli(argvArg);
yield NpmciEnv.configStore();
})).catch(err => { })).catch(err => {
console.log(err); console.log(err);
process.exit(1); process.exit(1);
@ -88,10 +80,9 @@ smartcli.addCommand('trigger')
.then((argv) => __awaiter(this, void 0, void 0, function* () { .then((argv) => __awaiter(this, void 0, void 0, function* () {
let modTrigger = yield npmciMods.modTrigger.load(); let modTrigger = yield npmciMods.modTrigger.load();
yield modTrigger.trigger(); yield modTrigger.trigger();
yield NpmciEnv.configStore();
})).catch(err => { })).catch(err => {
console.log(err); console.log(err);
process.exit(1); process.exit(1);
}); });
smartcli.startParse(); smartcli.startParse();
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnBtY2kuY2xpLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvbnBtY2kuY2xpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7QUFBQSwyQ0FBMEM7QUFDM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UMsS0FBSyxDQUFDLEdBQUc7SUFDVixPQUFPLENBQUMsR0FBRyxDQUFDLEdBQUcsQ0FBQyxDQUFBO0lBQ2hCLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FBQyxDQUFDLENBQUE7QUFDakIsQ0FBQyxDQUFDLENBQUE7QUFFSixVQUFVO0FBQ1YsUUFBUSxDQUFDLFVBQVUsQ0FBQyxTQUFTLENBQUM7S0FDM0IsSUFBSSxDQUFDLENBQU8sSUFBSTtJQUNmLElBQUksVUFBVSxHQUFHLE1BQU0sU0FBUyxDQUFDLFVBQVUsQ0FBQyxJQUFJLEVBQUUsQ0FBQTtJQUNsRCxNQUFNLFVBQVUsQ0FBQyxPQUFPLEVBQUUsQ0FBQTtBQUM1QixDQUFDLENBQUEsQ0FBQyxDQUFDLEtBQUssQ0FBQyxHQUFHO0lBQ1YsT0FBTyxDQUFDLEdBQUcsQ0FBQyxHQUFHLENBQUMsQ0FBQTtJQUNoQixPQUFPLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQyxDQUFBO0FBQ2pCLENBQUMsQ0FBQyxDQUFBO0FBRUosUUFBUSxDQUFDLFVBQVUsRUFBRSxDQUFBIn0=

22
dist/npmci.env.d.ts vendored
View File

@ -1,27 +1,5 @@
import { GitRepo } from 'smartstring'; import { GitRepo } from 'smartstring';
import { Dockerfile } from './mod_docker/index';
/** /**
* a info instance about the git respoitory at cwd :) * a info instance about the git respoitory at cwd :)
*/ */
export declare let repo: GitRepo; export declare let repo: GitRepo;
/**
* the build stage
*/
export declare let buildStage: string;
export declare let dockerRegistry: string;
export declare let setDockerRegistry: (dockerRegistryArg: string) => void;
export declare let dockerFilesBuilt: Dockerfile[];
export declare let dockerFiles: Dockerfile[];
/**
* the config
*/
export declare let config: {
dockerRegistry: any;
dockerFilesBuilt: Dockerfile[];
dockerFiles: Dockerfile[];
project: any;
};
/**
* the configuration store
*/
export declare let configStore: () => Promise<void>;

64
dist/npmci.env.js vendored
View File

@ -1,69 +1,7 @@
"use strict"; "use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
const plugins = require("./npmci.plugins");
const paths = require("./npmci.paths");
const smartstring_1 = require("smartstring"); const smartstring_1 = require("smartstring");
if (process.env.CI_REPOSITORY_URL) { if (process.env.CI_REPOSITORY_URL) {
exports.repo = new smartstring_1.GitRepo(process.env.CI_REPOSITORY_URL); exports.repo = new smartstring_1.GitRepo(process.env.CI_REPOSITORY_URL);
} }
/** //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnBtY2kuZW52LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvbnBtY2kuZW52LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBRUEsNkNBQXFDO0FBT3JDLEVBQUUsQ0FBQyxDQUFDLE9BQU8sQ0FBQyxHQUFHLENBQUMsaUJBQWlCLENBQUMsQ0FBQyxDQUFDO0lBQ2xDLFlBQUksR0FBRyxJQUFJLHFCQUFPLENBQUMsT0FBTyxDQUFDLEdBQUcsQ0FBQyxpQkFBaUIsQ0FBQyxDQUFBO0FBQ25ELENBQUMifQ==
* the build stage
*/
exports.buildStage = process.env.CI_BUILD_STAGE;
exports.setDockerRegistry = (dockerRegistryArg) => {
exports.dockerRegistry = dockerRegistryArg;
};
exports.dockerFilesBuilt = [];
exports.dockerFiles = [];
/**
* the config
*/
exports.config = {
dockerRegistry: undefined,
dockerFilesBuilt: exports.dockerFilesBuilt,
dockerFiles: exports.dockerFiles,
project: undefined
};
/**
* the configuration store
*/
exports.configStore = () => __awaiter(this, void 0, void 0, function* () {
exports.config.dockerRegistry = exports.dockerRegistry;
plugins.smartfile.memory.toFsSync(JSON.stringify(exports.config), paths.NpmciPackageConfig);
});
/**
* load the config in case a previous run has stored it
*/
let configLoad = () => {
// internal config to transfer information in between npmci shell calls
try {
plugins.lodash.assign(exports.config, plugins.smartfile.fs.toObjectSync(paths.NpmciPackageConfig, 'json'));
}
catch (err) {
exports.configStore();
plugins.beautylog.log('config initialized!');
}
// project config
try {
if (!exports.config.project) {
exports.config.project = plugins.smartfile.fs.toObjectSync(paths.NpmciProjectDir, 'npmci.json');
plugins.beautylog.ok('project config found!');
}
}
catch (err) {
exports.config.project = {};
plugins.beautylog.log('no project config found, so proceeding with default behaviour!');
}
exports.config.dockerRegistry ? exports.dockerRegistry = exports.config.dockerRegistry : void (0);
exports.config.dockerFilesBuilt ? exports.dockerFilesBuilt = exports.config.dockerFilesBuilt : void (0);
};
configLoad();
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnBtY2kuZW52LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvbnBtY2kuZW52LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7QUFBQSwyQ0FBMEM7QUFDMUMsdUNBQXNDO0FBQ3RDLDZDQUFxQztBQU9yQyxFQUFFLENBQUMsQ0FBQyxPQUFPLENBQUMsR0FBRyxDQUFDLGlCQUFpQixDQUFDLENBQUMsQ0FBQztJQUNsQyxZQUFJLEdBQUcsSUFBSSxxQkFBTyxDQUFDLE9BQU8sQ0FBQyxHQUFHLENBQUMsaUJBQWlCLENBQUMsQ0FBQTtBQUNuRCxDQUFDO0FBRUQ7O0dBRUc7QUFDUSxRQUFBLFVBQVUsR0FBVyxPQUFPLENBQUMsR0FBRyxDQUFDLGNBQWMsQ0FBQTtBQUkvQy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ENBQUMsQ0FBQTtJQUM5QyxDQUFDO0lBRUQsaUJBQWlCO0lBQ2pCLElBQUksQ0FBQztRQUNILEVBQUUsQ0FBQyxDQUFDLENBQUMsY0FBTSxDQUFDLE9BQU8sQ0FBQyxDQUFDLENBQUM7WUFDcEIsY0FBTSxDQUFDLE9BQU8sR0FBRyxPQUFPLENBQUMsU0FBUyxDQUFDLEVBQUUsQ0FBQyxZQUFZLENBQUMsS0FBSyxDQUFDLGVBQWUsRUFBRSxZQUFZLENBQUMsQ0FBQTtZQUN2RixPQUFPLENBQUMsU0FBUyxDQUFDLEVBQUUsQ0FBQyx1QkFBdUIsQ0FBQyxDQUFBO1FBQy9DLENBQUM7SUFDSCxDQUFDO0lBQUMsS0FBSyxDQUFDLENBQUMsR0FBRyxDQUFDLENBQUMsQ0FBQztRQUNiLGNBQU0sQ0FBQyxPQUFPLEdBQUcsRUFBRSxDQUFBO1FBQ25CLE9BQU8sQ0FBQyxTQUFTLENBQUMsR0FBRyxDQUFDLGdFQUFnRSxDQUFDLENBQUE7SUFDekYsQ0FBQztJQUVELGNBQU0sQ0FBQyxjQUFjLEdBQUcsc0JBQWMsR0FBRyxjQUFNLENBQUMsY0FBYyxHQUFHLEtBQUssQ0FBQyxDQUFDLENBQUMsQ0FBQTtJQUN6RSxjQUFNLENBQUMsZ0JBQWdCLEdBQUcsd0JBQWdCLEdBQUcsY0FBTSxDQUFDLGdCQUFnQixHQUFHLEtBQUssQ0FBQyxDQUFDLENBQUMsQ0FBQTtBQUNqRixDQUFDLENBQUE7QUFDRCxVQUFVLEVBQUUsQ0FBQSJ9

View File

@ -34,15 +34,6 @@ let dockerfile1: npmciModDocker.Dockerfile
let dockerfile2: npmciModDocker.Dockerfile let dockerfile2: npmciModDocker.Dockerfile
let sortableArray: npmciModDocker.Dockerfile[] let sortableArray: npmciModDocker.Dockerfile[]
tap.test('should prepare a Docker file', async () => {
await npmciModDocker.handleCli({
_: [
'docker',
'prepare'
]
})
})
tap.test('should return valid Dockerfiles', async () => { tap.test('should return valid Dockerfiles', async () => {
dockerfile1 = new npmciModDocker.Dockerfile({ filePath: './Dockerfile', read: true }) dockerfile1 = new npmciModDocker.Dockerfile({ filePath: './Dockerfile', read: true })
dockerfile2 = new npmciModDocker.Dockerfile({ filePath: './Dockerfile_sometag1', read: true }) dockerfile2 = new npmciModDocker.Dockerfile({ filePath: './Dockerfile_sometag1', read: true })
@ -92,11 +83,11 @@ tap.test('should test dockerfiles', async () => {
}) })
}) })
tap.test('should prepare docker daemon', async () => { tap.test('should login docker daemon', async () => {
return await npmciModDocker.handleCli({ return await npmciModDocker.handleCli({
_: [ _: [
'docker', 'docker',
'prepare' 'login'
] ]
}) })
}) })
@ -147,8 +138,4 @@ tap.test('reset paths', async () => {
} }
}) })
tap.test('', async () => {
await npmciEnv.configStore()
})
tap.start() tap.start()

View File

@ -11,10 +11,10 @@ export let handleCli = async (argvArg) => {
let action: string = argvArg._[1] let action: string = argvArg._[1]
switch (action) { switch (action) {
default: default:
plugins.beautylog.error(`>>npmci node ...<< action >>${action}<< not supported`) plugins.beautylog.error(`>>npmci cloudflare ...<< action >>${action}<< not supported`)
} }
} else { } else {
plugins.beautylog.log(`>>npmci node ...<< cli arguments invalid... Please read the documentation.`) plugins.beautylog.log(`>>npmci cloudflare ...<< cli arguments invalid... Please read the documentation.`)
} }
} }

View File

@ -1,6 +1,5 @@
import * as plugins from './mod.plugins' import * as plugins from './mod.plugins'
import * as paths from '../npmci.paths' import * as paths from '../npmci.paths'
import * as NpmciEnv from '../npmci.env'
import { bash } from '../npmci.bash' import { bash } from '../npmci.bash'
import * as helpers from './mod.helpers' import * as helpers from './mod.helpers'
@ -32,8 +31,8 @@ export let handleCli = async (argvArg) => {
case 'build': case 'build':
await build() await build()
break break
case 'prepare': case 'login':
await prepare() await login()
break break
case 'test': case 'test':
await test() await test()
@ -45,10 +44,10 @@ export let handleCli = async (argvArg) => {
await pull(argvArg) await pull(argvArg)
break break
default: default:
plugins.beautylog.error(`>>npmci node ...<< action >>${action}<< not supported`) plugins.beautylog.error(`>>npmci docker ...<< action >>${action}<< not supported`)
} }
} else { } else {
plugins.beautylog.log(`>>npmci node ...<< cli arguments invalid... Please read the documentation.`) plugins.beautylog.log(`>>npmci docker ...<< cli arguments invalid... Please read the documentation.`)
} }
} }
@ -56,6 +55,7 @@ export let handleCli = async (argvArg) => {
* builds a cwd of Dockerfiles by triggering a promisechain * builds a cwd of Dockerfiles by triggering a promisechain
*/ */
export let build = async () => { export let build = async () => {
await prepare()
plugins.beautylog.log('now building Dockerfiles...') plugins.beautylog.log('now building Dockerfiles...')
await helpers.readDockerfiles() await helpers.readDockerfiles()
.then(helpers.sortDockerfiles) .then(helpers.sortDockerfiles)
@ -63,12 +63,18 @@ export let build = async () => {
.then(helpers.buildDockerfiles) .then(helpers.buildDockerfiles)
} }
/**
* login to the DockerRegistries
*/
export let login = async () => {
await prepare()
await npmciRegistryStorage.loginAll()
}
/** /**
* logs in docker * logs in docker
*/ */
export let prepare = async () => { export let prepare = async () => {
NpmciEnv.setDockerRegistry('docker.io') // TODO: checkup why we set this here
// Always login to GitLab Registry // Always login to GitLab Registry
if (!process.env.CI_BUILD_TOKEN || process.env.CI_BUILD_TOKEN === '') { if (!process.env.CI_BUILD_TOKEN || process.env.CI_BUILD_TOKEN === '') {
plugins.beautylog.error('No registry token specified by gitlab!') plugins.beautylog.error('No registry token specified by gitlab!')
@ -85,12 +91,12 @@ export let prepare = async () => {
npmciRegistryStorage.addRegistry( npmciRegistryStorage.addRegistry(
DockerRegistry.fromEnvString(envString) DockerRegistry.fromEnvString(envString)
) )
await npmciRegistryStorage.loginAll()
}) })
return return
} }
export let push = async (argvArg) => { export let push = async (argvArg) => {
await prepare()
let registryUrlArg = argvArg._[ 2 ] let registryUrlArg = argvArg._[ 2 ]
let suffix = null let suffix = null
if (argvArg._.length >= 4) { if (argvArg._.length >= 4) {
@ -100,12 +106,17 @@ export let push = async (argvArg) => {
.then(helpers.sortDockerfiles) .then(helpers.sortDockerfiles)
.then(helpers.mapDockerfiles) .then(helpers.mapDockerfiles)
let localDockerRegistry = npmciRegistryStorage.getRegistryByUrl(registryUrlArg) let localDockerRegistry = npmciRegistryStorage.getRegistryByUrl(registryUrlArg)
if (!localDockerRegistry) {
plugins.beautylog.error(`Cannot push to registry ${registryUrlArg}, because it was not found in the authenticated registry list.`)
process.exit(1)
}
for (let dockerfile of dockerfileArray) { for (let dockerfile of dockerfileArray) {
dockerfile.push(localDockerRegistry, suffix) dockerfile.push(localDockerRegistry, suffix)
} }
} }
export let pull = async (argvArg) => { export let pull = async (argvArg) => {
await prepare()
let registryUrlArg = argvArg._[ 2 ] let registryUrlArg = argvArg._[ 2 ]
let suffix = null let suffix = null
if (argvArg._.length >= 4) { if (argvArg._.length >= 4) {
@ -121,6 +132,7 @@ export let pull = async (argvArg) => {
} }
export let test = async () => { export let test = async () => {
await prepare()
return await helpers.readDockerfiles() return await helpers.readDockerfiles()
.then(helpers.testDockerfiles) .then(helpers.testDockerfiles)
} }

View File

@ -42,7 +42,6 @@ export class Dockerfile {
plugins.beautylog.info('now building Dockerfile for ' + this.cleanTag) plugins.beautylog.info('now building Dockerfile for ' + this.cleanTag)
let buildCommand = `docker build -t ${this.buildTag} -f ${this.filePath} .` let buildCommand = `docker build -t ${this.buildTag} -f ${this.filePath} .`
await bash(buildCommand) await bash(buildCommand)
NpmciEnv.dockerFilesBuilt.push(this)
return return
} }

View File

@ -25,10 +25,10 @@ export let handleCli = async (argvArg) => {
await test() await test()
break break
default: default:
plugins.beautylog.error(`>>npmci node ...<< action >>${action}<< not supported`) plugins.beautylog.error(`>>npmci npm ...<< action >>${action}<< not supported`)
} }
} else { } else {
plugins.beautylog.log(`>>npmci node ...<< cli arguments invalid... Please read the documentation.`) plugins.beautylog.log(`>>npmci npm ...<< cli arguments invalid... Please read the documentation.`)
} }
} }

View File

@ -15,7 +15,6 @@ smartcli.addCommand('clean')
.then(async (argv) => { .then(async (argv) => {
let modClean = await npmciMods.modClean.load() let modClean = await npmciMods.modClean.load()
await modClean.clean() await modClean.clean()
await NpmciEnv.configStore()
}).catch(err => { }).catch(err => {
console.log(err) console.log(err)
process.exit(1) process.exit(1)
@ -26,7 +25,6 @@ smartcli.addCommand('cloudflare')
.then(async (argvArg) => { .then(async (argvArg) => {
let modPurge = await npmciMods.modCloudflare.load() let modPurge = await npmciMods.modCloudflare.load()
await modPurge.handleCli(argvArg) await modPurge.handleCli(argvArg)
await NpmciEnv.configStore()
}).catch(err => { }).catch(err => {
console.log(err) console.log(err)
}) })
@ -36,7 +34,6 @@ smartcli.addCommand('command')
.then(async (argv) => { .then(async (argv) => {
let modCommand = await npmciMods.modCommand.load() let modCommand = await npmciMods.modCommand.load()
await modCommand.command() await modCommand.command()
await NpmciEnv.configStore()
}).catch(err => { }).catch(err => {
console.log(err) console.log(err)
process.exit(1) process.exit(1)
@ -47,7 +44,6 @@ smartcli.addCommand('docker')
.then(async argvArg => { .then(async argvArg => {
let modDocker = await npmciMods.modDocker.load() let modDocker = await npmciMods.modDocker.load()
await modDocker.handleCli(argvArg) await modDocker.handleCli(argvArg)
NpmciEnv.configStore()
}).catch(err => { }).catch(err => {
console.log(err) console.log(err)
process.exit(1) process.exit(1)
@ -58,7 +54,6 @@ smartcli.addCommand('node')
.then(async (argvArg) => { .then(async (argvArg) => {
let modNode = await npmciMods.modNode.load() let modNode = await npmciMods.modNode.load()
await modNode.handleCli(argvArg) await modNode.handleCli(argvArg)
await NpmciEnv.configStore()
}).catch(err => { }).catch(err => {
console.log(err) console.log(err)
}) })
@ -68,7 +63,6 @@ smartcli.addCommand('npm')
.then(async (argvArg) => { .then(async (argvArg) => {
let modNpm = await npmciMods.modNpm.load() let modNpm = await npmciMods.modNpm.load()
await modNpm.handleCli(argvArg) await modNpm.handleCli(argvArg)
await NpmciEnv.configStore()
}).catch(err => { }).catch(err => {
console.log(err) console.log(err)
}) })
@ -78,7 +72,6 @@ smartcli.addCommand('ssh')
.then(async (argvArg) => { .then(async (argvArg) => {
let modSsh = await npmciMods.modSsh.load() let modSsh = await npmciMods.modSsh.load()
await modSsh.handleCli(argvArg) await modSsh.handleCli(argvArg)
await NpmciEnv.configStore()
}).catch(err => { }).catch(err => {
console.log(err) console.log(err)
process.exit(1) process.exit(1)
@ -89,7 +82,6 @@ smartcli.addCommand('trigger')
.then(async (argv) => { .then(async (argv) => {
let modTrigger = await npmciMods.modTrigger.load() let modTrigger = await npmciMods.modTrigger.load()
await modTrigger.trigger() await modTrigger.trigger()
await NpmciEnv.configStore()
}).catch(err => { }).catch(err => {
console.log(err) console.log(err)
process.exit(1) process.exit(1)

View File

@ -10,65 +10,3 @@ export let repo: GitRepo
if (process.env.CI_REPOSITORY_URL) { if (process.env.CI_REPOSITORY_URL) {
repo = new GitRepo(process.env.CI_REPOSITORY_URL) repo = new GitRepo(process.env.CI_REPOSITORY_URL)
} }
/**
* the build stage
*/
export let buildStage: string = process.env.CI_BUILD_STAGE
// handling config between commands
export let dockerRegistry: string // will be set by npmci.prepare
export let setDockerRegistry = (dockerRegistryArg: string) => {
dockerRegistry = dockerRegistryArg
}
export let dockerFilesBuilt: Dockerfile[] = []
export let dockerFiles: Dockerfile[] = []
/**
* the config
*/
export let config = {
dockerRegistry: undefined, // this will be set later on store
dockerFilesBuilt: dockerFilesBuilt,
dockerFiles: dockerFiles,
project: undefined
}
/**
* the configuration store
*/
export let configStore = async () => {
config.dockerRegistry = dockerRegistry
plugins.smartfile.memory.toFsSync(
JSON.stringify(config),
paths.NpmciPackageConfig
)
}
/**
* load the config in case a previous run has stored it
*/
let configLoad = () => {
// internal config to transfer information in between npmci shell calls
try {
plugins.lodash.assign(config, plugins.smartfile.fs.toObjectSync(paths.NpmciPackageConfig, 'json'))
} catch (err) {
configStore()
plugins.beautylog.log('config initialized!')
}
// project config
try {
if (!config.project) {
config.project = plugins.smartfile.fs.toObjectSync(paths.NpmciProjectDir, 'npmci.json')
plugins.beautylog.ok('project config found!')
}
} catch (err) {
config.project = {}
plugins.beautylog.log('no project config found, so proceeding with default behaviour!')
}
config.dockerRegistry ? dockerRegistry = config.dockerRegistry : void (0)
config.dockerFilesBuilt ? dockerFilesBuilt = config.dockerFilesBuilt : void (0)
}
configLoad()