Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4c07131e51 | |||
| ba039469ff | |||
| 49f2498ecd | |||
| 1060060366 | |||
| 0fa3a579f7 | |||
| 0e4556d59e | |||
| e2e7967fba | |||
| 45b8d67abf | |||
| 0a69aa5d62 | |||
| dfbab1a1df | |||
| e58f009a24 | |||
| 2afd9cddc5 | |||
| d79c5366ef | |||
| 8e4f7ad244 | |||
| 39de3a1601 | |||
| cb3d2964d1 |
@@ -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:
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@shipzone/npmci",
|
"name": "@shipzone/npmci",
|
||||||
"version": "4.1.9",
|
"version": "4.1.17",
|
||||||
"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",
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
"@types/node": "^20.3.1"
|
"@types/node": "^20.3.1"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@apiglobal/typedrequest": "^2.0.10",
|
"@apiglobal/typedrequest": "^2.0.12",
|
||||||
"@pushrocks/lik": "^6.0.2",
|
"@pushrocks/lik": "^6.0.2",
|
||||||
"@pushrocks/npmextra": "^3.0.9",
|
"@pushrocks/npmextra": "^3.0.9",
|
||||||
"@pushrocks/projectinfo": "^5.0.1",
|
"@pushrocks/projectinfo": "^5.0.1",
|
||||||
@@ -53,7 +53,7 @@
|
|||||||
"@pushrocks/smartshell": "^3.0.3",
|
"@pushrocks/smartshell": "^3.0.3",
|
||||||
"@pushrocks/smartsocket": "^2.0.19",
|
"@pushrocks/smartsocket": "^2.0.19",
|
||||||
"@pushrocks/smartssh": "^2.0.0",
|
"@pushrocks/smartssh": "^2.0.0",
|
||||||
"@pushrocks/smartstring": "^4.0.5",
|
"@pushrocks/smartstring": "^4.0.7",
|
||||||
"@servezone/interfaces": "^1.0.3",
|
"@servezone/interfaces": "^1.0.3",
|
||||||
"@tsclass/tsclass": "^4.0.42",
|
"@tsclass/tsclass": "^4.0.42",
|
||||||
"@types/through2": "^2.0.38",
|
"@types/through2": "^2.0.38",
|
||||||
|
|||||||
53
pnpm-lock.yaml
generated
53
pnpm-lock.yaml
generated
@@ -6,8 +6,8 @@ settings:
|
|||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
'@apiglobal/typedrequest':
|
'@apiglobal/typedrequest':
|
||||||
specifier: ^2.0.10
|
specifier: ^2.0.12
|
||||||
version: 2.0.10
|
version: 2.0.12
|
||||||
'@pushrocks/lik':
|
'@pushrocks/lik':
|
||||||
specifier: ^6.0.2
|
specifier: ^6.0.2
|
||||||
version: 6.0.2
|
version: 6.0.2
|
||||||
@@ -66,8 +66,8 @@ dependencies:
|
|||||||
specifier: ^2.0.0
|
specifier: ^2.0.0
|
||||||
version: 2.0.0
|
version: 2.0.0
|
||||||
'@pushrocks/smartstring':
|
'@pushrocks/smartstring':
|
||||||
specifier: ^4.0.5
|
specifier: ^4.0.7
|
||||||
version: 4.0.5
|
version: 4.0.7
|
||||||
'@servezone/interfaces':
|
'@servezone/interfaces':
|
||||||
specifier: ^1.0.3
|
specifier: ^1.0.3
|
||||||
version: 1.0.3
|
version: 1.0.3
|
||||||
@@ -116,8 +116,8 @@ packages:
|
|||||||
/@apiglobal/typedrequest-interfaces@2.0.1:
|
/@apiglobal/typedrequest-interfaces@2.0.1:
|
||||||
resolution: {integrity: sha512-Oi7pNU4vKo5UvcCJmqkH43Us237Ws/Pp/WDYnwnonRnTmIMd+6QjNfN/gXcPnP6tbamk8r8Xzcz9mgnSDM2ysw==}
|
resolution: {integrity: sha512-Oi7pNU4vKo5UvcCJmqkH43Us237Ws/Pp/WDYnwnonRnTmIMd+6QjNfN/gXcPnP6tbamk8r8Xzcz9mgnSDM2ysw==}
|
||||||
|
|
||||||
/@apiglobal/typedrequest@2.0.10:
|
/@apiglobal/typedrequest@2.0.12:
|
||||||
resolution: {integrity: sha512-5Tayp+QVkRpQQa11eb/9eFZjR+Q7uzd0fFygoKPjrZ9IevHchuFX0TbDvf6PXVpfW3C7hAc2gjAmUHKrlWO7oA==}
|
resolution: {integrity: sha512-oCxcdKEzihzPDf0jrqG4obFFSgDszvO5LO+0Fk/hH/0bZm0AQ1LssYVwaY8OHjT0ujmkTcC5JFCjaS7LgjKSgQ==}
|
||||||
dependencies:
|
dependencies:
|
||||||
'@apiglobal/typedrequest-interfaces': 1.0.20
|
'@apiglobal/typedrequest-interfaces': 1.0.20
|
||||||
'@pushrocks/isounique': 1.0.5
|
'@pushrocks/isounique': 1.0.5
|
||||||
@@ -131,12 +131,12 @@ packages:
|
|||||||
/@apiglobal/typedsocket@2.0.24:
|
/@apiglobal/typedsocket@2.0.24:
|
||||||
resolution: {integrity: sha512-8Ol5E3AvqdUTjEhiNkEKnbGpst9iXBtD5zDudeQDcajzjSdstUGe+GExQRc+D7hiOkktfuF8FArQ3HQ4RyZwow==}
|
resolution: {integrity: sha512-8Ol5E3AvqdUTjEhiNkEKnbGpst9iXBtD5zDudeQDcajzjSdstUGe+GExQRc+D7hiOkktfuF8FArQ3HQ4RyZwow==}
|
||||||
dependencies:
|
dependencies:
|
||||||
'@apiglobal/typedrequest': 2.0.10
|
'@apiglobal/typedrequest': 2.0.12
|
||||||
'@apiglobal/typedrequest-interfaces': 2.0.1
|
'@apiglobal/typedrequest-interfaces': 2.0.1
|
||||||
'@pushrocks/isohash': 2.0.1
|
'@pushrocks/isohash': 2.0.1
|
||||||
'@pushrocks/smartjson': 5.0.6
|
'@pushrocks/smartjson': 5.0.6
|
||||||
'@pushrocks/smartsocket': 2.0.19
|
'@pushrocks/smartsocket': 2.0.19
|
||||||
'@pushrocks/smartstring': 4.0.5
|
'@pushrocks/smartstring': 4.0.7
|
||||||
'@pushrocks/smarturl': 3.0.6
|
'@pushrocks/smarturl': 3.0.6
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- bufferutil
|
- bufferutil
|
||||||
@@ -651,7 +651,7 @@ packages:
|
|||||||
'@pushrocks/smartfile': 9.0.6
|
'@pushrocks/smartfile': 9.0.6
|
||||||
'@pushrocks/smartpath': 5.0.5
|
'@pushrocks/smartpath': 5.0.5
|
||||||
'@pushrocks/smartpromise': 3.1.10
|
'@pushrocks/smartpromise': 3.1.10
|
||||||
'@pushrocks/smartstring': 4.0.5
|
'@pushrocks/smartstring': 4.0.7
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
dev: false
|
dev: false
|
||||||
@@ -747,7 +747,7 @@ packages:
|
|||||||
resolution: {integrity: sha512-/xuUshI4VtfM2Q8RJxsTjD/7sI2HZ4p4+CmKOZYK66nxgeyO+IkKM/qcxHdZLbuB2q/ekYNAfvce8VL0RxtTVQ==}
|
resolution: {integrity: sha512-/xuUshI4VtfM2Q8RJxsTjD/7sI2HZ4p4+CmKOZYK66nxgeyO+IkKM/qcxHdZLbuB2q/ekYNAfvce8VL0RxtTVQ==}
|
||||||
deprecated: This package has been replaced by @apiglobal/typedserver
|
deprecated: This package has been replaced by @apiglobal/typedserver
|
||||||
dependencies:
|
dependencies:
|
||||||
'@apiglobal/typedrequest': 2.0.10
|
'@apiglobal/typedrequest': 2.0.12
|
||||||
'@apiglobal/typedsocket': 2.0.24
|
'@apiglobal/typedsocket': 2.0.24
|
||||||
'@pushrocks/lik': 6.0.2
|
'@pushrocks/lik': 6.0.2
|
||||||
'@pushrocks/smartdelay': 2.0.13
|
'@pushrocks/smartdelay': 2.0.13
|
||||||
@@ -858,7 +858,7 @@ packages:
|
|||||||
'@pushrocks/smartpath': 5.0.5
|
'@pushrocks/smartpath': 5.0.5
|
||||||
'@pushrocks/smartpromise': 3.1.10
|
'@pushrocks/smartpromise': 3.1.10
|
||||||
'@pushrocks/smartshell': 2.0.30
|
'@pushrocks/smartshell': 2.0.30
|
||||||
'@pushrocks/smartstring': 4.0.5
|
'@pushrocks/smartstring': 4.0.7
|
||||||
'@types/minimatch': 3.0.5
|
'@types/minimatch': 3.0.5
|
||||||
isomorphic-git: 1.24.2
|
isomorphic-git: 1.24.2
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
@@ -895,7 +895,7 @@ packages:
|
|||||||
/@pushrocks/smartjson@5.0.6:
|
/@pushrocks/smartjson@5.0.6:
|
||||||
resolution: {integrity: sha512-9OJbnRgLTaCRQz+pqu5tB3ZCqRs5Zh0hnBe7t7URE+TgwIZ8aiELUIbWRkgn4mSGVzHyL6pqTyIowP6AjUCG3w==}
|
resolution: {integrity: sha512-9OJbnRgLTaCRQz+pqu5tB3ZCqRs5Zh0hnBe7t7URE+TgwIZ8aiELUIbWRkgn4mSGVzHyL6pqTyIowP6AjUCG3w==}
|
||||||
dependencies:
|
dependencies:
|
||||||
'@pushrocks/smartstring': 4.0.5
|
'@pushrocks/smartstring': 4.0.7
|
||||||
'@types/buffer-json': 2.0.1
|
'@types/buffer-json': 2.0.1
|
||||||
buffer-json: 2.0.0
|
buffer-json: 2.0.0
|
||||||
fast-json-stable-stringify: 2.1.0
|
fast-json-stable-stringify: 2.1.0
|
||||||
@@ -956,7 +956,7 @@ packages:
|
|||||||
dependencies:
|
dependencies:
|
||||||
'@pushrocks/smartping': 1.0.8
|
'@pushrocks/smartping': 1.0.8
|
||||||
'@pushrocks/smartpromise': 3.1.10
|
'@pushrocks/smartpromise': 3.1.10
|
||||||
'@pushrocks/smartstring': 4.0.5
|
'@pushrocks/smartstring': 4.0.7
|
||||||
'@types/default-gateway': 3.0.1
|
'@types/default-gateway': 3.0.1
|
||||||
isopen: 1.3.0
|
isopen: 1.3.0
|
||||||
public-ip: 6.0.1
|
public-ip: 6.0.1
|
||||||
@@ -1137,7 +1137,7 @@ packages:
|
|||||||
'@pushrocks/smartpath': 5.0.5
|
'@pushrocks/smartpath': 5.0.5
|
||||||
'@pushrocks/smartpromise': 3.1.10
|
'@pushrocks/smartpromise': 3.1.10
|
||||||
'@pushrocks/smartshell': 2.0.30
|
'@pushrocks/smartshell': 2.0.30
|
||||||
'@pushrocks/smartstring': 4.0.5
|
'@pushrocks/smartstring': 4.0.7
|
||||||
'@types/fs-extra': 9.0.13
|
'@types/fs-extra': 9.0.13
|
||||||
'@types/minimatch': 5.1.2
|
'@types/minimatch': 5.1.2
|
||||||
fs-extra: 10.1.0
|
fs-extra: 10.1.0
|
||||||
@@ -1156,14 +1156,14 @@ packages:
|
|||||||
from2: 2.3.0
|
from2: 2.3.0
|
||||||
through2: 4.0.2
|
through2: 4.0.2
|
||||||
|
|
||||||
/@pushrocks/smartstring@4.0.5:
|
/@pushrocks/smartstring@4.0.7:
|
||||||
resolution: {integrity: sha512-g9a/Mfj+eJAUrTDQoH3oaYegjI98WlVoSLAI8lpExQ/STlEJGO5ZdWDqgZ0HvHe+5UeWvxzCFpHifqRhMUJ+dQ==}
|
resolution: {integrity: sha512-TxHSar7Cj29E+GOcIj4DeZKWCNVzHKdqnrBRqcBqLqmeYZvzFosLXpFKoaCJDq7MSxuPoCvu5woSdp9YmPXyog==}
|
||||||
dependencies:
|
dependencies:
|
||||||
'@pushrocks/isounique': 1.0.5
|
'@pushrocks/isounique': 1.0.5
|
||||||
'@pushrocks/smartenv': 5.0.5
|
'@pushrocks/smartenv': 5.0.5
|
||||||
'@types/randomatic': 3.1.3
|
'@types/randomatic': 3.1.3
|
||||||
buffer: 6.0.3
|
buffer: 6.0.3
|
||||||
crypto-random-string: 4.0.0
|
crypto-random-string: 5.0.0
|
||||||
js-base64: 3.7.5
|
js-base64: 3.7.5
|
||||||
normalize-newline: 4.1.0
|
normalize-newline: 4.1.0
|
||||||
randomatic: 3.1.1
|
randomatic: 3.1.1
|
||||||
@@ -1762,6 +1762,11 @@ packages:
|
|||||||
- utf-8-validate
|
- utf-8-validate
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
|
/@xmldom/xmldom@0.8.8:
|
||||||
|
resolution: {integrity: sha512-0LNz4EY8B/8xXY86wMrQ4tz6zEHZv9ehFMJPm8u2gq5lQ71cfRKdaKyxfJAx5aUoyzx0qzgURblTisPGgz3d+Q==}
|
||||||
|
engines: {node: '>=10.0.0'}
|
||||||
|
dev: true
|
||||||
|
|
||||||
/accepts@1.3.8:
|
/accepts@1.3.8:
|
||||||
resolution: {integrity: sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==}
|
resolution: {integrity: sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==}
|
||||||
engines: {node: '>= 0.6'}
|
engines: {node: '>= 0.6'}
|
||||||
@@ -2229,11 +2234,11 @@ packages:
|
|||||||
shebang-command: 2.0.0
|
shebang-command: 2.0.0
|
||||||
which: 2.0.2
|
which: 2.0.2
|
||||||
|
|
||||||
/crypto-random-string@4.0.0:
|
/crypto-random-string@5.0.0:
|
||||||
resolution: {integrity: sha512-x8dy3RnvYdlUcPOjkEHqozhiwzKNSq7GcPuXFbnyMOCHxX8V3OgIg/pYuabl2sbUPfIJaeAQB7PMOK8DFIdoRA==}
|
resolution: {integrity: sha512-KWjTXWwxFd6a94m5CdRGW/t82Tr8DoBc9dNnPCAbFI1EBweN6v1tv8y4Y1m7ndkp/nkIBRxUxAzpaBnR2k3bcQ==}
|
||||||
engines: {node: '>=12'}
|
engines: {node: '>=14.16'}
|
||||||
dependencies:
|
dependencies:
|
||||||
type-fest: 1.4.0
|
type-fest: 2.19.0
|
||||||
|
|
||||||
/dayjs@1.11.8:
|
/dayjs@1.11.8:
|
||||||
resolution: {integrity: sha512-LcgxzFoWMEPO7ggRv1Y2N31hUf2R0Vj7fuy/m+Bg1K8rr+KAs1AEy4y9jd5DXe8pbHgX+srkHNS7TH6Q6ZhYeQ==}
|
resolution: {integrity: sha512-LcgxzFoWMEPO7ggRv1Y2N31hUf2R0Vj7fuy/m+Bg1K8rr+KAs1AEy4y9jd5DXe8pbHgX+srkHNS7TH6Q6ZhYeQ==}
|
||||||
@@ -3719,6 +3724,8 @@ packages:
|
|||||||
resolution: {integrity: sha512-mXF9AIgnvq1DP/ZM2R28tAfxP2wKZHYa2DjV0R1KCwcqSzm5Iqh1XQq9rdfAt6dp2DuPP0VHZIaCALc2v1cL5A==}
|
resolution: {integrity: sha512-mXF9AIgnvq1DP/ZM2R28tAfxP2wKZHYa2DjV0R1KCwcqSzm5Iqh1XQq9rdfAt6dp2DuPP0VHZIaCALc2v1cL5A==}
|
||||||
engines: {node: '>=14.18.0', npm: '>=6.14.15'}
|
engines: {node: '>=14.18.0', npm: '>=6.14.15'}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
|
dependencies:
|
||||||
|
'@xmldom/xmldom': 0.8.8
|
||||||
dev: true
|
dev: true
|
||||||
bundledDependencies:
|
bundledDependencies:
|
||||||
- '@xmldom/xmldom'
|
- '@xmldom/xmldom'
|
||||||
@@ -4379,10 +4386,6 @@ packages:
|
|||||||
engines: {node: '>=10'}
|
engines: {node: '>=10'}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/type-fest@1.4.0:
|
|
||||||
resolution: {integrity: sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==}
|
|
||||||
engines: {node: '>=10'}
|
|
||||||
|
|
||||||
/type-fest@2.19.0:
|
/type-fest@2.19.0:
|
||||||
resolution: {integrity: sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==}
|
resolution: {integrity: sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==}
|
||||||
engines: {node: '>=12.20'}
|
engines: {node: '>=12.20'}
|
||||||
|
|||||||
@@ -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');
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@shipzone/npmci',
|
name: '@shipzone/npmci',
|
||||||
version: '4.1.9',
|
version: '4.1.17',
|
||||||
description: 'node and docker in gitlab ci on steroids'
|
description: 'node and docker in gitlab ci on steroids'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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(
|
||||||
|
|||||||
@@ -120,15 +120,19 @@ export class Dockerfile {
|
|||||||
* returns a version for a docker file
|
* returns a version for a docker file
|
||||||
* @execution SYNC
|
* @execution SYNC
|
||||||
*/
|
*/
|
||||||
public static dockerFileVersion(dockerfileNameArg: string): string {
|
public static dockerFileVersion(dockerfileInstanceArg: Dockerfile, dockerfileNameArg: string): string {
|
||||||
let versionString: string;
|
let versionString: string;
|
||||||
const versionRegex = /Dockerfile_([a-zA-Z0-9\.]*)$/;
|
const versionRegex = /Dockerfile_([^:_]*)$/;
|
||||||
const regexResultArray = versionRegex.exec(dockerfileNameArg);
|
const regexResultArray = versionRegex.exec(dockerfileNameArg);
|
||||||
if (regexResultArray && regexResultArray.length === 2) {
|
if (regexResultArray && regexResultArray.length === 2) {
|
||||||
versionString = regexResultArray[1];
|
versionString = regexResultArray[1];
|
||||||
} else {
|
} else {
|
||||||
versionString = 'latest';
|
versionString = 'latest';
|
||||||
}
|
}
|
||||||
|
versionString = versionString.replace(
|
||||||
|
'##version##',
|
||||||
|
dockerfileInstanceArg.npmciDockerManagerRef.npmciRef.npmciConfig.getConfig().projectInfo.npm.version
|
||||||
|
);
|
||||||
return versionString;
|
return versionString;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -233,7 +237,7 @@ export class Dockerfile {
|
|||||||
this.npmciDockerManagerRef.npmciRef.npmciEnv.repo.user +
|
this.npmciDockerManagerRef.npmciRef.npmciEnv.repo.user +
|
||||||
'/' +
|
'/' +
|
||||||
this.npmciDockerManagerRef.npmciRef.npmciEnv.repo.repo;
|
this.npmciDockerManagerRef.npmciRef.npmciEnv.repo.repo;
|
||||||
this.version = Dockerfile.dockerFileVersion(plugins.path.parse(options.filePath).base);
|
this.version = Dockerfile.dockerFileVersion(this, plugins.path.parse(options.filePath).base);
|
||||||
this.cleanTag = this.repo + ':' + this.version;
|
this.cleanTag = this.repo + ':' + this.version;
|
||||||
this.buildTag = this.cleanTag;
|
this.buildTag = this.cleanTag;
|
||||||
|
|
||||||
|
|||||||
@@ -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({
|
||||||
|
|||||||
@@ -9,7 +9,12 @@ export class NpmciEnv {
|
|||||||
|
|
||||||
constructor(npmciRefArg: Npmci) {
|
constructor(npmciRefArg: Npmci) {
|
||||||
this.npmciRef = npmciRefArg;
|
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) {
|
if (!this.repoString) {
|
||||||
this.repoString = 'https://undefined:undefined@github.com/undefined/undefined.git';
|
this.repoString = 'https://undefined:undefined@github.com/undefined/undefined.git';
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user