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

1258 Commits

Author SHA1 Message Date
Marcus Holl
123ce3a603 Merge remote-tracking branch 'github/master' into HEAD 2018-09-21 11:20:14 +02:00
Marcus Holl
154750d98d
Merge pull request #301 from marcusholl/pr/noStashUnstashOutputWrittenByTests
Remove output to stdout from tests
2018-09-21 11:18:39 +02:00
Marcus Holl
42188d3a4f Merge remote-tracking branch 'github/master' into HEAD 2018-09-21 11:13:07 +02:00
Marcus Holl
5b28c787ab
Merge pull request #304 from marcusholl/pr/fixMissingGettersAndSetters
Revert "Remove explict getters and setters from common pipeline envir…
2018-09-21 10:18:15 +02:00
Marcus Holl
341cb97c25 Revert "Remove explict getters and setters from common pipeline environment"
This reverts commit d22af0f9d4.
2018-09-21 09:24:47 +02:00
Oliver Nocon
518a08bdb4
Update CONTRIBUTING.md 2018-09-19 09:25:40 +02:00
Marcus Holl
23af245ad9
Merge pull request #302 from marcusholl/pr/noExplictGetterAnDSettersInCommonPipelineEnvironment
Remove explict getters and setters from common pipeline environment
2018-09-19 09:13:21 +02:00
Marcus Holl
141210beb2 Expose backendType for uploading files into transports 2018-09-18 15:56:35 +02:00
Marcus Holl
8ed864b87f Merge commit 'cfd25198b04e9eae19139dcf429518667863f423' into HEAD 2018-09-18 14:57:36 +02:00
Marcus Holl
e40e3eb72f Introduce backendType in ChangeManagement util internally
without affecting method signatures.
2018-09-18 14:54:40 +02:00
Marcus Holl
cfd25198b0 transportRequestUploadFile step 2018-09-18 14:49:06 +02:00
Marcus Holl
80572f8569 Backend type in default configuration. 2018-09-18 14:48:47 +02:00
Marcus Holl
82a9a8e824 Enum for the backend types 2018-09-18 14:48:06 +02:00
Marcus Holl
d22af0f9d4 Remove explict getters and setters from common pipeline environment
We get getters and setters generated automatically.
2018-09-17 16:51:13 +02:00
Marcus Holl
726fbe36ab Limit usage of ConfigurationHelper to the builder pattern
it is the duty of the configuration helper to build a map
providing the configuration. Having facilites to use the
ConfigurationHelper as some kind of configuration registry
makes life more complicated.
2018-09-17 12:56:18 +02:00
Marcus Holl
657ccf7d91
Merge pull request #294 from marcusholl/pr/premoveDeclarationsOfPrepareObjectInterceptors
Remove not (really) needed declarations of prepareObjectInterceptors
2018-09-14 10:36:42 +02:00
thorstenwillenbacher
1420c8a5bd
Merge branch 'master' into pr/premoveDeclarationsOfPrepareObjectInterceptors 2018-09-14 10:12:26 +02:00
Marcus Holl
c1900f6ecd Remove output to stdout from tests
In fact nobody reads it, but on some IDEs it is shown when tests are executed.
2018-09-14 09:08:52 +02:00
Marcus Holl
dc9ce9a732 Remove generic gitUtils from BasePiperTest
there is only one test class making use of it left. This test class is the
GitUtilsTest itself.

Hence moving this member downwards in the test class hierarchy into GitUtilsTest.

I doubt it makes sense to make use of a generic git utils mock somewhere else since this basically
means to test the GitUtils class in the conxtext of other examinees. For that there is no need.
The GitUtils class should be tested by the corresponding test class, but not in a transive manner
by other tests. For all other tests a specific git utils mock should be provided mocking the corresponding
method class. This is already the case today, otherwise we would have more test classes making use
of the generic git utils mock.
2018-09-13 16:01:35 +02:00
Marcus Holl
3c5f3ee2f5 Merge remote-tracking branch 'github/master' into pr/cleanWorktreeCheck 2018-09-13 15:00:36 +02:00
Marcus Holl
85376d951f remove inside work tree check
since this is implicitly checked by isWorkTreeDirty.
2018-09-13 14:34:26 +02:00
Marcus Holl
63cf375398 Pipeline steps are expected not to return a return value 2018-09-13 11:24:04 +02:00
Marcus Holl
2d29555811 Fix not working link to contribution guidelines 2018-09-13 11:09:24 +02:00
Marcus Holl
7f171429bc
Merge pull request #290 from marcusholl/pr/execClosureFromShellCallRule
Execute closures when evaluating shell calls
2018-09-12 11:19:47 +02:00
Marcus Holl
8afec9b4dc Merge remote-tracking branch 'github/master' into HEAD 2018-09-12 11:14:03 +02:00
Marcus Holl
d919335b06
Merge pull request #293 from marcusholl/pr/removeMockHelper
Remove obsolete code: mockHelper
2018-09-12 11:12:57 +02:00
Marcus Holl
9c4652ddab Merge remote-tracking branch 'github/master' into HEAD 2018-09-12 11:02:31 +02:00
Marcus Holl
d31e0e73cb Remove not (really) needed declarations of prepareObjectInterceptors
- In ArtifactSetVersionTest the method was declared,
    but not used at all.
  - In MtaUtilsTest there was a particular Object created
    for the sole purpose of serving as script.
    For that we have the nullScript.
  - In DockerArtifactVersioningTest 'this' was configured to
    serve as script. There is basically no reason why the
    instance of the JUnitTest should serve as script.
    Instead we have the nullScript for that purpose.
