1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-12 10:55:20 +02:00
Commit Graph

277 Commits

Author SHA1 Message Date
Marcus Holl
b25079f862
Provide tooling for malware scanning (#1329)
Tooling for malwareScanning.

Co-authored-by: Stengel <r.stengel@sap.com>
2020-04-23 09:12:10 +02:00
Oliver Nocon
3a9bc54711
protecodeExecuteScan - align user parameter (#1426)
align parameter name for scan user with other steps
2020-04-20 16:44:01 +02:00
Daniel Kurzynski
0e4bff7aa6
Configure default jenkins agent for kubernetes (#1412) 2020-04-16 15:08:09 +02:00
Daniel Kurzynski
ce4be51362
Mask secrets (#1382) 2020-04-16 14:37:45 +02:00
Oliver Nocon
b9781ce50c
artifactPrepareVersioning: support more buildTools (#1367)
* artifactPrepareVersioning: support more buildTools
2020-04-15 13:12:43 +02:00
Florian Wilhelm
b71ff0a055
Extend nexusUpload to also handle npm (#1379) 2020-04-11 12:56:44 +02:00
Christopher Fenner
c190deee44
refactor(sonar): switch to Sonar scan in GO (#1320)
* use sonar go in groovy

* use SONAR_TOKEN

* only use owner/repo if both are set

* trim version to major version digit

* fix code climate issues

* remove Sonar defaults

* use sonar go step

* use SONAR_TOKEN

* use certs from parameters

* use docker workspace & options

* add instance parameter

* implement branchName

* implement branchName

* remove duplicate default

* update docs

* fix TODOs

* remove merge mess

* fix code climate issue

* address comments

* respect custom defaults and custom config file name

* fix typo

* remove obsolete test cases

* disable CommonStepChecks

* check step config instead of context config

* remove TODOs

* respect jenkins PR envvars

* use value from stepConfig

* Update vars/sonarExecuteScan.groovy

* rename options to config

* correct type for options

* add test cases

* log sonar.options in debug message

Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2020-04-08 12:55:46 +02:00
Oliver Nocon
ef99f710ae
artifactPrepareVersion: documentation (#1365)
* artifactPrepareVersion: documentation

* Fix CodeClimate finding

* Update generated file

* Update versioning.yaml

* Update docs wrt PR 1374

* update generated step

* Update resources/metadata/versioning.yaml

Co-Authored-By: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>

* Update resources/metadata/versioning.yaml

Co-Authored-By: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>

* update generated file

Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
2020-04-08 09:28:03 +02:00
Oliver Nocon
909c77045d
artifactPrepareVersion: new versioning option (#1374) 2020-04-07 13:27:36 +02:00
Florian Wilhelm
9372aa1f43
Relax requirements for maven projects in nexus upload (#1348)
* iterate over found pom.xml files for maven projects, deploy found artifacts
* classifiers are found by testing prefix/suffix of artifact
* Remove additionalClassifiers option
* Improve documentation
* Fix fallback for finalBuildName
* Ignore mvn modules with packaging != pom but no target dir
* Fail when main artifact is missing, add more tests

Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>
2020-04-03 21:32:38 +02:00
Oliver Nocon
999197b919
Add step to prepare the version for an artifact (#1343) 2020-04-03 16:34:40 +02:00
Oliver Feldmann
a8953d4f28
Fix cloudFoundryDeploy config keys in Acceptance (#1296)
* Fix cloudFoundryDeploy config keys in Acceptance

* Add neo config keys

Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2020-04-03 11:03:00 +02:00
Dominik Lendle
5fba815fe8
Transformation of cfCreateServiceKey to Golang (#1253) 2020-04-01 11:45:31 +02:00
Stephan Aßmus
0b8b6f2b0c
Migrate stage artifact deployment from Cloud SDK Pipeline-Lib (#1324)
Co-authored-by: Daniel Kurzynski <daniel.kurzynski@sap.com>
Co-authored-by: Florian Geckeler <f.geckeler@sap.com>
2020-03-31 15:16:18 +02:00
Florian Geckeler
bb72c38413
Add documentation for mavenExecuteStaticCodeChecks groovy part (#1339)
* Add documentation for mavenExecuteStaticCodeChecks groovy part

* Add import

* Remove wrong default

* Add markdown file

* Add mkdocs

* Update vars/mavenExecuteStaticCodeChecks.groovy

Co-Authored-By: Daniel Kurzynski <daniel.kurzynski@sap.com>

* remove import

* remove import

Co-authored-by: Daniel Kurzynski <daniel.kurzynski@sap.com>
2020-03-31 11:29:44 +02:00
Florian Geckeler
bd92804745
Add static code checks stage (#1308)
* Add static code checks stage
* Rework go step to accept thresholds for the checks and fail maven build if above the thresholds
2020-03-30 15:59:59 +02:00
Daniel Kurzynski
04cdf4b2fe
Always pull sidecar images by default (#1317) 2020-03-25 20:03:17 +01:00
Christopher Fenner
c74183771a
feat(mta): update cloud MTA build tool to v1.0.10 (#1310) 2020-03-24 08:51:42 +01:00
Florian Geckeler
b8080acd91
Adapt paths to pipeline_report debug_report and maven_settings templates (#1311)
* Add ReportAggregator to collect information about executed stages and create reports

* ReportAggregator is used by the SAP Cloud SDK to collect information about which stages were executed,
  code coverage and many more measurements.
* based on the measurements a pdf report can be generated which can be used to get a certification by SAP
2020-03-23 20:01:58 +01:00
Christopher Fenner
60b7d3a8df
refactor(sonar): implement Sonar step in GO (#1042)
* refactor(sonar): add initial metadata file for GO-based sonar step

* refactor(sonar): add initial generated files for GO-based sonar step

* refactor(sonar): add initial step file for GO-based sonar step

* refactor(sonar): add sonar cmd to executable

* refactor(sonar): cleanup metadata file

* fix(go): use capital TLS in golang names

* add download of Sonar scanner cli

* move download & unzip methods to FileUtils

* download certificate files

* use http.Downloader

* update generated code

* add slice prefix function

* update sonar step

* add test cases

* update docs

* use node:lts image

* use latest sonar-scanner

* add test cases

* use latest sonar-scanner

* fix test case

* change things

* return errors on functions

* limit changeID visibility

* use lowercase scm provider

* add test case for legacy PRs

* add test case

* update docs

* use local temp dir

* extend parameter visibility to GENERAL

* use SONAR_AUTH_TOKEN

* remove comments

* update generated code

* Apply suggestions from code review

* change to private fields

* use setter for sonar options & environment

* remove obsolete return statement

* add comment about Downloader mock

* add test case for custom options

* handle custom options

* refactor slice functions

* fix go fmt

* fix generated step code

* update docs
2020-03-23 10:38:31 +01:00
Florian Geckeler
2673a58a38
Add ReportAggregator to collect information about executed stages and create reports (#1291)
* Add ReportAggregator to collect information about executed stages and create reports

* ReportAggregator is used by the SAP Cloud SDK to collect information about which stages were executed,
  code coverage and many more measurements.
* based on the measurements a pdf report can be generated which can be used to get a certification by SAP
2020-03-21 18:42:27 +01:00
Stephan Aßmus
20b65d5a2e
Implement nexusUpload command and tests (#1255)
Artifacts to upload are assembled for MTA projects and Maven projects with optional application sub-module. Then maven deploy:deploy-file is used as backend to upload bundles of artifacts plus sub-artifacts.

Co-authored-by: Florian Wilhelm <florian.wilhelm02@sap.com>
2020-03-20 18:20:52 +01:00
Florian Geckeler
b39080409c
Add DownloadCacheUtils for handling download cache docker container (#1298) 2020-03-20 17:01:20 +01:00
Oliver Nocon
8fbeddb26c
Golang step metadata: Config aliases for steps (#1293)
* Golang step metadata: Config aliases for steps

This will ease following scenarios:
* config migration due to step name changes
* re-use of more general config, e.g. `mavenExecute` in `mavenBuild`

* fix CodeClimate finding

* Fix panic if original stage config does not exist yet
2020-03-19 17:24:35 +01:00
Daniel Kurzynski
4e9e31810c
Config maven in general 2020-03-17 12:09:08 +01:00
Oliver Nocon
a0223a2a0e
Fix issue with deployment related stashing in piperPipeline (#1281)
relates to #1267
2020-03-16 12:52:58 +01:00
Christopher Fenner
5b344b8b7a
use sonar-scanner 4.3.0.2102 (#1271) 2020-03-16 10:40:38 +01:00
Daniel Kurzynski
a923e4cfc2
Add maven build/install step (#1245) 2020-03-13 13:32:37 +01:00
Florian Geckeler
9a28e12d5d
Add groovy wrapper for mavenExecuteStaticCodeChecks and rename go step 2020-03-12 15:45:57 +01:00
Florian Geckeler
ed7f4831fb
Fix typo in mavenStaticCodeChecks.yaml 2020-03-10 09:59:22 +01:00
Florian Geckeler
de2909e64b
Add Maven static code checks
* add static code checks for maven based projects as:
  * pmd plugin
  * spotBugs plugin
* test modules as unit-tests and integration-tests will be ignored by default. Additional modules to ignore are configurable
* for pmd: rulesets and excludes are configurable
* for spotBugs: includeFilter and excludeFilter are configurable
2020-03-09 08:58:59 +01:00
Oliver Nocon
622d559eae
Add ServiceKey deletion to cloudFoundryDeleteService step (#1177) 2020-03-05 15:35:43 +01:00
Florian Geckeler
783d955654
Add mavenExecute to go lib 2020-02-28 13:09:46 +01:00
Marcus Holl
e10a7f20c7
xs deploy cpe inputs and outputs (#1111)
Use inputs and outputs from commonPipelineEnvironment

* mtaPath is read as input
* operationId is provided as output and read as input
2020-02-28 11:01:09 +01:00
Marcus Holl
190a4708a2
go: mta build (#1128)
move mtaBuild step from groovy to go.

Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>
2020-02-25 14:33:34 +01:00
Srinikitha Kondreddy
38237eb97b
Update mta yaml file to support cloud MBT mtar deploy to neo. (#1198)
* Update schema and hcp deployer version in mta.yaml file

* Add name parameter in mta yaml file

* Rename template_mta.yml to template_mta.yaml

* Fix indentation

Co-authored-by: Oliver Feldmann <oliver.feldmann@sap.com>
Co-authored-by: Marcus Holl <marcus.holl@sap.com>
2020-02-20 14:57:50 +01:00
Oliver Nocon
fd76f721ea
Streamline implementation githubPublishRelease (#1191) 2020-02-19 09:05:53 +01:00
redehnroV
be03b3dfc1
Adjust documentation for Protecode (#1175) 2020-02-12 15:57:39 +01:00
dominiklendle
2007a94174
Add step cloudFoundryDeleteService (#1097) 2020-02-10 14:53:12 +01:00
Stephan Aßmus
c628d208c7
Implement archiving the debug report as step (#1152)
* Implement archiving the debug report as step
2020-02-07 16:30:08 +01:00
redehnroV
c37df0d55e
Adjust protecode influx parameter (#1161) 2020-02-07 14:12:40 +01:00
Marcus Holl
61442371df
Switch the default for the mta build toolset (#1157) 2020-02-07 12:20:46 +01:00
redehnroV
2ebf2010b7
Protecode as GoLang (#1119)
* Protecode as go implementation

Co-authored-by: Sven Merk <33895725+nevskrem@users.noreply.github.com>
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2020-02-06 16:16:34 +01:00
Daniel Mieg
2e742c7ed3
Fix formatting of documentation (#1151)
* Fix formatting of documentation

* Regenerate go files
2020-02-05 15:46:14 +01:00
Sven Merk
59e9d897bf
feat(hadolint): enable correct handling of multiple scan results (#1145)
* Add missing parameter

* Update hadolintExecute.groovy

* Update hadolintExecute.groovy

* Update hadolintExecute.groovy

* Update hadolintExecute.groovy

* Update hadolintExecute.groovy

* Update hadolintExecute.groovy

* Update hadolintExecute.groovy

* Update hadolintExecute.groovy

* Update hadolintExecute.groovy

* fix code climate issues

* Update default_pipeline_environment.yml

* Update hadolintExecute.groovy

* Update hadolintExecute.groovy

* Update hadolintExecute.groovy

* Update hadolintExecute.groovy

* Update hadolintExecute.groovy

* Update hadolintExecute.groovy

* Update hadolintExecute.groovy

Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
2020-02-04 16:36:09 +01:00
Daniel Mieg
6f0bde154b
Go implementation for abapEnvironmentPullGitRepo() (#1107) 2020-02-04 11:43:27 +01:00
Stephan Aßmus
942e6dd18a Don't check for isResilient, use failOnError 2020-02-03 12:37:20 +01:00
Stephan Aßmus
6e551dfc79 Add DebugReport facility
The DebugReport is a global instance where steps can store information relevant for diagnosing failed pipelines. In the SDK Pipeline, this is used to generate a debug report within the postActionArchiveDebugLog step. The reason for adding this to Piper is to feed information about extended or overwritten stages in piperStageWrapper into the DebugReport, as was done before in the SDK Pipeline's equivalent runAsStage step.
2020-02-03 12:37:20 +01:00
Oliver Nocon
152c4dc9d2
Pass container image via CPE (#1113)
* Pass container image via CPE
* Update generated step
* update map name to better represent content
2020-01-29 16:03:18 +01:00
Christopher Fenner
92441577d8
fix(NPM): change NodeJS image to LTS (#1069)
* change NodeJS image to current LTS

* Update default_pipeline_environment.yml

* Update SonarExecuteScanTest.groovy

* use node:lts-stretch image
2020-01-29 11:17:56 +01:00