1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-14 11:03:09 +02:00
Commit Graph

2538 Commits

Author SHA1 Message Date
Stephan Aßmus
03096b5d05
Pass custom default-config files and custom project config from Jenkins side to piper (#1333) 2020-03-30 14:31:24 +02:00
Florian Wilhelm
0c3493f9ad
Only add already tracked files to git (#1312) 2020-03-26 09:41:03 +01:00
Daniel Kurzynski
a40ac015a8
Add tests for maven build (#1276) 2020-03-26 08:23:21 +01: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
Stephan Aßmus
804bd8e3e0
http.go: Set fine-grained timeouts (#1257)
* Replace the default maximum request deadline with a default timeout on the transport level.
* Keep the possibility to set a maximum request deadline.
2020-03-23 15:02:22 +01:00
Stephan Aßmus
4f7955bede
Fix CLI exec call building for keytool (#1307) 2020-03-23 13:29:42 +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
Daniel Kurzynski
9ed39cfa3f
Maven build groovy (#1303) 2020-03-23 09:58:54 +01:00
Marcus Holl
c1b4d4a0c9
TMS: http plugin: no console log (#1301)
otherwise we reveal the auth token when this method is called for the auth request.
In case we need the response body in the log, it is the duty of the caller to put
the response body in the log.
2020-03-23 08:43:49 +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
Florian Wilhelm
f81fe916dc
Configure GitHub Release (#1299)
Same configuration as the old release process used
2020-03-20 14:01:49 +01:00
Daniel Kurzynski
6bd259e5d4
Fix sidecar env vars (#1292) 2020-03-20 11:36:16 +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
Kaj-Sören Mossdorf
5616ac2ab0
Parse values to json with groovy methods (#1266)
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2020-03-19 14:46:56 +01:00
Christopher Fenner
6feb0cf9e9
fix(telemetry): disable telemetry in init stage (#1272)
* disable telemetry in init stage

* Apply suggestions from code review

* Update vars/piperStageWrapper.groovy
2020-03-19 10:49:28 +01:00
Oliver Nocon
289bb58e66
Fix issue with pipeline resilience (#1288)
closes #1286 which was introduced with #1146
2020-03-18 08:32:28 +01:00
Marcus Holl
25553bc3b9
nonCPS annotation when settings the git urls in initStage (#1273)
* nonCPS

* Reduce scope of @NonCPS annotation
2020-03-17 13:23:55 +01:00
Daniel Kurzynski
4e9e31810c
Config maven in general 2020-03-17 12:09:08 +01:00
Daniel Mieg
81708648e4
Improve error handling (#1263) 2020-03-17 10:54:48 +01:00
Oliver Nocon
a49d8947c0
Streamline calling piper go binary (#1254) 2020-03-17 09:19:09 +01:00
Stephan Aßmus
e51cfe276c
Fix copy-paste-bug for downloading settings (#1284)
* Fix copy-paste-bug for downloading settings
* Extend unit tests accordingly.
* Fix some expected versus actual mixup
2020-03-17 08:33:35 +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
Christopher Fenner
a970507619
refactor(sonar): provide trust store via JVM parameter (#1270)
* provide trust store via JVM parameter

* adjust test cases

* Update vars/sonarExecuteScan.groovy

* Update vars/sonarExecuteScan.groovy

* Update sonarExecuteScan.groovy
2020-03-16 10:34:07 +01:00
Marcus Holl
db8cb2bf62
Add missing config for tmpUpload (#1277) 2020-03-16 09:34:59 +01:00
Stephan Aßmus
e0c789a791
Add Evaluate() method to maven package (#1268)
Useful for evaluating properties from pom files using the Maven evaluate plugin.
2020-03-13 14:54:49 +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
Christopher Fenner
dd67be3d21
docs(command): Clarify runExecutable Env usage (#1264)
* Clarify runExecutable Env usage

* remove trailing spaces
2020-03-12 09:00:51 +01:00
Florian Wilhelm
4e9b7f6cbf
Release go-binary via piper action (#1243) 2020-03-11 16:58:56 +01:00
Christopher Fenner
922a1796e0
fix(mta): add os.Environ() only once to command (#1260)
* add os.Environ() only once

* correct imports
2020-03-11 15:15:00 +01:00
Maximilian Lenkeit
2021c8215a
Expose seleniumHubCredentialsId to higher-level Jenkins steps (#1265)
* expose seleniumHubCredentialsId in karmaExecuteTests

* expose seleniumHubCredentialsId in uiVeri5ExecuteTests

* refer to documentation of seleniumExecuteTests
2020-03-11 13:35:49 +01:00
Sven Merk
c645087517
NotSerializableException next part (#1262)
* Update dockerExecute.groovy

* Update dockerExecute.groovy

* Update dockerExecute.groovy
2020-03-11 10:05:03 +01:00
Kaj-Sören Mossdorf
4aeb9517a6
Fix writeToDisk in case value is instance of List (#1249)
* Added documentation of stepParameters being a Groovy map, requiring at least the script reference

* Fix writeToDisk in case value is instance of List

* Fix writeToDisk in case value is instance of List

* Added comments

* Keep String as is, serialize everything else

* Fixed import

Co-authored-by: Sven Merk <33895725+nevskrem@users.noreply.github.com>
2020-03-11 08:18:27 +01:00
Florian Geckeler
ed7f4831fb
Fix typo in mavenStaticCodeChecks.yaml 2020-03-10 09:59:22 +01:00
Florian Wilhelm
fdb9fd3c6e
Print "Status" in error case in http client (#1256)
This might provide useful context to the user.

For example when you try to upload a SNAPSHOT jar to a maven-release
repo in nexus, this will print an error like

returned with response 400 Repository version policy: RELEASE does
not allow version: 1.0-SNAPSHOT

instead of

returned with HTTP Code 400
2020-03-09 19:25:40 +01:00
Sven Merk
6edaaecf15
Support workspace paths containing whitespaces (#1241)
* Support workspace paths containing whitespaces

* Update sonarExecuteScan.groovy

* Update sonarExecuteScan.groovy

* Update sonarExecuteScan.groovy

* Switch to export

* Update sonarExecuteScan.groovy

* Update sonarExecuteScan.groovy

* Update sonarExecuteScan.groovy

* Update sonarExecuteScan.groovy

* Update sonarExecuteScan.groovy

* Update sonarExecuteScan.groovy
2020-03-09 15:40:59 +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
Stephan Aßmus
84f3e10e3b
Implementation of Nexus upload as Go package (#1250)
The nexus package implements uploading artifacts to a Nexus repository manager version 2 or 3 via HTTP. It also generates the MD5 and SHA1 hash files for the uploaded artifacts in the Nexus repository.
2020-03-06 23:10:10 +01:00
Sven Merk
b43f331fad
Avoid NotSerializableException #3 (#1252) 2020-03-06 14:05:14 +01:00
Oliver Nocon
dd5cfcc1aa
Added documentation of stepParameters being a Groovy map, requiring at least the script reference (#1248)
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2020-03-05 17:16:53 +01:00
Sven Merk
d29c249e35
Avoid using Iterators to get around NotSerializableException (#1242)
* Avoid using Iterators to get around NotSerializableException

* Avoid using Iterators to get around NotSerializableException
2020-03-05 15:48:05 +01:00
Oliver Nocon
622d559eae
Add ServiceKey deletion to cloudFoundryDeleteService step (#1177) 2020-03-05 15:35:43 +01:00
Christopher Fenner
0b3b4aae3d
chore: streamline GH actions (#1246)
* chore: streamline GH actions

* force use of local piper

* look for piper in project root

* use local piper

* Update .github/workflows/verify-go.yml

* remove chmod
2020-03-05 13:35:35 +01:00
Sven Merk
507bf3f98d
Update handlePipelineStepErrors.md (#1247) 2020-03-05 10:19:02 +01:00
Oliver Feldmann
5eb8edd3d9
Fix tip in documentation (#1196)
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2020-03-04 17:01:49 +01:00