2018-09-10 16:52:44 +02:00
Marcus Holl
59d831d735
Merge pull request #285 from marcusholl/pr/removeMergeMethodFromConfigMerger
Remove not needed merge method from ConfigurationMerger
2018-09-10 16:24:37 +02:00
Christopher Fenner
bb98ba71f3
Merge branch 'master' into pr/removeMergeMethodFromConfigMerger 2018-09-10 15:02:58 +02:00
Sven Merk
61de848114
Merge branch 'master' into pr/removeMockHelper 2018-09-10 14:03:07 +02:00
Marcus Holl
308c4c772e
Merge pull request #291 from marcusholl/pr/mockGitUtilsForArtifactSetVersionTests
mock GitUtils
2018-09-10 13:59:41 +02:00
Marcus Holl
aedfb13a6b Merge remote-tracking branch 'github/master' into HEAD 2018-09-10 13:52:22 +02:00
Marcus Holl
9e378d6b46 Remove obsolete code: mockHelper
in fact the MockHelper seems not to be used anymore. Apparently fully
superseded by our JenkinsRules.
2018-09-10 13:44:42 +02:00
Christopher Fenner
d07b64f477
Merge branch 'master' into pr/removeMergeMethodFromConfigMerger 2018-09-10 13:32:01 +02:00
Christopher Fenner
bce7f370de
Merge branch 'master' into pr/cleanWorktreeCheck 2018-09-10 13:28:57 +02:00
Marcus Holl
c0c0adbeda Prune useless code from MTABuild test. (#288)
should have been removed earlier with the other pull request removing writing the test files.
This is pure leftover.
2018-09-10 13:28:11 +02:00
Marcus Holl
55a952522b ConfigurationHelper: replace all occurences of GString by java.lang.String
GStrings might be handed over e.g. via signature to steps.

GStrings in configuration makes it harder to deal with configurations.
E.g.
   ```if(param == 'a' || param == 'b')``` returns true if a is a GString representing 'a'
but
   ```if(param in ['a', 'b'])``` returns false.

It would be possible not to use the ```in``` notation in our code. But this
increases readability.

GString are not significant and can be replaced by the corresponding java.lang.String
representation without loss of information. Hence it is justified IMO to ensure
there are no GStrings contained in the configuration map.
2018-09-10 10:10:19 +02:00
Marcus Holl
68ab5bacd6 mock GitUtils
if we don't mock the GitUtils here changes inside GitUtils affecting the git commands
issued at the command line requires changes here. In fact we have to react on
implementation details of the GitUtils here. It is better to be independent from that
implementation details here since this leads to more focused and smaller commits.
2018-09-07 16:14:00 +02:00
Marcus Holl
cce1eb0f9a Execute closures when evaluating shell calls
This allows us to e.g. also throw exceptions (e.g. hudson.AbortException) when dealing with
mocked shell calls.
2018-09-07 15:27:55 +02:00
Marcus Holl
23c838d6f1 [refactoring] artifact set version: check for clean worktree 2018-09-07 12:38:14 +02:00
Marcus Holl
0dd74fe684 GitUtils: provide method for checking worktree is clean. 2018-09-07 12:38:14 +02:00
Marcus Holl
8db2aaf5f0 don't use load step defaults as implicit factory method. 2018-09-07 10:08:16 +02:00
Marcus Holl
5f66113c37 no script in method signatures. 2018-09-06 16:45:30 +02:00
Marcus Holl
2b95be12aa Ensure proper initialization of ConfigurationHelper
Up to now we had two constructors, one with a Script and the other one with a map holding some defaults.
In case the constructor with the map was called the step name was uninitialized
2018-09-06 16:21:38 +02:00
Marcus Holl
bc7b1e0890
Merge pull request #284 from marcusholl/pr/artifactSetVersionStreamlineGitHandling
Do only what is really needed inside the body of sshAgent
2018-09-06 12:46:54 +02:00
Marcus Holl
685756f09d Invoke method 'use' before returning configuration values
In order to ensure all actions applied by 'use()' are also
applied before returning a single configuration values.

Possible optimization: introduce a flag indicating that 'use' has
been called (not implemented for now).
2018-09-06 12:17:57 +02:00
Marcus Holl
b65eca35b2 MapUtils: Provide method for traversing of nested maps. 2018-09-06 12:17:55 +02:00
Marcus Holl
c5cce5a3a3 Remove not needed merge method from ConfigurationMerger
The other merge method called in the body of that method here does not exist.
So any call to this method would end up in some method not found exception or similar.
2018-09-06 09:25:53 +02:00
Christopher Fenner
7b49858233
Merge branch 'master' into pr/artifactSetVersionStreamlineGitHandling 2018-09-05 11:46:11 +02:00