mirror of
https://github.com/SAP/jenkins-library.git
synced 2025-01-30 05:59:39 +02:00
1a96d7a67e
* adding config to piperNpmr * scope in cli * adding scope to repo url and npmrc * publish to scoped * removing scope * changing scope position * adding scope to userconfig * adding registry= * pack and then tar * not removing tmp folder * adding flag * pack before publish * adding log * debug * debug with change directory * publishing created tar ball * debug * üath * adding main npmrc * renaming old npmrc file * error renaming old npmrc file * renaming err * correcting npmrc file path * renaming file back to original * current working directory * renaming the npmrc file * avoiding change directory * with current working dir * adding dot * renaming npmrc and defer removal * rename files * Update pkg/npm/publish.go * Update pkg/npm/publish.go Co-authored-by: anilkeshav27 <you@example.com> Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
146 lines
4.7 KiB
YAML
146 lines
4.7 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:
|
|
resources:
|
|
- name: source
|
|
type: stash
|
|
params:
|
|
- name: install
|
|
type: bool
|
|
description: Run npm install or similar commands depending on the project structure.
|
|
scope:
|
|
- PARAMETERS
|
|
- STAGES
|
|
- STEPS
|
|
default: true
|
|
- 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: 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
|
|
- name: scriptOptions
|
|
type: "[]string"
|
|
description: Options are passed to all runScripts calls separated by a '--'. './piper npmExecuteScripts --runScripts ci-e2e --scriptOptions '--tag1' will correspond to 'npm run ci-e2e -- --tag1'
|
|
scope:
|
|
- PARAMETERS
|
|
- STAGES
|
|
- STEPS
|
|
- name: buildDescriptorExcludeList
|
|
type: "[]string"
|
|
description: List of build descriptors and therefore modules to exclude from execution of the npm scripts. The elements can either be a path to the build descriptor or a pattern.
|
|
scope:
|
|
- PARAMETERS
|
|
- STAGES
|
|
- STEPS
|
|
default: ["deployment/**"]
|
|
- name: buildDescriptorList
|
|
type: "[]string"
|
|
description: List of build descriptors and therefore modules for execution of the npm scripts. The elements have to be paths to the build descriptors. **If set, buildDescriptorExcludeList will be ignored.**
|
|
scope:
|
|
- PARAMETERS
|
|
- STAGES
|
|
- STEPS
|
|
- name: createBOM
|
|
type: bool
|
|
description: Create a BOM xml using CycloneDX.
|
|
scope:
|
|
- GENERAL
|
|
- STEPS
|
|
- STAGES
|
|
- PARAMETERS
|
|
default: false
|
|
- name: publish
|
|
type: bool
|
|
description: Configures npm to publish the artifact to a repository.
|
|
scope:
|
|
- STEPS
|
|
- STAGES
|
|
- PARAMETERS
|
|
- name: repositoryUrl
|
|
type: string
|
|
description: Url to the repository to which the project artifacts should be published.
|
|
scope:
|
|
- GENERAL
|
|
- PARAMETERS
|
|
- STAGES
|
|
- STEPS
|
|
resourceRef:
|
|
- name: commonPipelineEnvironment
|
|
param: custom/repositoryUrl
|
|
- name: repositoryPassword
|
|
type: string
|
|
description: Password for the repository to which the project artifacts should be published.
|
|
scope:
|
|
- GENERAL
|
|
- PARAMETERS
|
|
- STAGES
|
|
- STEPS
|
|
secret: true
|
|
resourceRef:
|
|
- name: commonPipelineEnvironment
|
|
param: custom/repositoryPassword
|
|
- name: repositoryUsername
|
|
type: string
|
|
description: Username for the repository to which the project artifacts should be published.
|
|
scope:
|
|
- GENERAL
|
|
- PARAMETERS
|
|
- STAGES
|
|
- STEPS
|
|
secret: true
|
|
resourceRef:
|
|
- name: commonPipelineEnvironment
|
|
param: custom/repositoryUsername
|
|
- name: buildSettingsInfo
|
|
type: string
|
|
description: build settings info is typically filled by the step automatically to create information about the build settings that were used during the npm build . This information is typically used for compliance related processes.
|
|
scope:
|
|
- STEPS
|
|
- STAGES
|
|
- PARAMETERS
|
|
resourceRef:
|
|
- name: commonPipelineEnvironment
|
|
param: custom/buildSettingsInfo
|
|
- name: packBeforePublish
|
|
type: bool
|
|
default: false
|
|
description: used for pack
|
|
scope:
|
|
- STEPS
|
|
- STAGES
|
|
- PARAMETERS
|
|
outputs:
|
|
resources:
|
|
- name: commonPipelineEnvironment
|
|
type: piperEnvironment
|
|
params:
|
|
- name: custom/buildSettingsInfo
|
|
containers:
|
|
- name: node
|
|
image: node:lts-stretch
|