add codequality step

This commit is contained in:
Philipp Kunz 2018-05-03 18:05:37 +02:00
parent 578cd2d097
commit 797d9e2bcd
2 changed files with 37 additions and 8 deletions

View File

@ -19,6 +19,7 @@ mirror:
- npmci git mirror - npmci git mirror
tags: tags:
- docker - docker
- notpriv
snyk: snyk:
stage: security stage: security
@ -28,6 +29,26 @@ snyk:
- npmci command snyk test - npmci command snyk test
tags: tags:
- docker - docker
- notpriv
codequality:
stage: security
image: docker:stable
allow_failure: true
services:
- docker:stable-dind
script:
- export SP_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/')
- docker run
--env SOURCE_CODE="$PWD"
--volume "$PWD":/code
--volume /var/run/docker.sock:/var/run/docker.sock
"registry.gitlab.com/gitlab-org/security-products/codequality:$SP_VERSION" /code
artifacts:
paths: [codeclimate.json]
tags:
- docker
- priv
testLEGACY: testLEGACY:
stage: test stage: test
@ -38,6 +59,7 @@ testLEGACY:
coverage: /\d+.?\d+?\%\s*coverage/ coverage: /\d+.?\d+?\%\s*coverage/
tags: tags:
- docker - docker
- notpriv
allow_failure: true allow_failure: true
testLTS: testLTS:
@ -49,6 +71,7 @@ testLTS:
coverage: /\d+.?\d+?\%\s*coverage/ coverage: /\d+.?\d+?\%\s*coverage/
tags: tags:
- docker - docker
- notpriv
testSTABLE: testSTABLE:
stage: test stage: test
@ -59,16 +82,19 @@ testSTABLE:
coverage: /\d+.?\d+?\%\s*coverage/ coverage: /\d+.?\d+?\%\s*coverage/
tags: tags:
- docker - docker
- notpriv
release: release:
stage: release stage: release
script: script:
- npmci node install stable
- npmci npm prepare - npmci npm prepare
- npmci npm publish - npmci npm publish
only: only:
- tags - tags
tags: tags:
- docker - docker
- notpriv
trigger: trigger:
stage: trigger stage: trigger
@ -78,6 +104,7 @@ trigger:
- tags - tags
tags: tags:
- docker - docker
- notpriv
pages: pages:
image: hosttoday/ht-docker-node:npmci image: hosttoday/ht-docker-node:npmci
@ -87,6 +114,7 @@ pages:
- npmci command npmpage - npmci command npmpage
tags: tags:
- docker - docker
- notpriv
only: only:
- tags - tags
artifacts: artifacts:

View File

@ -51,11 +51,10 @@ export let run = async () => {
); );
plugins.beautylog.log('---------------------------------------------'); plugins.beautylog.log('---------------------------------------------');
let npmtsCli = new plugins.smartcli.Smartcli(); let npmtsCli = new plugins.smartcli.Smartcli();
// build // build
npmtsCli npmtsCli.addCommand('build').subscribe(
.addCommand('build') async argvArg => {
.subscribe(async (argvArg) => {
let done = q.defer(); let done = q.defer();
plugins.beautylog.info('npmts version: ' + npmtsProjectInfo.version); plugins.beautylog.info('npmts version: ' + npmtsProjectInfo.version);
const configArg: NpmtsConfig.INpmtsConfig = await NpmtsConfig.run(argvArg); const configArg: NpmtsConfig.INpmtsConfig = await NpmtsConfig.run(argvArg);
@ -94,16 +93,18 @@ export let run = async () => {
.then(NpmtsShip.run); .then(NpmtsShip.run);
return done.promise; return done.promise;
}, err => { },
err => {
if (err instanceof Error) { if (err instanceof Error) {
console.log(err); console.log(err);
} }
}) }
);
// standard task // standard task
npmtsCli.standardTask().subscribe(async argvArg => { npmtsCli.standardTask().subscribe(async argvArg => {
await npmtsCli.trigger('build') await npmtsCli.trigger('build');
}) });
// cli metadata // cli metadata
npmtsCli.addVersion(npmtsProjectInfo.version); npmtsCli.addVersion(npmtsProjectInfo.version);