1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-14 11:03:09 +02:00
sap-jenkins-library/resources/default_pipeline_environment.yml
Oliver Nocon 74366631b5
Project "Piper" Template: framework and structure (#476)
* Project "Piper" Template: framework and structure

This is the first in a series of Pull-Requests to provide a fully functional Pipeline template into the library.

This PR contains:
* general Pipeline structure incl. tests
* Pipeline initialization incl. tests
* Hollow pipeline stages incl. tests
* first set of default values
* add gitUrls to commonPipelineEnvironment
* set correct git information on commonPipelineEnvironment
2019-02-05 15:37:59 +01:00

377 lines
11 KiB
YAML

#
# ATTENTION: This file is part of the API, breaking changes here directly affect the consumers of the library.
# Please avoid breaking changes if possible.
#
#Project Setup
general:
collectTelemetryData: true
changeManagement:
type: 'NONE' # SOLMAN, CTS, NONE
transportRequestLabel: 'TransportRequest\s?:'
changeDocumentLabel: 'ChangeDocument\s?:'
clientOpts: ''
credentialsId: 'CM'
git:
from: 'origin/master'
to: 'HEAD'
format: '%b'
githubApiUrl: 'https://api.github.com'
githubServerUrl: 'https://github.com'
gitSshKeyCredentialsId: '' #needed to allow sshagent to run with local ssh key
jenkinsKubernetes:
jnlpAgent: 's4sdk/jenkins-agent-k8s:latest'
manualConfirmation: true
productiveBranch: 'master'
#Steps Specific Configuration
steps:
artifactSetVersion:
timestampTemplate: '%Y%m%d%H%M%S'
tagPrefix: 'build_'
commitVersion: true
dlang:
filePath: 'dub.json'
versioningTemplate: '${version}-${timestamp}${commitId?"+"+commitId:""}'
docker:
filePath: 'Dockerfile'
versioningTemplate: '${version}-${timestamp}${commitId?"_"+commitId:""}'
golang:
filePath: 'VERSION'
versioningTemplate: '${version}-${timestamp}${commitId?"+"+commitId:""}'
maven:
filePath: 'pom.xml'
versioningTemplate: '${version}-${timestamp}${commitId?"_"+commitId:""}'
mta:
filePath: 'mta.yaml'
versioningTemplate: '${version}-${timestamp}${commitId?"+"+commitId:""}'
npm:
filePath: 'package.json'
versioningTemplate: '${version}-${timestamp}${commitId?"+"+commitId:""}'
pip:
filePath: 'version.txt'
versioningTemplate: '${version}.${timestamp}${commitId?"."+commitId:""}'
sbt:
filePath: 'sbtDescriptor.json'
versioningTemplate: '${version}-${timestamp}${commitId?"+"+commitId:""}'
batsExecuteTests:
dockerImage: 'node:8-stretch'
dockerWorkspace: '/home/node'
envVars: {}
outputFormat: 'junit' # tap, junit
testPath: 'src/test'
failOnError: false
repository: 'https://github.com/bats-core/bats-core.git'
stashContent:
- 'tests'
testPackage: 'piper-bats'
checksPublishResults:
aggregation:
active: true
thresholds:
fail:
high: '0'
tasks:
pattern: '**/*.java'
low: ''
normal: 'TODO,REVISE,XXX'
high: 'FIXME'
archive: true
active: false
thresholds:
fail:
high: '0'
pmd:
pattern: '**/target/pmd.xml'
archive: true
active: false
thresholds:
fail:
high: '0'
cpd:
pattern: '**/target/cpd.xml'
archive: true
active: false
thresholds:
fail:
high: '0'
findbugs:
pattern: '**/target/findbugsXml.xml, **/target/findbugs.xml'
archive: true
active: false
thresholds:
fail:
high: '0'
checkstyle:
pattern: '**/target/checkstyle-result.xml'
archive: true
active: false
thresholds:
fail:
high: '0'
eslint:
pattern: '**/eslint.xml'
archive: true
active: false
thresholds:
fail:
high: '0'
pylint:
pattern: '**/pylint.log'
archive: true
active: false
thresholds:
fail:
high: '0'
archive: false
cloudFoundryDeploy:
cloudFoundry:
apiEndpoint: 'https://api.cf.eu10.hana.ondemand.com'
deployTool: 'cf_native'
deployType: 'standard'
keepOldInstance: false
mtaDeployParameters: '-f'
mtaExtensionDescriptor: ''
mtaPath: ''
smokeTestScript: 'blueGreenCheckScript.sh'
smokeTestStatusCode: 200
stashContent:
- 'deployDescriptor'
- 'pipelineConfigAndTests'
cf_native:
dockerImage: 's4sdk/docker-cf-cli'
dockerWorkspace: '/home/piper'
mtaDeployPlugin:
dockerImage: 's4sdk/docker-cf-cli'
dockerWorkspace: '/home/piper'
containerExecuteStructureTests:
containerCommand: '/busybox/tail -f /dev/null'
containerShell: '/busybox/sh'
dockerImage: 'ppiper/container-structure-test'
dockerOptions: "-u 0 --entrypoint=''"
failOnError: true
stashContent:
- 'tests'
testReportFilePath: 'cst-report.json'
dockerExecute:
stashContent: []
dockerExecuteOnKubernetes:
stashContent: []
stashIncludes:
workspace: '**/*'
stashExcludes:
workspace: 'nohup.out'
githubPublishRelease:
addClosedIssues: false
addDeltaToLastRelease: false
customFilterExtension: ''
excludeLabels:
- 'duplicate'
- 'invalid'
- 'question'
- 'wontfix'
gaugeExecuteTests:
buildTool: 'maven'
dockerEnvVars:
HUB: 'TRUE'
HUB_URL: 'http://localhost:4444/wd/hub'
failOnError: false
installCommand: 'curl -SsL https://downloads.gauge.org/stable | sh -s -- --location=$HOME/bin/gauge'
stashContent:
- 'buildDescriptor'
- 'tests'
maven:
dockerImage: 'maven:3.5-jdk-8'
dockerName: 'maven'
dockerWorkspace: ''
languageRunner: 'java'
runCommand: 'mvn test-compile gauge:execute'
testOptions: '-DspecsDir=specs'
npm:
dockerImage: 'node:8-stretch'
dockerName: 'npm'
dockerWorkspace: '/home/node'
languageRunner: 'js'
runCommand: 'gauge run'
testOptions: 'specs'
healthExecuteCheck:
healthEndpoint: ''
influxWriteData:
influxServer: ''
karmaExecuteTests:
containerPortMappings:
'node:8-stretch':
- containerPort: 9876
hostPort: 9876
dockerEnvVars:
NO_PROXY: 'localhost,selenium,$NO_PROXY'
no_proxy: 'localhost,selenium,$no_proxy'
dockerImage: 'node:8-stretch'
dockerName: 'karma'
dockerWorkspace: '/home/node'
installCommand: 'npm install --quiet'
modules:
- '.'
runCommand: 'npm run karma'
sidecarEnvVars:
NO_PROXY: 'localhost,karma,$NO_PROXY'
no_proxy: 'localhost,karma,$no_proxy'
stashContent:
- buildDescriptor
- tests
mailSendNotification:
notificationAttachment: true
notifyCulprits: true
numLogLinesInBody: 100
wrapInNode: false
mavenExecute:
dockerImage: 'maven:3.5-jdk-7'
logSuccessfulMavenTransfers: false
mtaBuild:
buildTarget: 'NEO'
mtaJarLocation: 'mta.jar'
neoDeploy:
dockerImage: 's4sdk/docker-neo-cli'
deployMode: 'mta'
warAction: 'deploy'
neo:
size: 'lite'
credentialsId: 'CI_CREDENTIALS_ID'
newmanExecute:
dockerImage: 'node:8-stretch'
failOnError: true
newmanCollection: '**/*.postman_collection.json'
newmanEnvironment: ''
newmanGlobals: ''
newmanInstallCommand: 'npm install newman newman-reporter-html --global --quiet'
newmanRunCommand: "run '${config.newmanCollection}' --environment '${config.newmanEnvironment}' --globals '${config.newmanGlobals}' --reporters junit,html --reporter-junit-export 'target/newman/TEST-${collectionDisplayName}.xml' --reporter-html-export 'target/newman/TEST-${collectionDisplayName}.html'"
stashContent:
- 'tests'
pipelineRestartSteps:
sendMail: true
timeoutInSeconds: 900
pipelineStashFilesAfterBuild:
runOpaTests: false
stashIncludes:
checkmarx: '**/*.js, **/*.scala, **/*.py, **/*.go, **/*.xml, **/*.html'
classFiles: '**/target/classes/**/*.class, **/target/test-classes/**/*.class'
sonar: '**/jacoco*.exec, **/sonar-project.properties'
stashExcludes:
checkmarx: '**/*.mockserver.js, node_modules/**/*.js'
classFiles: ''
sonar: ''
pipelineStashFilesBeforeBuild:
runCheckmarx: false
stashIncludes:
buildDescriptor: '**/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/*'
deployDescriptor: '**/manifest*.y*ml, **/*.mtaext.y*ml, **/*.mtaext, **/xs-app.json, helm/**, *.y*ml'
git: '**/gitmetadata/**'
opa5: '**/*.*'
opensourceConfiguration: '**/srcclr.yml, **/vulas-custom.properties, **/.nsprc, **/.retireignore, **/.retireignore.json, **/.snyk'
pipelineConfigAndTests: '.pipeline/**'
securityDescriptor: '**/xs-security.json'
tests: '**/pom.xml, **/*.json, **/*.xml, **/src/**, **/node_modules/**, **/specs/**, **/env/**, **/*.js, **/tests/**'
stashExcludes:
buildDescriptor: '**/node_modules/**/package.json'
deployDescriptor: ''
git: ''
opa5: ''
opensourceConfiguration: ''
pipelineConfigAndTests: ''
securityDescriptor: ''
tests: ''
seleniumExecuteTests:
buildTool: 'npm'
containerPortMappings:
'selenium/standalone-chrome':
- containerPort: 4444
hostPort: 4444
failOnError: true
sidecarImage: 'selenium/standalone-chrome'
sidecarName: 'selenium'
sidecarVolumeBind:
'/dev/shm': '/dev/shm'
stashContent:
- 'tests'
maven:
dockerImage: 'maven:3.5-jdk-8'
dockerName: 'maven'
dockerWorkspace: ''
npm:
dockerImage: 'node:8-stretch'
dockerName: 'npm'
dockerWorkspace: '/home/node'
snykExecute:
buildDescriptorFile: './package.json'
dockerImage: 'node:8-stretch'
exclude: []
monitor: true
scanType: 'npm'
stashContent:
- 'buildDescriptor'
- 'opensourceConfiguration'
toJson: false
toHtml: false
testsPublishResults:
junit:
pattern: '**/TEST-*.xml'
updateResults: false
allowEmptyResults: true
archive: false
active: false
jacoco:
pattern: '**/target/*.exec'
allowEmptyResults: true
archive: false
active: false
cobertura:
pattern: '**/target/coverage/cobertura-coverage.xml'
onlyStableBuilds: true
allowEmptyResults: true
archive: false
active: false
jmeter:
pattern: '**/*.jtl'
errorFailedThreshold: 20
errorUnstableThreshold: 10
errorUnstableResponseTimeThreshold: ''
relativeFailedThresholdPositive: 0
relativeFailedThresholdNegative: 0
relativeUnstableThresholdPositive: 0
relativeUnstableThresholdNegative: 0
modeOfThreshold: false
modeThroughput: false
nthBuildNumber: 0
configType: 'PRT'
failBuildIfNoResultFile: false
compareBuildPrevious: true
allowEmptyResults: true
archive: false
active: false
checkChangeInDevelopment:
failIfStatusIsNotInDevelopment: true
transportRequestCreate:
developmentSystemId: null
transportRequestUploadFile:
transportRequestRelease:
uiVeri5ExecuteTests:
failOnError: false
dockerEnvVars: {}
installCommand: 'npm install @ui5/uiveri5 --global --quiet'
seleniumPort: 4444
stashContent:
- 'buildDescriptor'
- 'tests'
testOptions: ''
runCommand: "uiveri5 --seleniumAddress='http://${config.seleniumHost}:${config.seleniumPort}/wd/hub'"
#defaults for stage wrapper
piperStageWrapper:
projectExtensionsDirectory: '.pipeline/extensions/'
globalExtensionsDirectory: ''
stageLocking: true
nodeLabel: ''
stashContent:
- 'pipelineConfigAndTests'