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

919 Commits

Author SHA1 Message Date
Daniel Kurzynski
b32214ee78
Inherit from Kubernetes pod template (#1361) 2020-04-08 19:54:06 +02:00
Christopher Fenner
3308243685
fix: add stash for pipeline custom defaults (#1381) 2020-04-08 16:00:02 +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
chrisfries
5c1be118a3
fix: fixing issues with cf docker deployment (#1289) 2020-04-07 09:10:38 +02:00
Stephan Aßmus
ded6152b56
nexusUpload: Remove config processing from Groovy layer (#1364) 2020-04-04 11:44:02 +02:00
Oliver Nocon
999197b919
Add step to prepare the version for an artifact (#1343) 2020-04-03 16:34:40 +02:00
dominiklendle
00b80f0247
Removed report from piperExecuteBin (#1362)
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2020-04-03 13:23:44 +02:00
HenrikB
0a29ff2c57
feat(sonar): report to custom branch name (#1341)
* feat(sonar): report to custom branch name

* fix typo

Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
2020-04-01 12:38:36 +02:00
Dominik Lendle
5fba815fe8
Transformation of cfCreateServiceKey to Golang (#1253) 2020-04-01 11:45:31 +02:00
Marcus Holl
04b5805410
Provide verbose flag via signature (#1304) 2020-04-01 10:00:36 +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
Stephan Aßmus
0c6dabbd1e
Pass custom config and default configs also to getConfig (#1346)
Co-authored-by: Daniel Kurzynski <daniel.kurzynski@sap.com>
2020-03-31 13:10:02 +02:00
Srinikitha Kondreddy
27286deb59
Add env variable to control execution of extensions in project repo. (#1326)
* Introduce new env variable to restrict extension files exec

* Add docu on restricting exec of extension files

* Update documentation/docs/extensibility.md

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

* Rename parameter

* Update documentation/docs/extensibility.md

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

* Add test for restricting extensions exec

* Fix additional tests

* extract condition

* use binding for env vars

* mock env binding

* Update piperStageWrapper.groovy

🙄

Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
Co-authored-by: Marcus Holl <marcus.holl@sap.com>
2020-03-31 12:51:34 +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
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
9ed39cfa3f
Maven build groovy (#1303) 2020-03-23 09:58:54 +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
Daniel Kurzynski
6bd259e5d4
Fix sidecar env vars (#1292) 2020-03-20 11:36:16 +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
Oliver Nocon
a49d8947c0
Streamline calling piper go binary (#1254) 2020-03-17 09:19:09 +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
Florian Geckeler
9a28e12d5d
Add groovy wrapper for mavenExecuteStaticCodeChecks and rename go step 2020-03-12 15:45:57 +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
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
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 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
Christopher Fenner
2b2b57305e
fix: handle NPE in seleniumExecuteTests (#1239)
* handle NPE

* fix Code Climate issue

* add test case

Co-Authored-By: Maximilian Lenkeit <mlenkeit@users.noreply.github.com>

* correct test case

Co-authored-by: Maximilian Lenkeit <mlenkeit@users.noreply.github.com>
2020-03-03 17:09:09 +01:00
Sven Merk
4c97231ff9
Avoid using Iterators to get around NotSerializableException (#1220) 2020-02-25 12:25:26 +01:00
René Kschamer
d754a669b2
Add Docker deploy support to cloudFoundryDeploy (#977)
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
Co-authored-by: Daniel Kurzynski <daniel.kurzynski@sap.com>
2020-02-25 10:20:15 +01:00
Maximilian Lenkeit
fa4938e590
seleniumExecuteTests: expose only required metadata (#1179) 2020-02-19 11:21:11 +01:00
Oliver Nocon
fd76f721ea
Streamline implementation githubPublishRelease (#1191) 2020-02-19 09:05:53 +01:00
Maximilian Lenkeit
973a47d3b2
Add support for Selenium Hub credentials (#1171)
* add parameter for selenium hub credentials

* align selenium hub parameter names

Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
2020-02-17 14:34:19 +01:00
Maximilian Lenkeit
6271784e21
log node.js and npm version in related steps (#1182) 2020-02-17 13:24:56 +01:00
Christopher Fenner
87f0cb687a
refactor(deployment): ease debugging in blue ocean (#1173)
* Update cloudFoundryDeploy.groovy

fixes #857

* Update cloudFoundryDeploy.groovy

* Update neoDeploy.groovy

* fix typo

* Update cloudFoundryDeploy.groovy

* Update cloudFoundryDeploy.groovy

* adjust test cases
2020-02-14 13:41:36 +01:00
FrittenToni
0d82a39098
Ignore email addresses containing string "noreply" (#1178)
* avoid sending mails to addresses which contain the string noreply

* enrich test to ensure that mails containing the string noreply never end up in recipient list

* Update MailSendNotificationTest.groovy
2020-02-13 15:12:48 +01:00
Maximilian Lenkeit
00b094d74b
seleniumExecuteTests: expose container metadata via env vars (#1170)
* inject container metadata via env vars to selenium

* set step-specific env var for uiVeri55ExecuteTests

* Revert "set step-specific env var for uiVeri55ExecuteTests"

This reverts commit 8deb39ac5b.

* remove env vars that indicate piper step

* remove env var to indicate execution through selenium step

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

* remove defaulting of docker env vars

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

* Update vars/karmaExecuteTests.groovy

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

Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
2020-02-13 09:09:08 +01:00
dominiklendle
2007a94174
Add step cloudFoundryDeleteService (#1097) 2020-02-10 14:53:12 +01:00
Stephan Aßmus
9658f3b480
writeFile() cannot be passed a Map (#1163)
* writeFile() cannot be passed a Map

I've changed the return type of DebugReport.generateReport() from
String to Map in order to get the generated file name as part of the
return value instead of getting it from a field of DebugReport. The
UnitTest checks whether writeFile() creates the debug_report file
successfully and whether it has the expected contents. The effect
of passing the Map instead of map.contents to writeFile() should
have been an unnecessary wrapping via Map.toString() as in the test,
but in the execution context of Jenkins, this throws an
IllegalArgumentException: Could not instantiate {... and then the
results of map.toString().

* Improve JenkinsWriteFileRule compatibility

Calling m.text.toString() is wrong, since the type stored at m.text
already needs to be a String (or GString). Expecting valid parameters
here makes sure problems are detected by tests already. (All tests
pass as before.)
2020-02-10 12:25:33 +01:00
Stephan Aßmus
71766be2f5
Pass stageName to dockerExecuteOnKubernetes (#1162)
This fixes configuring sidecars for the given stage when Jenkins runs
on Kubernetes and the surounding stage has passed a stageName via parameters which is different from env.STAGE_NAME.
2020-02-08 12:57:55 +01:00
Daniel Kurzynski
eb82851502
Disable or fail on blue green deployment if not supported by manifest structure (#1160) 2020-02-07 18:46:03 +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