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
Ramachandra Kamath Arbettu c84114c3df
Enable support for executing on K8S as a step (#231)
* Create executeDockerOnKubernetes.groovy

* Update dockerExecute.groovy

* Create SysEnvTest.groovy

* Update default_pipeline_environment.yml

* Update executeDockerOnKubernetes.groovy

* Create utils object

* update docker image

* Update mavenExecute.groovy

* Use pipeline-lib than piper

* Check container name

* Always change ownership to 1000

* Check for map

* Fix command

* Move chmod to docker execute

* Use generic name for the pod

* runAsPod has been added

* Return false if script has no k8smapping

* fix syntax error

* Null checks

* Returnn dockerImage name

* Check method body

* Return container name

* Cleanup echos

* Use runAsPod

* Rename step

* Use official jenkins JNLP agent image

* Construct containersMap

* Check if kubernetes plugin is active

* Support JaaS

* pass script object

* Move configuration to default section

* Use generic flag to check if running in k8s

* fix jnlp agent name

* Solve travis errors

* Improvements to config and changes to name of the method

* Improvements to config

* Fix type

* Rename stash config

* add import

* Fix map order

* Fix jnlp agent name

* cleanup config usage

* Check if config is enabled

* Use nested k8s mapping

* Support custom docker workspace and move flag to env

* Feature/k8s stage (#1)

* Use nested k8s mapping

* Support custom docker workspace and move flag to env

* Check dockerOptions value

* Support local execution

* Add tests for dockerExecute

* Move config to step and Fix tests

* Use step configuration while running as a pod

* Streamline parameter and config initialization

* Streamline parameter and tests

* Cleanup and align variable name

* Use default JNLP agent if one not defined in config

* Add tests for runInsidePod. Ensure lowercase container names.

* Improve tests and remove unused code block

* Fix permission issues

* Perform stashing and unstashing inside container

* Use custom jnlp agent due to user id restriction

* Fix tests after jnlp agent change

* Address review comments

* Initialize script to default value if null

* Address review comments

* Update exeception handling and documentation

* Improve documentation

* correct indent

* Link documents to the index page

* Merge containerExecute and dockerExecuteOnKuberenetes step and address comments.

* Update dockerExecute.md

* Update dockerExecuteOnKubernetes.md

* Update default_pipeline_environment.yml

* update documentation

* Update documentation. Use annotation for singleton

* Update DockerExecuteOnKubernetesTest.groovy

* Update dockerExecute.groovy

* Update dockerExecuteOnKubernetes.groovy

* Improve documentation and test case names

* neoDeploy: switch to chained ConfigurationHelper (#244)

* switch neoDeploy to chained ConfigurationHelper

* update imports

* Improve tests

* Address review comments

* Improve documentation

* made dockerImage non-mandatory parm, improved test

* add comment regarding userid assumption
2018-08-21 15:45:59 +02:00

248 lines
7.5 KiB
YAML

#Project Setup
general:
productiveBranch: 'master'
collectTelemetryData: true
changeManagement:
transportRequestLabel: 'TransportRequest\s?:'
changeDocumentLabel: 'ChangeDocument\s?:'
clientOpts: ''
credentialsId: 'CM'
git:
from: 'origin/master'
to: 'HEAD'
format: '%b'
gitSshKeyCredentialsId: '' #needed to allow sshagent to run with local ssh key
jenkinsKubernetes:
jnlpAgent: 's4sdk/jenkins-agent-k8s:latest'
#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'
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'
dockerExecuteOnKubernetes:
stashIncludes:
workspace: '**/*.*'
stashExcludes:
workspace: 'nohup.out'
influxWriteData:
influxServer: 'jenkins'
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'
vmSize: 'lite'
neoCredentialsId: 'CI_CREDENTIALS_ID'
newmanExecute:
dockerImage: 'node:8-stretch'
failOnError: true
newmanCollection: '**/*.postman_collection.json'
newmanEnvironment: ''
newmanGlobals: ''
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'
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'
stashExcludes:
buildDescriptor: '**/node_modules/**/package.json'
deployDescriptor: ''
git: ''
opa5: ''
opensourceConfiguration: ''
pipelineConfigAndTests: ''
securityDescriptor: ''
tests: ''
snykExecute:
buildDescriptorFile: './package.json'
dockerImage: 'node:8-stretch'
exclude: []
monitor: true
scanType: 'npm'
stashContent:
- 'buildDescriptor'
- 'opensourceConfiguration'
toJson: false
toHtml: false
testsPublishResults:
junit:
pattern: '**/target/surefire-reports/*.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: