fix(core): update

This commit is contained in:
2023-05-07 21:30:58 +02:00
parent e51b2e28b9
commit 0d8b54637c
8 changed files with 17 additions and 18 deletions

View File

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

View File

@ -77,7 +77,7 @@ export class NpmciDockerManager {
*/
public prepare = async () => {
// Always login to GitLab Registry
if (!process.env.CI_BUILD_TOKEN || process.env.CI_BUILD_TOKEN === '') {
if (!process.env.CI_JOB_TOKEN || process.env.CI_JOB_TOKEN === '') {
logger.log('error', 'No registry token specified by gitlab!');
process.exit(1);
}
@ -85,7 +85,7 @@ export class NpmciDockerManager {
new DockerRegistry({
registryUrl: 'registry.gitlab.com',
username: 'gitlab-ci-token',
password: process.env.CI_BUILD_TOKEN,
password: process.env.CI_JOB_TOKEN,
})
);

View File

@ -182,7 +182,10 @@ export class Dockerfile {
)) {
const dockerArgOuterEnvVar =
npmciDockerManagerRef.npmciRef.npmciConfig.getConfig().dockerBuildargEnvMap[dockerArgKey];
logger.log('note', `docker ARG "${dockerArgKey}" maps to outer env var "${dockerArgOuterEnvVar}"`);
logger.log(
'note',
`docker ARG "${dockerArgKey}" maps to outer env var "${dockerArgOuterEnvVar}"`
);
const targetValue = process.env[dockerArgOuterEnvVar];
buildArgsString = `${buildArgsString} --build-arg ${dockerArgKey}="${targetValue}"`;
}

View File

@ -1 +1 @@
export * from '../npmci.plugins.js';
export * from '../npmci.plugins.js';

View File

@ -82,15 +82,13 @@ export class NpmciCli {
this.smartcli.addCommand('precheck').subscribe(async (argvArg) => {
const modPrecheck = await import('./mod_precheck/index.js');
await modPrecheck.handleCli(this.npmciRef, argvArg);
})
});
// trigger
this.smartcli.addCommand('ssh').subscribe(
async (argvArg) => {
const modSsh = await import('./mod_ssh/index.js');
await modSsh.handleCli(argvArg);
}
);
this.smartcli.addCommand('ssh').subscribe(async (argvArg) => {
const modSsh = await import('./mod_ssh/index.js');
await modSsh.handleCli(argvArg);
});
// trigger
this.smartcli.addCommand('trigger').subscribe(