fix(core): update

This commit is contained in:
Philipp Kunz 2023-06-25 23:59:25 +02:00
parent 6b5390cef8
commit cb3d2964d1
3 changed files with 16 additions and 11 deletions

View File

@ -21,6 +21,8 @@ process.cwd = () => {
let npmci: typeof import('../ts/index.js'); let npmci: typeof import('../ts/index.js');
type TNpmciTypes = typeof import('../ts/index.js');
tap.preTask('should import npmci', async () => { tap.preTask('should import npmci', async () => {
npmci = await import('../ts/index.js'); npmci = await import('../ts/index.js');
}); });

View File

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

View File

@ -77,17 +77,20 @@ export class NpmciDockerManager {
*/ */
public prepare = async () => { public prepare = async () => {
// Always login to GitLab Registry // Always login to GitLab Registry
if (!process.env.CI_JOB_TOKEN || process.env.CI_JOB_TOKEN === '') { if (process.env.GITLAB_CI) {
logger.log('error', 'No registry token specified by gitlab!'); console.log('gitlab ci detected');
process.exit(1); if (!process.env.CI_JOB_TOKEN || process.env.CI_JOB_TOKEN === '') {
logger.log('error', 'Running in Gitlab CI, but no registry token specified by gitlab!');
process.exit(1);
}
this.npmciRegistryStorage.addRegistry(
new DockerRegistry({
registryUrl: 'registry.gitlab.com',
username: 'gitlab-ci-token',
password: process.env.CI_JOB_TOKEN,
})
);
} }
this.npmciRegistryStorage.addRegistry(
new DockerRegistry({
registryUrl: 'registry.gitlab.com',
username: 'gitlab-ci-token',
password: process.env.CI_JOB_TOKEN,
})
);
// handle registries // handle registries
await plugins.smartparam.forEachMinimatch( await plugins.smartparam.forEachMinimatch(