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

900 Commits

Author SHA1 Message Date
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
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
Oliver Nocon
61da9faf98
Support InfluxDB plugin in version 2.0 (#1130)
* Support InfluxDB plugin in version 2.0
closes #932
superseeds #933
2020-02-06 11:27:31 +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
Stephan Aßmus
164c12b9f0 Executing extensions in handlePipelineStepErrors
The code of extensions was not executed within the try-catch-block of
handlePipelineStepErrors. The main benefit of this change is better
logging and re-using the 'unstable' feature also for
extended/overwritten steps.
2020-02-04 12:33:13 +01:00
Daniel Mieg
6f0bde154b
Go implementation for abapEnvironmentPullGitRepo() (#1107) 2020-02-04 11:43:27 +01:00
Christopher Fenner
a79fd95fd8
fix: correct jenkinsKubernetes parameter exposure & docs (#721)
* remove jenkinsKubernetes parameter
2020-02-04 08:02:38 +01:00
Sven Merk
36423eb78d
Avoid potential collisions among steps (#1141)
* Avoid potential collisions amongst steps

* Improve code, move to JenkinsUtils

* Improve code

* Improve tests

* Fix test

* Add scope on golang side
2020-02-03 15:25:49 +01:00
Stephan Aßmus
fbcae5be53 Exchange wrong TODO with NOTE about what actually happens 2020-02-03 12:37:20 +01:00
Stephan Aßmus
942e6dd18a Don't check for isResilient, use failOnError 2020-02-03 12:37:20 +01:00
Stephan Aßmus
4420c34e4f Integrate DebugReport with handlePipelineStepErrors 2020-02-03 12:37:20 +01:00
Stephan Aßmus
6c9e23db40 Feed DebugReport from piperStageWrapper
Information about overwritten/extended stages is stored in DebugReport (as done before in SDK Pipeline's runAsStage).
2020-02-03 12:37:20 +01:00
Florian Wilhelm
941eba0472
Fix Could not find matching constructor for: hudson.FilePath (#1134)
The constructor for hudson.FilePath does not take a file, but rather a
string containing the path to the file.
2020-02-03 12:28:16 +01:00
Stephan Aßmus
a7543fd19b
Merge branch 'master' into stashing-steps 2020-01-29 16:19:17 +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
Stephan Aßmus
53833eaae9 Move stage stashing functionality into Utils
* No functional change intended
 * Steps in the SDK pipeline may use Utils for stashing,
   as separate stashFiles and unstashFiles steps are eliminated.
2020-01-29 12:30:07 +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
Marcus Holl
7b95c04752
[refactor] CPE read/write from/to disk: remote repetitive coding (#1110)
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2020-01-28 13:22:37 +01:00
Sven Merk
cbe368fe36
Checkmarx as golang (#1075)
* Added base functionality for checkmarx interaction

* Extend http client with file upload capabilities

* Latest changes

* Add debug logging

* Introduce Uploader interface

* Add tests for checkmarx client

* Hook new checkmarx command

* Improve coverage

* Add tests

* Improved test coverage and fixed code

* Add influx reporting

* Add alternation capabilities

* Add groovy step

* Try fix cmd

* Enhancements

* Fix report generation

* Final performance improvements

* Fix code

* Structure code, cleanup

* Improvements

* Fix codeclimate issue

* Update groovy

* Adapt latest changes to http

* Fix test

* Fix http tests

* Fix test

* Fix test

* Fix test 2

* Fix code

* Fix code 2

* Fix code

* Code

* Fix

* Fix

* Add report and link handling

* Fix returns, add groovy test

* Review comments

* Added doc template

* Docs update

* Remove SAP internals

* Better status display

* Add name to link

* Fix test

* Fix

* Fix verbose handling

* Fix verbose handling 2

* Fix verbose handling 3

* Fix

* Tiny improvements

* Regenerate

* Fix test

* Fix test code

* Fix verbosity issue

* Fix test

* Fix test

* Fix test
2020-01-27 23:40:53 +01:00
Oliver Nocon
73ab887f25
Add kubernetesDeploy step (#1073)
* Add kubernetesDeploy step

Co-authored-by: Sven Merk <33895725+nevskrem@users.noreply.github.com>
2020-01-24 14:30:27 +01:00