now has working dockerBuildArgEnvMap

This commit is contained in:
Philipp Kunz 2017-08-29 06:07:13 +02:00
parent 37b3c1abc9
commit c247cc2892
8 changed files with 16 additions and 11 deletions

File diff suppressed because one or more lines are too long

View File

@ -2,7 +2,7 @@ import { KeyValueStore } from 'npmextra';
export interface INpmciOptions { export interface INpmciOptions {
npmGlobalTools: string[]; npmGlobalTools: string[];
dockerRegistryRepoMap: any; dockerRegistryRepoMap: any;
dockerEnvBuildargMap: any; dockerBuildargEnvMap: any;
} }
export declare let kvStorage: KeyValueStore; export declare let kvStorage: KeyValueStore;
export declare let configObject: INpmciOptions; export declare let configObject: INpmciOptions;

View File

@ -19,7 +19,7 @@ let npmciNpmextra = new plugins.npmextra.Npmextra(paths.cwd);
let defaultConfig = { let defaultConfig = {
npmGlobalTools: [], npmGlobalTools: [],
dockerRegistryRepoMap: {}, dockerRegistryRepoMap: {},
dockerEnvBuildargMap: {} dockerBuildargEnvMap: {}
}; };
exports.configObject = npmciNpmextra.dataFor('npmci', defaultConfig); exports.configObject = npmciNpmextra.dataFor('npmci', defaultConfig);
exports.getConfig = () => __awaiter(this, void 0, void 0, function* () { exports.getConfig = () => __awaiter(this, void 0, void 0, function* () {

View File

@ -1,3 +1,4 @@
import 'typings-global';
export import beautylog = require('beautylog'); export import beautylog = require('beautylog');
export declare let gulp: any; export declare let gulp: any;
export import gulpFunction = require('gulp-function'); export import gulpFunction = require('gulp-function');

View File

@ -1,5 +1,6 @@
"use strict"; "use strict";
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
require("typings-global");
exports.beautylog = require("beautylog"); exports.beautylog = require("beautylog");
exports.gulp = require('gulp'); exports.gulp = require('gulp');
exports.gulpFunction = require("gulp-function"); exports.gulpFunction = require("gulp-function");
@ -22,4 +23,4 @@ exports.smartsystem = require("smartsystem");
exports.smartssh = require("smartssh"); exports.smartssh = require("smartssh");
exports.smartstring = require("smartstring"); exports.smartstring = require("smartstring");
exports.through2 = require("through2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2xELDhCQUFtQztBQUN4QixRQUFBLE9BQU8sR0FBRyxPQUFPLENBQUMsU0FBUyxDQUFDLENBQUE7QUFDdkMsdUNBQTRDO0FBQzVDLDJDQUFnRDtBQUNoRCx5Q0FBOEM7QUFDOUMscUNBQTBDO0FBQzFDLCtDQUFvRDtBQUNwRCwyQ0FBZ0Q7QUFDaEQsbUNBQXdDO0FBQ3hDLDJDQUFnRDtBQUNoRCw2Q0FBa0Q7QUFDbEQsNkNBQWtEO0FBQ2xELHVDQUE0QztBQUM1Qyw2Q0FBa0Q7QUFDbEQsdUNBQTRDIn0=

View File

@ -156,8 +156,9 @@ export let getDockerTagString = (registryArg: string, repoArg: string, versionAr
export let getDockerBuildArgs = async (): Promise<string> => { export let getDockerBuildArgs = async (): Promise<string> => {
plugins.beautylog.info('checking for env vars to be supplied to the docker build') plugins.beautylog.info('checking for env vars to be supplied to the docker build')
let buildArgsString: string = '' let buildArgsString: string = ''
for (let key in NpmciConfig.configObject.dockerEnvBuildargMap) { for (let key in NpmciConfig.configObject.dockerBuildargEnvMap) {
// TODO let targetValue = process.env[NpmciConfig.configObject.dockerBuildargEnvMap[key]]
buildArgsString = `${buildArgsString} --build-arg ${key}=${targetValue}`
} }
return buildArgsString return buildArgsString
} }

View File

@ -10,7 +10,7 @@ import { KeyValueStore } from 'npmextra'
export interface INpmciOptions { export interface INpmciOptions {
npmGlobalTools: string[] npmGlobalTools: string[]
dockerRegistryRepoMap: any dockerRegistryRepoMap: any
dockerEnvBuildargMap: any dockerBuildargEnvMap: any
} }
// instantiate a kvStorage for the current directory // instantiate a kvStorage for the current directory
@ -21,7 +21,7 @@ let npmciNpmextra = new plugins.npmextra.Npmextra(paths.cwd)
let defaultConfig: INpmciOptions = { let defaultConfig: INpmciOptions = {
npmGlobalTools: [], npmGlobalTools: [],
dockerRegistryRepoMap: {}, dockerRegistryRepoMap: {},
dockerEnvBuildargMap: {} dockerBuildargEnvMap: {}
} }
export let configObject = npmciNpmextra.dataFor<INpmciOptions>('npmci', defaultConfig) export let configObject = npmciNpmextra.dataFor<INpmciOptions>('npmci', defaultConfig)

View File

@ -1,3 +1,4 @@
import 'typings-global'
export import beautylog = require('beautylog') export import beautylog = require('beautylog')
export let gulp = require('gulp') export let gulp = require('gulp')
export import gulpFunction = require('gulp-function') export import gulpFunction = require('gulp-function')