Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9a4611b70f | |||
| 189dbc3654 | |||
| fc95fc96ed | |||
| 467eed57d7 | |||
| a5ca5444a0 | |||
| 17610cb834 | |||
| e1f2b5c6fe | |||
| edbbae0bd0 | |||
| 0e820bec27 | |||
| 91a3d612c6 | |||
| c696730e55 | |||
| 38d38ce246 | |||
| adfdf68c38 | |||
| d4a4d69941 | |||
| c1fed2c758 | |||
| 9918d81f59 |
@@ -1,5 +1,7 @@
|
|||||||
# gitzone ci_default
|
# gitzone ci_default
|
||||||
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||||
|
variables:
|
||||||
|
GIT_STRATEGY: clone
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
paths:
|
paths:
|
||||||
@@ -38,13 +40,25 @@ snyk:
|
|||||||
# test stage
|
# test stage
|
||||||
# ====================
|
# ====================
|
||||||
|
|
||||||
testLTS:
|
testStable:
|
||||||
|
stage: test
|
||||||
|
script:
|
||||||
|
- npmci npm prepare
|
||||||
|
- npmci node install stable
|
||||||
|
- npmci npm install
|
||||||
|
- npmci npm test
|
||||||
|
coverage: /\d+.?\d+?\%\s*coverage/
|
||||||
|
tags:
|
||||||
|
- docker
|
||||||
|
- priv
|
||||||
|
|
||||||
|
testBuild:
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- npmci npm prepare
|
- npmci npm prepare
|
||||||
- npmci node install lts
|
- npmci node install lts
|
||||||
- npmci npm install
|
- npmci npm install
|
||||||
- npmci npm test
|
- npmci command npm run build
|
||||||
coverage: /\d+.?\d+?\%\s*coverage/
|
coverage: /\d+.?\d+?\%\s*coverage/
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
@@ -86,7 +100,9 @@ trigger:
|
|||||||
- notpriv
|
- notpriv
|
||||||
|
|
||||||
pages:
|
pages:
|
||||||
image: hosttoday/ht-docker-node:npmci
|
image: hosttoday/ht-docker-dbase:npmci
|
||||||
|
services:
|
||||||
|
- docker:18-dind
|
||||||
stage: metadata
|
stage: metadata
|
||||||
script:
|
script:
|
||||||
- npmci command npm install -g @gitzone/tsdoc
|
- npmci command npm install -g @gitzone/tsdoc
|
||||||
|
|||||||
3
.vscode/settings.json
vendored
Normal file
3
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"workbench.colorCustomizations": {}
|
||||||
|
}
|
||||||
1681
package-lock.json
generated
1681
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
19
package.json
19
package.json
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@shipzone/npmci",
|
"name": "@shipzone/npmci",
|
||||||
"version": "3.1.33",
|
"version": "3.1.41",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "node and docker in gitlab ci on steroids",
|
"description": "node and docker in gitlab ci on steroids",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
@@ -24,31 +24,33 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://gitlab.com/gitzone/npmci#README",
|
"homepage": "https://gitlab.com/gitzone/npmci#README",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@gitzone/tsbuild": "^2.1.11",
|
"@gitzone/tsbuild": "^2.1.17",
|
||||||
"@gitzone/tsrun": "^1.2.6",
|
"@gitzone/tsrun": "^1.2.6",
|
||||||
"@gitzone/tstest": "^1.0.24",
|
"@gitzone/tstest": "^1.0.24",
|
||||||
"@pushrocks/tapbundle": "^3.0.9",
|
"@pushrocks/tapbundle": "^3.0.13",
|
||||||
"@types/node": "^12.0.8",
|
"@types/node": "^12.7.2",
|
||||||
"tslint": "^5.17.0",
|
"tslint": "^5.19.0",
|
||||||
"tslint-config-prettier": "^1.18.0"
|
"tslint-config-prettier": "^1.18.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@pushrocks/lik": "^3.0.5",
|
"@pushrocks/lik": "^3.0.11",
|
||||||
"@pushrocks/npmextra": "^3.0.5",
|
"@pushrocks/npmextra": "^3.0.5",
|
||||||
"@pushrocks/projectinfo": "^4.0.2",
|
"@pushrocks/projectinfo": "^4.0.2",
|
||||||
"@pushrocks/smartanalytics": "^2.0.15",
|
"@pushrocks/smartanalytics": "^2.0.15",
|
||||||
"@pushrocks/smartcli": "^3.0.7",
|
"@pushrocks/smartcli": "^3.0.7",
|
||||||
"@pushrocks/smartdelay": "^2.0.3",
|
"@pushrocks/smartdelay": "^2.0.3",
|
||||||
"@pushrocks/smartfile": "^7.0.2",
|
"@pushrocks/smartfile": "^7.0.2",
|
||||||
|
"@pushrocks/smartgit": "^1.0.12",
|
||||||
"@pushrocks/smartlog": "^2.0.19",
|
"@pushrocks/smartlog": "^2.0.19",
|
||||||
"@pushrocks/smartlog-destination-local": "^8.0.2",
|
"@pushrocks/smartlog-destination-local": "^8.0.2",
|
||||||
"@pushrocks/smartparam": "^1.0.4",
|
"@pushrocks/smartparam": "^1.0.4",
|
||||||
"@pushrocks/smartpromise": "^3.0.2",
|
"@pushrocks/smartpromise": "^3.0.2",
|
||||||
"@pushrocks/smartrequest": "^1.1.16",
|
"@pushrocks/smartrequest": "^1.1.23",
|
||||||
"@pushrocks/smartshell": "^2.0.23",
|
"@pushrocks/smartshell": "^2.0.23",
|
||||||
"@pushrocks/smartsocket": "^1.1.38",
|
"@pushrocks/smartsocket": "^1.1.45",
|
||||||
"@pushrocks/smartssh": "^1.2.3",
|
"@pushrocks/smartssh": "^1.2.3",
|
||||||
"@pushrocks/smartstring": "^3.0.10",
|
"@pushrocks/smartstring": "^3.0.10",
|
||||||
|
"@servezone/servezone-interfaces": "^2.0.28",
|
||||||
"@types/shelljs": "^0.8.5",
|
"@types/shelljs": "^0.8.5",
|
||||||
"@types/through2": "^2.0.34",
|
"@types/through2": "^2.0.34",
|
||||||
"through2": "^3.0.1"
|
"through2": "^3.0.1"
|
||||||
@@ -58,6 +60,7 @@
|
|||||||
"ts_web/*",
|
"ts_web/*",
|
||||||
"dist/*",
|
"dist/*",
|
||||||
"dist_web/*",
|
"dist_web/*",
|
||||||
|
"dist_ts_web/*",
|
||||||
"assets/*",
|
"assets/*",
|
||||||
"cli.js",
|
"cli.js",
|
||||||
"npmextra.json",
|
"npmextra.json",
|
||||||
|
|||||||
@@ -96,6 +96,6 @@ Use TypeScript for best in class instellisense.
|
|||||||
For further information read the linked docs at the top of this readme.
|
For further information read the linked docs at the top of this readme.
|
||||||
|
|
||||||
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
|
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
|
||||||
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy.html)
|
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy)
|
||||||
|
|
||||||
[](https://maintainedby.lossless.com)
|
[](https://maintainedby.lossless.com)
|
||||||
|
|||||||
@@ -41,6 +41,9 @@ export let mirror = async () => {
|
|||||||
if (githubToken) {
|
if (githubToken) {
|
||||||
logger.log('info', 'found github token.');
|
logger.log('info', 'found github token.');
|
||||||
logger.log('info', 'attempting the mirror the repository to GitHub');
|
logger.log('info', 'attempting the mirror the repository to GitHub');
|
||||||
|
|
||||||
|
// plugins.smartgit.GitRepo;
|
||||||
|
|
||||||
// add the mirror
|
// add the mirror
|
||||||
await bash(
|
await bash(
|
||||||
`git remote add mirror https://${githubToken}@github.com/${githubUser}/${githubRepo}.git`
|
`git remote add mirror https://${githubToken}@github.com/${githubUser}/${githubRepo}.git`
|
||||||
|
|||||||
@@ -1 +1,5 @@
|
|||||||
export * from '../npmci.plugins';
|
export * from '../npmci.plugins';
|
||||||
|
|
||||||
|
import * as smartgit from '@pushrocks/smartgit';
|
||||||
|
|
||||||
|
export { smartgit };
|
||||||
|
|||||||
@@ -50,6 +50,8 @@ export let install = async versionArg => {
|
|||||||
} else {
|
} else {
|
||||||
logger.log('warn', 'Nvm not in path so staying at installed node version!');
|
logger.log('warn', 'Nvm not in path so staying at installed node version!');
|
||||||
}
|
}
|
||||||
|
logger.log('info', 'now installing latest npm version');
|
||||||
|
await bash('npm install -g npm');
|
||||||
await bash('node -v');
|
await bash('node -v');
|
||||||
await bash('npm -v');
|
await bash('npm -v');
|
||||||
await bash(`npm config set cache ${paths.NpmciCacheDir} --global `);
|
await bash(`npm config set cache ${paths.NpmciCacheDir} --global `);
|
||||||
|
|||||||
@@ -66,25 +66,55 @@ const prepare = async () => {
|
|||||||
* publish a package to npm
|
* publish a package to npm
|
||||||
*/
|
*/
|
||||||
const publish = async () => {
|
const publish = async () => {
|
||||||
let npmAccessCliString = ``;
|
const buildPublishCommand = async () => {
|
||||||
let npmRegistryCliString = ``;
|
let npmAccessCliString = ``;
|
||||||
const config = await configModule.getConfig();
|
let npmRegistryCliString = ``;
|
||||||
|
let publishVerdaccioAsWell = false;
|
||||||
|
const config = await configModule.getConfig();
|
||||||
|
const availableRegistries: string[] = [];
|
||||||
|
await plugins.smartparam.forEachMinimatch(process.env, 'NPMCI_TOKEN_NPM*', npmEnvArg => {
|
||||||
|
availableRegistries.push(npmEnvArg.split('|')[0]);
|
||||||
|
});
|
||||||
|
|
||||||
// -> configure package access level
|
// -> configure package access level
|
||||||
if (
|
if (config.npmAccessLevel) {
|
||||||
config.npmAccessLevel &&
|
npmAccessCliString = `--access=${config.npmAccessLevel}`;
|
||||||
(config.npmAccessLevel === 'public' || config.npmAccessLevel === 'private')
|
if (config.npmAccessLevel === 'public') {
|
||||||
) {
|
publishVerdaccioAsWell = true;
|
||||||
npmAccessCliString = `--access=${config.npmAccessLevel}`;
|
}
|
||||||
}
|
} else {
|
||||||
|
throw new Error('You need to set a npmAccessLevel!!!');
|
||||||
|
}
|
||||||
|
// -> configure registry url
|
||||||
|
if (config.npmRegistryUrl) {
|
||||||
|
npmRegistryCliString = `--registry=https://${config.npmRegistryUrl}`;
|
||||||
|
} else {
|
||||||
|
logger.log('error', `no registry url specified. Can't publish!`);
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
// -> configure registry url
|
let publishCommand = `npm publish ${npmAccessCliString} ${npmRegistryCliString} `;
|
||||||
if (config.npmRegistryUrl) {
|
|
||||||
npmRegistryCliString = `--registry=https://${config.npmRegistryUrl}`;
|
// publishEverywhere
|
||||||
} else {
|
if (publishVerdaccioAsWell) {
|
||||||
logger.log('error', `no registry url specified. Can't publish!`);
|
const verdaccioRegistry = availableRegistries.find(registryString =>
|
||||||
process.exit(1);
|
registryString.startsWith('verdaccio')
|
||||||
}
|
);
|
||||||
|
if (verdaccioRegistry) {
|
||||||
|
logger.log(
|
||||||
|
'info',
|
||||||
|
`package is public and verdaccio registry is specified. Also publishing to Verdaccio!`
|
||||||
|
);
|
||||||
|
publishCommand = `${publishCommand} && npm publish ${npmAccessCliString} --registry=https://${verdaccioRegistry}`;
|
||||||
|
} else {
|
||||||
|
logger.log(
|
||||||
|
'error',
|
||||||
|
`This package should also be published to Verdaccio, however there is no Verdaccio registry data available!`
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return publishCommand;
|
||||||
|
};
|
||||||
|
|
||||||
// -> preparing
|
// -> preparing
|
||||||
logger.log('info', `now preparing environment:`);
|
logger.log('info', `now preparing environment:`);
|
||||||
@@ -105,7 +135,7 @@ const publish = async () => {
|
|||||||
|
|
||||||
// -> publish it
|
// -> publish it
|
||||||
logger.log('info', `now invoking npm to publish the package!`);
|
logger.log('info', `now invoking npm to publish the package!`);
|
||||||
await bash(`npm publish ${npmAccessCliString} ${npmRegistryCliString}`);
|
await bash(await buildPublishCommand());
|
||||||
logger.log('success', `Package was successfully published!`);
|
logger.log('success', `Package was successfully published!`);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,13 @@ import * as path from 'path';
|
|||||||
|
|
||||||
export { path };
|
export { path };
|
||||||
|
|
||||||
|
// @servezone
|
||||||
|
import * as servezoneInterfaces from '@servezone/servezone-interfaces';
|
||||||
|
|
||||||
|
export {
|
||||||
|
servezoneInterfaces
|
||||||
|
};
|
||||||
|
|
||||||
// @pushrocks
|
// @pushrocks
|
||||||
import * as projectinfo from '@pushrocks/projectinfo';
|
import * as projectinfo from '@pushrocks/projectinfo';
|
||||||
import * as npmextra from '@pushrocks/npmextra';
|
import * as npmextra from '@pushrocks/npmextra';
|
||||||
|
|||||||
Reference in New Issue
Block a user