Compare commits

...

8 Commits

Author SHA1 Message Date
0a69aa5d62 4.1.13 2023-06-26 02:43:45 +02:00
dfbab1a1df fix(core): update 2023-06-26 02:43:45 +02:00
e58f009a24 4.1.12 2023-06-26 01:03:44 +02:00
2afd9cddc5 fix(core): update 2023-06-26 01:03:44 +02:00
d79c5366ef 4.1.11 2023-06-26 00:09:56 +02:00
8e4f7ad244 fix(core): update 2023-06-26 00:09:54 +02:00
39de3a1601 4.1.10 2023-06-25 23:59:26 +02:00
cb3d2964d1 fix(core): update 2023-06-25 23:59:25 +02:00
6 changed files with 19 additions and 13 deletions

View File

@@ -9,6 +9,7 @@ env:
IMAGE: registry.gitlab.com/hosttoday/ht-docker-node:npmci IMAGE: registry.gitlab.com/hosttoday/ht-docker-node:npmci
NPMCI_TOKEN_NPM: ${{secrets.NPMCI_TOKEN_NPM}} NPMCI_TOKEN_NPM: ${{secrets.NPMCI_TOKEN_NPM}}
NPMCI_GIT_GITHUBTOKEN: ${{secrets.NPMCI_GIT_GITHUBTOKEN}} NPMCI_GIT_GITHUBTOKEN: ${{secrets.NPMCI_GIT_GITHUBTOKEN}}
NPMCI_LOGIN_DOCKER_GITEA: ${{secrets.NPMCI_DOCKER_REGISTRYURL_DEFAULT}}|${{ gitea.repository_owner }}|${{ secrets.GITEA_TOKEN }}
jobs: jobs:

View File

@@ -1,6 +1,6 @@
{ {
"name": "@shipzone/npmci", "name": "@shipzone/npmci",
"version": "4.1.9", "version": "4.1.13",
"private": false, "private": false,
"description": "node and docker in gitlab ci on steroids", "description": "node and docker in gitlab ci on steroids",
"main": "dist_ts/index.js", "main": "dist_ts/index.js",

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.13',
description: 'node and docker in gitlab ci on steroids' description: 'node and docker in gitlab ci on steroids'
} }

View File

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

View File

@@ -26,7 +26,7 @@ export class DockerRegistry {
process.exit(1); process.exit(1);
return; return;
} }
const registryUrl = dockerRegexResultArray[0]; const registryUrl = dockerRegexResultArray[0].replace('https://', '').replace('http://', '');
const username = dockerRegexResultArray[1]; const username = dockerRegexResultArray[1];
const password = dockerRegexResultArray[2]; const password = dockerRegexResultArray[2];
return new DockerRegistry({ return new DockerRegistry({