1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2025-03-03 15:02:35 +02:00
sap-jenkins-library/resources/metadata/npmExecuteScripts.yaml
Kevin Hudemann ceb3dd0a04
Refactor pkg/npm and npmExecuteScripts (#1684)
This change refactors the npm pkg and npmExecuteScripts implementations
to be reusable for future steps, e.g., npmExecuteLint.

In addition, it fixes few small bugs related to unit test execution on
Windows and the fileUtils mocking implementation.

Co-authored-by: Daniel Kurzynski <daniel.kurzynski@sap.com>
Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>
2020-06-18 17:30:17 +02:00

58 lines
1.8 KiB
YAML

metadata:
name: npmExecuteScripts
aliases:
- name: executeNpm
description: Execute npm run scripts on all npm packages in a project
longDescription: |
Execute npm run scripts in all package json files, if they implement the scripts.
spec:
inputs:
params:
- name: install
type: bool
description: Run npm install or similar commands depending on the project structure.
scope:
- PARAMETERS
- STAGES
- STEPS
default: false
- name: runScripts
type: '[]string'
description: List of additional run scripts to execute from package.json.
scope:
- PARAMETERS
- STAGES
- STEPS
- name: defaultNpmRegistry
type: string
description: URL of the npm registry to use. Defaults to https://registry.npmjs.org/
scope:
- PARAMETERS
- GENERAL
- STAGES
- STEPS
aliases:
- name: npm/defaultNpmRegistry
- name: sapNpmRegistry
type: string
description: The default npm registry URL to be used as the remote mirror for the SAP npm packages.
scope:
- PARAMETERS
- GENERAL
- STAGES
- STEPS
default: https://npm.sap.com
aliases:
- name: npm/sapNpmRegistry
- name: virtualFrameBuffer
type: bool
description: (Linux only) Start a virtual frame buffer in the background. This allows you to run a web browser without the need for an X server. Note that xvfb needs to be installed in the execution environment.
scope:
- PARAMETERS
- STAGES
- STEPS
containers:
- name: node
image: node:12-buster-slim
imagePullPolicy: Never