fix(core): update

This commit is contained in:
Philipp Kunz 2022-11-02 18:57:47 +01:00
parent 0d4d69f072
commit f767140cc8
2 changed files with 7 additions and 7 deletions

View File

@ -3,6 +3,6 @@
*/ */
export const commitinfo = { export const commitinfo = {
name: '@shipzone/npmci', name: '@shipzone/npmci',
version: '4.1.1', version: '4.1.2',
description: 'node and docker in gitlab ci on steroids' description: 'node and docker in gitlab ci on steroids'
} }

View File

@ -177,14 +177,14 @@ export class Dockerfile {
): Promise<string> { ): Promise<string> {
logger.log('info', 'checking for env vars to be supplied to the docker build'); logger.log('info', 'checking for env vars to be supplied to the docker build');
let buildArgsString: string = ''; let buildArgsString: string = '';
for (const key of Object.keys( for (const dockerArgKey of Object.keys(
npmciDockerManagerRef.npmciRef.npmciConfig.getConfig().dockerBuildargEnvMap npmciDockerManagerRef.npmciRef.npmciConfig.getConfig().dockerBuildargEnvMap
)) { )) {
const targetValue = const dockerArgOuterEnvVar =
process.env[ npmciDockerManagerRef.npmciRef.npmciConfig.getConfig().dockerBuildargEnvMap[dockerArgKey];
npmciDockerManagerRef.npmciRef.npmciConfig.getConfig().dockerBuildargEnvMap[key] logger.log('note', `docker ARG "${dockerArgKey}" maps to outer env var "${dockerArgOuterEnvVar}"`);
]; const targetValue = process.env[dockerArgOuterEnvVar];
buildArgsString = `${buildArgsString} --build-arg ${key}="${targetValue}"`; buildArgsString = `${buildArgsString} --build-arg ${dockerArgKey}="${targetValue}"`;
} }
return buildArgsString; return buildArgsString;
} }