Compare commits

...

12 Commits

Author SHA1 Message Date
e2e7967fba 4.1.14 2023-06-26 09:28:19 +02:00
45b8d67abf fix(core): update 2023-06-26 09:28:19 +02:00
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
6b5390cef8 4.1.9 2023-06-25 23:26:25 +02:00
2736b85de3 fix(core): update 2023-06-25 23:26:25 +02:00
8 changed files with 1280 additions and 1011 deletions

View File

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

View File

@@ -1,6 +1,6 @@
{
"name": "@shipzone/npmci",
"version": "4.1.8",
"version": "4.1.14",
"private": false,
"description": "node and docker in gitlab ci on steroids",
"main": "dist_ts/index.js",
@@ -26,37 +26,37 @@
},
"homepage": "https://gitlab.com/gitzone/npmci#README",
"devDependencies": {
"@gitzone/tsbuild": "^2.1.65",
"@gitzone/tsrun": "^1.2.37",
"@gitzone/tstest": "^1.0.73",
"@pushrocks/tapbundle": "^5.0.4",
"@types/node": "^18.8.3"
"@gitzone/tsbuild": "^2.1.66",
"@gitzone/tsrun": "^1.2.42",
"@gitzone/tstest": "^1.0.74",
"@pushrocks/tapbundle": "^5.0.8",
"@types/node": "^20.3.1"
},
"dependencies": {
"@apiglobal/typedrequest": "^2.0.10",
"@pushrocks/lik": "^6.0.0",
"@pushrocks/lik": "^6.0.2",
"@pushrocks/npmextra": "^3.0.9",
"@pushrocks/projectinfo": "^5.0.1",
"@pushrocks/qenv": "^5.0.2",
"@pushrocks/smartanalytics": "^2.0.15",
"@pushrocks/smartcli": "^4.0.6",
"@pushrocks/smartdelay": "^2.0.13",
"@pushrocks/smartenv": "^5.0.3",
"@pushrocks/smartfile": "^10.0.5",
"@pushrocks/smartdelay": "^3.0.1",
"@pushrocks/smartenv": "^5.0.5",
"@pushrocks/smartfile": "^10.0.25",
"@pushrocks/smartgit": "^3.0.0",
"@pushrocks/smartlog": "^3.0.1",
"@pushrocks/smartlog-destination-local": "^8.0.8",
"@pushrocks/smartlog": "^3.0.2",
"@pushrocks/smartlog-destination-local": "^9.0.0",
"@pushrocks/smartparam": "^1.1.6",
"@pushrocks/smartpath": "^5.0.5",
"@pushrocks/smartpromise": "^3.1.7",
"@pushrocks/smartrequest": "^2.0.11",
"@pushrocks/smartshell": "^2.0.30",
"@pushrocks/smartsocket": "^2.0.7",
"@pushrocks/smartpromise": "^4.0.2",
"@pushrocks/smartrequest": "^2.0.15",
"@pushrocks/smartshell": "^3.0.3",
"@pushrocks/smartsocket": "^2.0.19",
"@pushrocks/smartssh": "^2.0.0",
"@pushrocks/smartstring": "^4.0.5",
"@servezone/interfaces": "^1.0.3",
"@tsclass/tsclass": "^4.0.21",
"@types/through2": "^2.0.36",
"@tsclass/tsclass": "^4.0.42",
"@types/through2": "^2.0.38",
"through2": "^4.0.2"
},
"files": [

2218
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

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

View File

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

View File

@@ -77,17 +77,20 @@ export class NpmciDockerManager {
*/
public prepare = async () => {
// Always login to GitLab Registry
if (!process.env.CI_JOB_TOKEN || process.env.CI_JOB_TOKEN === '') {
logger.log('error', 'No registry token specified by gitlab!');
process.exit(1);
if (process.env.GITLAB_CI) {
console.log('gitlab ci detected');
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
await plugins.smartparam.forEachMinimatch(

View File

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

View File

@@ -9,7 +9,12 @@ export class NpmciEnv {
constructor(npmciRefArg: Npmci) {
this.npmciRef = npmciRefArg;
this.repoString = process.env.CI_REPOSITORY_URL;
if (process.env.GITLAB_CI) {
this.repoString = process.env.CI_REPOSITORY_URL;
}
if (process.env.NPMCI_COMPUTED_REPOURL) {
this.repoString = process.env.NPMCI_COMPUTED_REPOURL;
}
if (!this.repoString) {
this.repoString = 'https://undefined:undefined@github.com/undefined/undefined.git';
}