1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-16 11:09:33 +02:00
sap-jenkins-library/documentation/docs/steps/pipelineStashFiles.md
Christopher Fenner f757a0e1d4
fix Markdown issues (#365)
* fix Markdown issue 'Headers should be surrounded by blank lines'

* fix MD012

* fix MD022

* fix MD026

* fix MD007

* fix MD032

* fix MD038

* fix MD040

* fix MD031

* fix MD034

* fix MD004

* fix new findings

* fix MD036

* fix MD038

* fix MD032

* fix MD006
2018-11-06 13:50:09 +01:00

2.7 KiB

pipelineStashFiles

Description

This step stashes files that are needed in other build steps (on other nodes).

Prerequsites

none

Parameters

parameter mandatory default possible values
script yes
runCheckmarx no false
runOpaTests no false
stashIncludes no see details
stashExcludes no see details

Details:

The step is stashing files before and after the build. This is due to the fact, that some of the code that needs to be stashed, is generated during the build (TypeScript for NPM).

stash name mandatory prerequisite pattern
buildDescriptor no includes: **/pom.xml, **/.mvn/**, **/assembly.xml, **/.swagger-codegen-ignore, **/package.json, **/requirements.txt, **/setup.py, **/whitesource_config.py, **/mta*.y*ml, **/.npmrc, **/whitesource.*.json, **/whitesource-fs-agent.config, Dockerfile, **/VERSION, **/version.txt, **/build.sbt, **/sbtDescriptor.json, **/project/*
excludes: **/node_modules/**/package.json
checkmarx no Checkmarx is enabled includes: **/*.js, **/*.scala, **/*.go
excludes: **/*.mockserver.js, node_modules/**/*.js
classFiles no includes: **/target/classes/**/*.class, **/target/test-classes/**/*.class
excludes: ''
deployDescriptor no includes: **/manifest*.y*ml, **/*.mtaext.y*ml, **/*.mtaext, **/xs-app.json, helm/**, *.y*ml
exclude: ''
git no includes: **/gitmetadata/**
exludes: ''
opa5 no OPA5 is enabled includes: **/*.*
excludes: ''
opensourceConfiguration no includes: **/srcclr.yml, **/vulas-custom.properties, **/.nsprc, **/.retireignore, **/.retireignore.json, **/.snyk
excludes: ''
pipelineConfigAndTests no includes: .pipeline/*.*
excludes: ''
securityDescriptor no includes: **/xs-security.json
exludes: ''
sonar no includes: **/jacoco*.exec, **/sonar-project.properties
exludes: ''
tests no includes: **/pom.xml, **/*.json, **/*.xml, **/src/**, **/node_modules/**, **/specs/**, **/env/**, **/*.js
excludes: ''

!!! note "Overwriting default stashing behavior" It is possible to overwrite the default behavior of the stashes using the parameters stashIncludes and stashExcludes , e.g.

* `stashIncludes: [buildDescriptor: '**/mybuild.yml]`
* `stashExcludes: [tests: '**/NOTRELEVANT.*]`

Step configuration

The following parameters can also be specified as step parameters using the global configuration file:

  • runOpaTests
  • runCheckmarx
  • stashExcludes
  • stashIncludes

Explanation of pipeline step

Usage of pipeline step:

pipelineStashFiles script: this {
  mavenExecute script: this, ...
}