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

910 Commits

Author SHA1 Message Date
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
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
Stephan Aßmus
1d9ecdb999 Added EnvironmentUtils needed by DebugReport
This should have been added along with DebugReport. For context:
EnvironmentUtils used to be a class alongside DebugReport and thus
there was no 'import' directive. Working with Jenkins DSL stuff
has numbed my ability to pay attention to the IDE indicating errors.
2020-02-03 17:07:56 +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
c06d4c95d6 Add pipelineStageWrapper test for global extension 2020-02-03 12:37:20 +01:00
Stephan Aßmus
0c2fb3181a Test DebugReport usage in piperStageWrapper 2020-02-03 12:37:20 +01:00
Stephan Aßmus
3010cb0c10 Test DebugReport usage in handlePipelineStepErrors 2020-02-03 12:37:20 +01:00
Stephan Aßmus
8e953715a0 DebugReport: Log failure to retrieve Jenkins plugins 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
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
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
Marcus Holl
cea3d0b4e3
Add test handling exception in dockerExecuteOnK8S in case exception is raised. (#1081)
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2020-01-29 14:15:12 +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
Stephan Aßmus
f59d9f9d49 Added Unit-Test for extensions using an older API 2020-01-24 11:29:35 +01:00
Florian Geckeler
b509e14afd
Use maven evaluate for mavenArtifactVersioning
* add evaluateFromMavenPom to piper Utils
* adapt mavenExecute to accept `returnStdout` as parameter. If configured mavenExecute will return the stdout for further processing
* adapt tests of mavenExecute and mavenArtifactVersioning as well as add another exception to CommonStepsTest because mavenExecute will return a String if configured
2020-01-23 09:31:01 +01:00
Daniel Mieg
48a76bc4d2 Fix random UUID generation in Unit Tests (#1099)
* Fix random UUID generation in Unit Tests

* Use before and after methods

* Add import of org.junit.After

* Add go step for abapEnvironmentPullGitRepo

* Revert "Add go step for abapEnvironmentPullGitRepo"

This reverts commit 08b6b16217.

Co-authored-by: Oliver Feldmann <oliver.feldmann@sap.com>
2020-01-22 10:50:26 +01:00
Christopher Fenner
ce47a80d19 chore(test): cleanup metaClass (#1104) 2020-01-22 08:57:37 +01:00
Marcus Holl
8563da8dda Use old approach for resolving mode action and docker related params
On groovy level we take into account:

- parameters via signature
- project config
- landscape config(s)
- for docker: nested and plain config

also more tests added ...
2020-01-17 09:40:31 +01:00
Oliver Nocon
a46b57e6b4
Persisted pipeline environment for golang library (#1091)
* Use commonPipelineEnvironment in go binary

* Update groovy part incl. tests

* Rework structure and naming

* Support influx resources in steps

* Update tests and some cleanups

* Add correct defer handling

* Address PR feedback

* Fix test

* Update resources.go

Co-authored-by: Sven Merk <33895725+nevskrem@users.noreply.github.com>
2020-01-15 12:16:25 +01:00
Marcus Holl
4578336180 Merge remote-tracking branch 'github/master' into HEAD 2020-01-07 12:35:28 +01:00
Marcus Holl
a2b9718454 Provide operationId also from signature 2019-12-20 15:17:14 +01:00
Marcus Holl
8184312262 Docker pull not hard coded anymore 2019-12-20 15:17:14 +01:00
Christopher Fenner
686235613c
fix(sonar): run sonar scan in NodeJS container (#1078)
* fix(sonar): run sonar scan in NodeJS container

* fix typo

* adapt tests
2019-12-20 10:51:33 +01:00
Marcus Holl
8d074dbd96 Merge remote-tracking branch 'github/master' into HEAD 2019-12-19 15:49:07 +01:00
Marcus Holl
a1e093467e put additional configs into dedicates folder 2019-12-19 15:46:13 +01:00
Marcus Holl
e6b00fa601 Provide support for additional customer config layers. 2019-12-17 17:00:16 +01:00
Christopher Fenner
57ae0e8f8d
fix(kubernetes): invalidate stashes after usage (#1064)
* fix(kubernetes): invalidate stashes after usage

fixes #1057

* adjust test case
2019-12-17 15:10:57 +01:00
RainerHimmeroeder
188686f5a7 add step materializeLogFile to jenkins library (#1046) 2019-12-16 21:09:25 +00:00
Daniel Mieg
23d7058fdd Authentication via Cloud Foundry Service Key (#1034) 2019-12-16 21:02:30 +00:00
Daniel Mieg
76988b2035 add parameter compatibilitiy to cloudFoundryCreateServiceKey (#1065) 2019-12-16 16:36:13 +00:00
Sven Merk
544765b97b Test platform interoperability 2019-12-16 10:03:34 +01:00
Sven Merk
d4bd52f14b Fix test 2019-12-16 09:55:07 +01:00
Marcus Holl
aefe9243e0 xsDeploy with go 2019-12-13 16:05:55 +01:00
andre2007
80e433aaf9 feat(dub): expose dockerEnvVars and dockerWorkspace in dubExecute (#1012) 2019-12-09 16:24:11 +01:00
Prashanth Madarapu
7feaa36868 feat(mta): allow configuration of filename for generated mtar (#1030)
* Add new config mtarName for mtaBuild step

* Remove unnecessary whitespace changes in unit test

* Sort new config & avoid file operation when this config provided

* Modify the test to take the custom name without extension

* Update new config documentation

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

* custom mta name should be given with mtar extension

* Updated the config documentation
2019-12-06 07:48:20 +01:00
Christopher Fenner
1b95951eb2
fix(mta): create MTAR in project root when using Cloud MBT (#1024)
* fix(mta): generate MTAR to the project root when Cloud MBT is used

fixes #1023

* add test case
2019-12-04 13:24:23 +01:00
Thorsten Duda
eda1e54085
Merge branch 'master' into pr/revertNoScriptRef 2019-12-04 08:57:17 +01:00
Daniel Mieg
2ad57f3d19 Add step cloudFoundryCreateServiceKey (#989) 2019-12-02 14:02:51 +01:00
Marcus Holl
d0d4b37b24 Revert "ConfigurationLoader, ConfigurationHelper working without script reference"
This reverts commit 9962060254.
2019-11-26 10:51:32 +01:00
Marcus Holl
4bbfd78437 Revert "Back commonPipelineEnvironment step by shared class"
This reverts commit 149cd96dbf.
2019-11-26 10:43:59 +01:00
Oliver Nocon
2aa34c7a3f
Fix issue with removed parameter --stepName (#1007) 2019-11-25 08:58:16 +01:00
Oliver Nocon
e671094308
Use piper binary for githubPublishRelease (#990)
* Use piper binary for githubPublishRelease
2019-11-21 16:34:22 +01:00
Thorsten Duda
bd6cb9af3c
Merge branch 'master' into pr/httpsPushArtifactSetVersion 2019-11-14 15:15:30 +01:00
Florian Wilhelm
5b58ce830f
Clarify precedence in MapUtils#merge() (#983) 2019-11-14 14:33:23 +01:00
Thorsten Duda
2568316c6e
Merge branch 'master' into pr/httpsPushArtifactSetVersion 2019-11-14 11:13:47 +01:00
Thorsten Duda
8e3cc5e0f6
Merge branch 'master' into pr/configLoaderWithoutScriptReference 2019-11-13 08:11:28 +01:00
Daniel Mieg
cac595b4bb Use credentialsId in step abapEnvironmentPullGitRepo (#974)
* Add option for credentialsId
* Remove mandatory username and password
* Add null checks
2019-11-12 17:40:59 +01:00
Christopher Fenner
7466ae43af
fix: sonar PR voting (#971)
* unstash git files into container

* use CHANGE_BRANCH

* adapt env variables
2019-11-12 17:17:44 +01:00
Marcus Holl
7ed89ea223 Don't use deprecated methods with CPE null 2019-11-12 15:57:16 +01:00
Marcus Holl
74365f7419 Remove unused import 2019-11-12 15:49:02 +01:00
Marcus Holl
3d94511bdd Merge remote-tracking branch 'github/master' into HEAD 2019-11-12 15:37:26 +01:00
Thorsten Duda
7a9c5c9445
Merge branch 'master' into pr/allCPEsCanBeUsed2 2019-11-12 12:16:33 +01:00
Shanuson
8f723caa31 Fix bug and added documentation for cloudFoundryCreateService step (#967)
* fix bug with wrong plugin parameter used
* provided default value for stash-content
* added documentation for step
2019-11-12 10:29:08 +01:00
Thorsten Duda
d77f0f8fac
Merge branch 'master' into pr/allCPEsCanBeUsed2 2019-11-12 07:56:29 +01:00
Oliver Nocon
da0935c0e5
Patch Urls (#929)
* Patch Urls
* fix test
2019-11-11 17:40:23 +01:00
Daniel Mieg
2e0bf3ac34 Add step to pull repository to ABAP in SAP Cloud Platform (#907) 2019-11-07 15:40:45 +01:00
Stengel
73b931441c Merge remote-tracking branch 'upstream/master' into harmonize-docker-arguments 2019-11-07 11:20:54 +01:00
Maximilian Lenkeit
06f63bc5de remove opa5 stash (#897)
* remove opa5 stash

* remove OPA5 test cases

* remove reference to opa5 stash
2019-11-07 11:02:27 +01:00
Oliver Nocon
a04489cd35
Add step spinnakerTriggerPipeline (#793) 2019-11-06 15:37:14 +01:00
Oliver Nocon
de31cde9b8
Add PiperGoUtils for downloading piper binary (#928)
* Add PiperGoUtils for downloading piper binary

PiperGoUtils provide the link between a Jenkins library step and the library step execution running in a go binary.

It makes sure that an adequate binary is available.

* fix CodeClimate finding

* Remove Delimiter and add download resilience.
2019-11-06 11:28:10 +01:00
Stengel
1dbe7352c7 Merge remote-tracking branch 'upstream/master' into harmonize-docker-arguments 2019-11-06 10:02:58 +01:00
Maximilian Lenkeit
5dfc90f386 Make cobertura defaults compatible with UI5 (#941)
* tests(testsPublishResults): evaluate file pattern for cobertura

* tests(testsPublishResults): test for cobertura in UI5 projects

* feat(testsPublishResults): collect cobertura of UI5 projects by default
2019-11-05 15:33:18 +01:00
Daniel Kurzynski
462c293c9c User piper docker images (#920) 2019-10-25 17:49:54 +02:00
Stengel
fdf2d97f9a Merge remote-tracking branch 'upstream/master' into harmonize-docker-arguments 2019-10-24 07:37:13 +02:00
Marcus Holl
8e987c46e1
[refactoring] condence common coding for cf deploy (#895)
* [refactoring] condence common coding for cf deploy

Small change beyond refactoring: for mtaDeploy the user is now quoted.

* more general name: logoutAction -> postDeployAction
2019-10-22 13:53:08 +02:00
Marcus Holl
514755e4ef
Fail early if file which should be uploaded does not exist. (#909)
Right now we fail with some error message from curl.
2019-10-22 12:28:43 +02:00
Shanuson
8cfac8d43f new step cloudFoundryServiceCreate (#892)
# Changes
This PR adds a new step: cloudFoundryServiceCreate

There is a cf community plugin [Create-Service-Push](https://github.com/dawu415/CF-CLI-Create-Service-Push-Plugin) available to apply infrastructure as code  to Cloud Foundry. The plugin uses a manifest.yml to create services in a targeted CF space. 

The proposed step provides an interface to this plugin. 

Already done:
- [x] Tests
- [x] Documentation

Further actions:
- a Refactoring: Move varOptions and varsFileOption code into a class and make us of this here and in cloudFoundryDeploy step. -> Is it ok to use the CfManifestUtils, or add it as a new class to variablesubstitiion package? 
- enhance the s4sdk cf cli docker image to include the plugin.
2019-10-22 11:15:03 +02:00
Marcus Holl
8b26406fc7
Provide additional opts for cf deploy (#872)
* Provide additional opts for cf deploy

Inside cloudFoundyDeploy we use these cf commands

 o login
 o plugins
 o blue-green-deploy
 o push
 o deploy
 o bg-deploy
 o stop
 o logout

 o logout and stop does not provide any options
 o plugins provides options (--checksum --outdated) but it is unlikely that
   these options can be used in a reasonable way during the deploy process.
 o login now uses `loginOpts`
 o The other commands uses now `deployOpts`

* provide additional opts also for cf api calls

* Provide more log when verbose

* re-use mtaDeployParameters and adjust names of other params (api, login) accordingly

* Streamline naming

* distinuish between cfNative and mta deploy params

* Add cfNativeDeployParam default

* login and api paramters are not under cloudFoundry
2019-10-02 13:28:54 +02:00
Marcus Holl
facebdbdbb
Provide the logs for cf deploy (#865)
* Provide the logs for cf deployx

* Surround cf trace output by comments so that it can be easily retrieved

* Tests
2019-09-27 16:10:43 +02:00
Marcus Holl
149cd96dbf Back commonPipelineEnvironment step by shared class 2019-09-27 13:54:58 +02:00
Marcus Holl
e418c15b6e
Revert "Back commonPipelineEnvironment step by shared class (#821)" (#885)
This reverts commit eb57c8df7b.
2019-09-26 14:18:18 +02:00
Marcus Holl
eb57c8df7b
Back commonPipelineEnvironment step by shared class (#821)
* Back commonPipelineEnvironment step by shared class

Each pipeline step comes with its own instance of a commonPipelineEnvironment.
Properties stored on one instance was not shared with the other instances.

Now we strip down the commonPipelineEnvironment step and forward basically
everything to a shared singleton instance.

With that approach all instances of commonPipelineEnvironment shares the
same data and can now be really used for information exchange between the steps.
Before that change only the commonPipelineEnvironment instance associated with
the pipeline script itself could be used for that purpose.

* Remove unneeded commented line
2019-09-26 12:23:36 +02:00
TheFonz2017
6dabdff8d5 Added (optional) Variable Substitution to CloudFoundryDeploy Step (#866) 2019-09-24 08:49:25 +02:00
Shanuson
05301eaf16 Refactoring Only PR for cloudFoundryDeployStep (#881) 2019-09-20 09:57:28 +02:00
Sven Merk
fce8098f98 Avoid full merge trace being added to culprits 2019-09-16 10:02:21 +02:00
Florian Geckeler
565ac99742 Handle sidecar parameters in dockerExecuteOnKubernetes (#869) 2019-09-12 10:52:05 +02:00
Marcus Holl
e54f18e6bc
Introduce xsDeploy step (#749)
Introduce xs deploy
2019-09-11 13:42:38 +02:00
TheFonz2017
41dcebb3a5 Variable Substitution in YAML Files (#852)
* Changes:
- New YamlSubstituteVariables step to substitute variables in YAML files with values from another YAML
- New Tests, that check the different substitution patterns.
- Added test resources, including various manifest and variables files.
- Improved usage of JenkinsLoggingRule
- Improved JenkinsReadYamlRule to properly reflect the mocked library's behaviour.
- Added a new JenkinsWriteYamlRule.

* Changes:
- added a Logger that checks a config.verbose flag before it logs debug messages.
- changed error handling to rethrow Yaml parsing exception in case of wrongly-formatted Yaml files.
- changed JenkinsWriteYamlRule to capture Yaml file details of every invocation of writeYaml. This allows sanity checks at end of tests, even if there were multiple invocations.
- adjusted tests.

* Changes:
- Removed javadoc-code blocks from API documentation since they are not supported.
- Removed skipDeletion boolean.
- Added a new deleteFile script which deletes a file if present.
- Added a new JenkinsDeleteFileRule to mock deleteFile script and optionally skip deletion for tests.
- Adjusted yamlSubstituteVariables script.
- Adjusted tests to include new JenkinsDeleteFileRule.
- Changed code that deletes an already existing output file to produce better logs.

* Changes:
- Turned yamlSubstituteVariables into a script that works purely based on Yaml data (not files).
- Added a new cfManifestSubstituteVariables that uses yamlSubstituteVariables under the hood but works based on files.
- Adjusted tests, and added new ones.

* Adjusted documentation and a few log statements.

* Changed documentation to no longer include javadoc code statements.

* Made mocking of deletion of a file a default. Adjusted tests.

* Changed signature of yamlSubstituteVariables' call method to return void.

* Changes:
- Fixed naming issues in deleteFile.
- Renamed Logger to DebugHelper.
- Fixed some documentation.

* Changed implementation of deleteFile not to use java.io.File - which is evil when using it for file operations.

* PROPERLY Changed implementation of deleteFile not to use java.io.File - which is evil when using it for file operations.

* Changes:
- Added tests for deleteFile script
- Changed JenkinsFileExistsRule to also keep track of which files have been queried for existence.

* Changes:
- Removed java.io.File usage from cfManifestSubstituteVariables and using fileExists instead now.
- Adjusted tests.

* Wrapped file path inside ticks to allow spaces in file path when calling deleteFile.

* Removed null checks of mandatory parameters, and resorted to ConfigurationHelper.withMandatoryProperty

* Fixed a NullPointer due to weird Jenkins / Groovy behaviour.

* Changes:
- Turned yamlSubstituteVariables step into a utils class.
- Added tests
- Adjusted cfManifestSubstituteVariables to use utils class instead of step.
- Adjusted tests
- Adjusted APIs of DebugHelper.

* Re-introduced log statement that shows what variables are being replaced and with what.

* Changing API of YamlUtils to take the script and config as input.

* Test

* Test

* Test

* Test

* Test

* Fixing issue.

* Fixing issue.

* Changes:
- Refactored DebugHelper and YamlUtils to make usage nicer and rely on dependency injection.
- Removed Field for DebugHelper and turned it into local variable.
- Adjusted classes using the above.
- Adjusted tests where necessary.

* Added link to CF standards to YamlUtils also.

* Add docu for step cfManifestSubstituteVariables.md

* Added documentation.

* Added missing script parameter to documentation. Some steps document it, some don't. Right now you need it, so we document it.

* Fixed some layouting and typos

* Beautified exception listing.

* Removed trailing whitespaces to make code climate checks pass.

* Trying to get documentation generated, with all the exceptions to markup one should not use.

* cosmetics.

* cosmetics, part 2

* Code climate changes...

* Inlined deleteFile step.

* Added two more tests to properly check file deletion and output handling.

* Changes:
- adjusted API to take a list of variables files, as does 'cf push --vars-file'
- adjusted API to allow for an optional list of variable key-value-maps as does 'cf push --vars'
- reproduced conflict resolution and overriding behavior of variables files and vars lists
- adjusted tests and documentation

* Added missing paramter to doc comment.

* Re-checked docs for missing paramters or params that have no counterpart in the method signature.

* Adjusted documentation.

* Removed absolute path usage from documentation.

* corrected documentation.

* Changed javadoc comment to plain comment.

* Turned all comments to plain comments.
2019-09-06 10:20:35 +02:00
Marcus Holl
8c966e41c4
more precise param handover (gitUrl) in piperPipelineStageInit (#848)
Before: complete scmInfo was handed over via method signature.

After: Only the relevant part (GIT_URL from scmInfo) is handed over.

All the other properties from scmInfo are not used in the method body.
With this appraoch it is more obvious what is used inside the method.
2019-08-20 09:08:42 +02:00
Florian Geckeler
f69eac6f5f Pass configured env vars to docker execution in existing container (#851) 2019-08-16 17:05:18 +02:00
Oliver Nocon
fa3b6b68db
githubPublishRelease - add templating capabilities (#849)
add templating capabilities for the header in the release information
2019-08-15 15:26:08 +02:00
Oliver Nocon
023f35c0a8
dockerExecuteOnKubernetes - add stashBack configuration (#808)
* dockerExecuteOnKubernetes - add stashBack configuration

For certain cases it is valuable to only bring back some of the files from an execution inside a container back to the workspace.
This is now added.

Closes #753

* refactor according to PR review
2019-08-14 16:44:12 +02:00
Christopher Fenner
f3f4c741be
sonarExecuteScan: add custom certificate support (#819)
* feat(sonar): load TLS certificates

* allow verbose property

* handle whitespaces

* cleanup

* disable default verbosity on wget

* correct test file name

* add test case for custom certificates

* import StandardCharsets

* change cleanup

* correct pull-request provider name

* correct pull-request provider name

* correct pull-request provider name
2019-08-11 22:42:34 +02:00
Marcus Holl
f0a3dd9a39 Remove inappropriate package statement and inappr. shebang (#823) 2019-08-08 23:50:25 +02:00
Marcus Holl
9962060254 ConfigurationLoader, ConfigurationHelper working without script reference 2019-08-08 16:14:29 +02:00
Marcus Holl
063a1dc3fc Back commonPipelineEnvironment step by shared class
Each pipeline step comes with its own instance of a commonPipelineEnvironment.
Properties stored on one instance was not shared with the other instances.

Now we strip down the commonPipelineEnvironment step and forward basically
everything to a shared singleton instance.

With that approach all instances of commonPipelineEnvironment shares the
same data and can now be really used for information exchange between the steps.
Before that change only the commonPipelineEnvironment instance associated with
the pipeline script itself could be used for that purpose.
2019-08-08 15:19:25 +02:00
Marcus Holl
77a8c54084
Remove stdout from unit test (#787)
in the majority of the cases there is nobody for reading stdout.
2019-08-06 14:21:57 +02:00
Marcus Holl
0c90da6638
Simplify code: failExecution can be replaced by closure raising exception (#795) 2019-08-06 13:12:59 +02:00
Marcus Holl
e954e3b629 unified behaviour for shell call rule (#794)
* Ensure closure gets called when neither returnStdout nor returnStatus are set

In this case we do not have a return value, but in case we execute a closure we should execute the closure.
With that it is possible to raise an exception from the closure.

* [refactoring] unify usage of unify method call

* Remove dead code.
Coding after uncondition throw exception statement does not get executed.

* Ensure script rule behaves the same whan called with string and with map.
2019-08-02 17:05:49 +02:00
Oliver Feldmann
af5c16ef46
setupCommonPipelineEnvironment: support yaml config file ending (#811)
* Allow for yaml file ending

* Format code
2019-07-31 12:22:26 +02:00
Oliver Nocon
0c3e5f1ea9
use new unstable step to better visualize pipeline errors (#804)
With https://jenkins.io/blog/2019/07/05/jenkins-pipeline-stage-result-visualization-improvements/ it has been made possible to allow for a better visualization in case certain pipeline stages are 'UNSTABLE'

This is about using the new feature if available with a fall-back to old behavior.
2019-07-26 17:40:22 +02:00
Oliver Nocon
153dbf2a7f
githubPublishRelease - ensure proper JSON encoding (#807)
So far some special characters have not been properly encoded when creating a release.
This is addressed by using a new JsonUtils method now.
2019-07-26 14:03:20 +02:00
Roland Stengel
db8f9d0f07 harmonize docker configuration properties
fixes
2019-07-25 12:12:34 +02:00
Roland Stengel
01ce797245 harmonize docker configuration properties
support the configuration of the docker arguments

  dockerEnvVars
  dockerOptions
  dockerWorkspace

for all steps.
2019-07-25 11:57:21 +02:00
Sven Merk
b1b480a7e1
Merge branch 'master' into whitesourceExecuteScan 2019-07-19 14:28:26 +02:00