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 = {
name: '@shipzone/npmci',
version: '4.1.1',
version: '4.1.2',
description: 'node and docker in gitlab ci on steroids'
}

View File

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