From e2e0e8aa704d23d6d3f04fd96e46292618ac6636 Mon Sep 17 00:00:00 2001 From: Rainer Killinger Date: Tue, 5 Jul 2022 13:03:31 +0200 Subject: [PATCH] refactor: update ci recommendations --- src/common.ts | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/common.ts b/src/common.ts index 8dc7d4d1..caa18bc6 100644 --- a/src/common.ts +++ b/src/common.ts @@ -747,26 +747,30 @@ export function getRules(configuration: Configuration): Rules { // expected values in CI config const ciConfig = { 'image': 'registry.gitlab.com/openstapps/projectmanagement/node', - 'before_script': 'npm ci', - 'build': { + 'before_script': ['npm ci'], + 'npm build': { stage: 'build', script: ['npm run build'], artifacts: { paths: ['lib'], }, }, - 'audit': { + 'npm test': { + stage: 'test', + script: ['npm run test'], + }, + 'npm audit': { allow_failure: true, except: ['schedules'], script: ['npm audit'], stage: 'audit', }, - 'scheduled-audit': { + 'scheduled npm audit': { only: ['schedules'], script: ['npm audit --audit-level=high'], stage: 'audit', }, - 'package': { + 'npm package': { dependencies: ['build'], tags: ['secrecy'], stage: 'publish',