1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-12 10:55:20 +02:00
sap-jenkins-library/resources/metadata/npmExecuteLint.yaml
Christian Volk 0a30108af3
feat(npmExecuteLint): support to run package installation and usage of custom runScript (#3191)
* feat(npmExecuteLint): support to run package installation and custom runScript

* fix tests

* error handling

* fix test

Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2021-10-22 13:01:22 +02:00

51 lines
1.5 KiB
YAML

metadata:
name: npmExecuteLint
aliases:
- name: executeNpm
description: Execute ci-lint script on all npm packages in a project or execute default linting
longDescription: |
Execute ci-lint script for all package json files, if they implement the script. If no ci-lint script is defined,
either use ESLint configurations present in the project or use the provided general purpose configuration to run ESLint.
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: runScript
type: string
description: List of additional run scripts to execute from package.json.
scope:
- PARAMETERS
- STAGES
- STEPS
default: "ci-lint"
- name: failOnError
type: bool
description: Defines the behavior in case linting errors are found.
scope:
- PARAMETERS
- STAGES
- STEPS
mandatory: false
default: false
- name: defaultNpmRegistry
type: string
description: URL of the npm registry to use. Defaults to https://registry.npmjs.org/
scope:
- PARAMETERS
- GENERAL
- STAGES
- STEPS
mandatory: false
aliases:
- name: npm/defaultNpmRegistry
containers:
- name: node
image: node:lts-stretch