Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6f6ee6d799 | |||
| e30cc3f5a0 | |||
| a4562d4d1b | |||
| 524b405773 |
@@ -34,6 +34,31 @@ snyk:
|
|||||||
- docker
|
- docker
|
||||||
- notpriv
|
- notpriv
|
||||||
|
|
||||||
|
sast:
|
||||||
|
stage: security
|
||||||
|
image: registry.gitlab.com/hosttoday/ht-docker-dbase:npmci
|
||||||
|
variables:
|
||||||
|
DOCKER_DRIVER: overlay2
|
||||||
|
allow_failure: true
|
||||||
|
services:
|
||||||
|
- docker:stable-dind
|
||||||
|
script:
|
||||||
|
- npmci npm prepare
|
||||||
|
- npmci npm install
|
||||||
|
- npmci command npm run build
|
||||||
|
- export SP_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/')
|
||||||
|
- docker run
|
||||||
|
--env SAST_CONFIDENCE_LEVEL="${SAST_CONFIDENCE_LEVEL:-3}"
|
||||||
|
--volume "$PWD:/code"
|
||||||
|
--volume /var/run/docker.sock:/var/run/docker.sock
|
||||||
|
"registry.gitlab.com/gitlab-org/security-products/sast:$SP_VERSION" /app/bin/run /code
|
||||||
|
artifacts:
|
||||||
|
reports:
|
||||||
|
sast: gl-sast-report.json
|
||||||
|
tags:
|
||||||
|
- docker
|
||||||
|
- priv
|
||||||
|
|
||||||
# ====================
|
# ====================
|
||||||
# test stage
|
# test stage
|
||||||
# ====================
|
# ====================
|
||||||
|
|||||||
@@ -12,5 +12,15 @@
|
|||||||
"npmdocker": {
|
"npmdocker": {
|
||||||
"baseImage": "hosttoday/ht-docker-node:npmci",
|
"baseImage": "hosttoday/ht-docker-node:npmci",
|
||||||
"command": "npmci test stable"
|
"command": "npmci test stable"
|
||||||
|
},
|
||||||
|
"gitzone": {
|
||||||
|
"module": {
|
||||||
|
"githost": "gitlab.com",
|
||||||
|
"gitscope": "shipzone",
|
||||||
|
"gitrepo": "npmci",
|
||||||
|
"shortDescription": "node and docker in gitlab ci on steroids",
|
||||||
|
"npmPackagename": "@shipzone/npmci",
|
||||||
|
"license": "MIT"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
2
package-lock.json
generated
2
package-lock.json
generated
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@shipzone/npmci",
|
"name": "@shipzone/npmci",
|
||||||
"version": "3.1.20",
|
"version": "3.1.22",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@shipzone/npmci",
|
"name": "@shipzone/npmci",
|
||||||
"version": "3.1.20",
|
"version": "3.1.22",
|
||||||
"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",
|
||||||
|
|||||||
37
readme.md
37
readme.md
@@ -1,25 +1,20 @@
|
|||||||
# npmci
|
# @shipzone/npmci
|
||||||
|
|
||||||
node and docker in gitlab ci on steroids
|
node and docker in gitlab ci on steroids
|
||||||
|
|
||||||
## Availabililty
|
## Availabililty and Links
|
||||||
|
* [npmjs.org (npm package)](https://www.npmjs.com/package/@shipzone/npmci)
|
||||||
[](https://www.npmjs.com/package/@shipzone/npmci)
|
* [gitlab.com (source)](https://gitlab.com/shipzone/npmci)
|
||||||
[](https://GitLab.com/shipzone/npmci)
|
* [github.com (source mirror)](https://github.com/shipzone/npmci)
|
||||||
[](https://github.com/shipzone/npmci)
|
* [docs (typedoc)](https://shipzone.gitlab.io/npmci/)
|
||||||
[](https://shipzone.gitlab.io/npmci/)
|
|
||||||
|
|
||||||
## Status for master
|
## Status for master
|
||||||
|
[](https://gitlab.com/shipzone/npmci/commits/master)
|
||||||
[](https://GitLab.com/shipzone/npmci/commits/master)
|
[](https://gitlab.com/shipzone/npmci/commits/master)
|
||||||
[](https://GitLab.com/shipzone/npmci/commits/master)
|
[](https://www.npmjs.com/package/@shipzone/npmci)
|
||||||
[](https://www.npmjs.com/package/@shipzone/npmci)
|
[](https://snyk.io/test/npm/@shipzone/npmci)
|
||||||
[](https://david-dm.org/shipzone/npmci)
|
[](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
||||||
[](https://www.bithound.io/github/shipzone/npmci/master/dependencies/npm)
|
[](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
||||||
[](https://www.bithound.io/github/shipzone/npmci)
|
[](https://prettier.io/)
|
||||||
[](https://nodejs.org/dist/latest-v6.x/docs/api/)
|
|
||||||
[](https://nodejs.org/dist/latest-v6.x/docs/api/)
|
|
||||||
[](http://standardjs.com/)
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
@@ -98,9 +93,9 @@ For further information read the linked docs at the top of this README.
|
|||||||
|
|
||||||
Use TypeScript for best in class instellisense.
|
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.html)
|
||||||
|
|
||||||
[](https://push.rocks)
|
[](https://maintainedby.lossless.com)
|
||||||
|
|||||||
@@ -32,7 +32,10 @@ export let mirror = async () => {
|
|||||||
configObject.projectInfo.npm.packageJson.private === true ||
|
configObject.projectInfo.npm.packageJson.private === true ||
|
||||||
configObject.npmAccessLevel === 'private'
|
configObject.npmAccessLevel === 'private'
|
||||||
) {
|
) {
|
||||||
logger.log('warn', `refusing to mirror due to private property use a private mirror location instead`);
|
logger.log(
|
||||||
|
'warn',
|
||||||
|
`refusing to mirror due to private property use a private mirror location instead`
|
||||||
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (githubToken) {
|
if (githubToken) {
|
||||||
|
|||||||
@@ -42,7 +42,9 @@ const prepare = async () => {
|
|||||||
await plugins.smartparam.forEachMinimatch(process.env, 'NPMCI_TOKEN_NPM*', npmEnvArg => {
|
await plugins.smartparam.forEachMinimatch(process.env, 'NPMCI_TOKEN_NPM*', npmEnvArg => {
|
||||||
const npmRegistryUrl = npmEnvArg.split('|')[0];
|
const npmRegistryUrl = npmEnvArg.split('|')[0];
|
||||||
const npmToken = npmEnvArg.split('|')[1];
|
const npmToken = npmEnvArg.split('|')[1];
|
||||||
npmrcFileString += `//${npmRegistryUrl}/:_authToken="${plugins.smartstring.base64.decode(npmToken)}"\n`;
|
npmrcFileString += `//${npmRegistryUrl}/:_authToken="${plugins.smartstring.base64.decode(
|
||||||
|
npmToken
|
||||||
|
)}"\n`;
|
||||||
});
|
});
|
||||||
logger.log('info', `setting default npm registry to ${config.npmRegistryUrl}`);
|
logger.log('info', `setting default npm registry to ${config.npmRegistryUrl}`);
|
||||||
npmrcFileString += `registry=https://${config.npmRegistryUrl}\n`;
|
npmrcFileString += `registry=https://${config.npmRegistryUrl}\n`;
|
||||||
|
|||||||
Reference in New Issue
Block a user