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

499 Commits

Author SHA1 Message Date
Roland Stengel
4851ba94bf drop NEO version verification - remove neo version check 2018-07-18 09:46:11 +02:00
Roland Stengel
38360f1d0c drop NEO version verification - introduce getVersion 2018-07-17 20:56:31 +02:00
Marcus Holl
9b4d55d0d9 switch to nested configuration for change management related steps 2018-07-17 16:41:42 +02:00
Marcus Holl
1e23a9ba3e Merge remote-tracking branch 'mholl/pr/readNestedProperties' into HEAD 2018-07-17 11:22:23 +02:00
Marcus Holl
4b2ee0d4ad [fix] Excpetion message contains config key instead of value. 2018-07-17 10:08:47 +02:00
Marcus Holl
4f8f7be6aa Access to nested properties
yaml configuration supports nested properties. With this change
we can read those nested properties.
2018-07-16 17:26:22 +02:00
Marcus Holl
83e757475a Merge remote-tracking branch 'github/master' into HEAD 2018-07-16 12:09:49 +02:00
Marcus Holl
b72cb656d5 Merge remote-tracking branch 'github/master' into HEAD 2018-07-16 11:15:22 +02:00
Marcus Holl
7482b58dc2 UploadFileToTransport: Read transportRequestId from commit history 2018-07-16 10:28:59 +02:00
Marcus Holl
bb0e9b92ce transport request upload file: decouple tests. 2018-07-13 16:09:51 +02:00
Marcus Holl
0337b34cef [whitespace only] increase readability 2018-07-13 14:40:54 +02:00
Marcus Holl
254a4e2017 Remove unused sh registerAllowedMethod
registerAllowedMethod for sh call not used anymore since we mock the ChangeManagement utils class.
The sh calls was triggered from the utils class. Since we mock that class, there is no sh call
anymore.
2018-07-13 13:23:10 +02:00
Marcus Holl
63b0fd6f67 Merge remote-tracking branch 'github/master' into HEAD 2018-07-13 10:30:29 +02:00
Marcus Holl
b73df0f682 ReleaseTransportRequest: Read transportRequestId from commit history 2018-07-12 16:00:27 +02:00
Marcus Holl
8d60a81ec5 Read transportId from commit history: split getChangeID method 2018-07-12 14:17:33 +02:00
Marcus Holl
c9572d187b Merge remote-tracking branch 'github/master' into HEAD 2018-07-12 13:23:00 +02:00
Marcus Holl
52052cc99d
Merge pull request #196 from marcusholl/transportRequestCreateChangeDocumentIdFromCommitHistory
transportRequestCreate: retrieve changeDocumentId from commit history
2018-07-12 13:14:34 +02:00
Marcus Holl
3cb8912456
Merge pull request #180 from marcusholl/pr/supportCmClientOptsUploadFileToTransport
Support CM clientOpts for uploadFileToTransport
2018-07-12 10:16:07 +02:00
Marcus Holl
52bb1e842d Validate required parameters via config helper
- In case a parameter is missing we do not thrown and AbortException
    anmore, but an IllegalArgumentExcpetion, since that exception is
    thrown by the configuration helper. The difference is: AbortExceptions
    are contained in the log without stacktrace, other exceptions are
    printed with stack trace.
  - Exception messages are changed to the standard error message triggered
    inside the configuration helper. In case the changeDocumentId is
    retrieved also from the commit history we keep an exception message
    pointing to that.
  - Having references to the parameters is droped. Instead the parameters
    are directly used from the configuration map.
  - in case of long signatures line breaks are inserted in order to
    simplify reading the code.
2018-07-12 09:34:06 +02:00
Christopher Fenner
1423522e2f
Merge pull request #201 from marcusholl/pr/fixQuotationMark
[fix] misplaced quotation mark in assertion message
2018-07-12 09:21:30 +02:00
rodibrin
4cb5ba5f3f
Merge pull request #194 from rodibrin/pr/newmanexecutetest
adapt the NewmanExecuteTest to windows file system
2018-07-12 08:56:28 +02:00
Marcus Holl
c1927da33f [fix] misplaced quotation mark in assertion message 2018-07-12 08:12:32 +02:00
Marcus Holl
239e8cc054
Merge pull request #199 from marcusholl/pr/supportAssertOfLogMessageInCaseOfFailures
Support check for log messages in case of exceptions in code under test
2018-07-11 12:29:21 +02:00
Christopher Fenner
aa865f145f
Merge pull request #172 from SAP/CCFenner/mtaVersioning
add versioning for MTAs
2018-07-11 11:53:20 +02:00
Marcus Holl
111802cfd2 Support check for log messages in case of exceptions in code under test
With the current approach of checking log entries we are not able to
check log entries in case of a failure. But is is important to assert
log messages in case of a failure. Having reasonable log messages
simplified troubleshooting.

Hence we add JenkinsLoggingRule.expect(substring) and check after the
base of that rule has been called.

This interfears with other rules also working with an expect approach,
like e.g. ExpectedException. Which violation is presented depends on
the order or the rules around the test case.
2018-07-10 17:34:58 +02:00
Marcus Holl
cada0e7882 transportRequestCreate: retrieve changeDocumentId from commit history 2018-07-10 16:41:43 +02:00
Marcus Holl
a7ea15ac58 transportRequestUploadFile: retrieveChangeDocumentId from commit history 2018-07-10 16:40:26 +02:00
Marcus Holl
4a9c0695ca transportRequestRelease: get changeDocumentId from commit history 2018-07-10 16:34:42 +02:00
Roland Stengel
81c0110740 adapt the NewmanExecuteTest to windows file system 2018-07-10 13:10:16 +02:00
Marcus Holl
5e09e2fb88 No forwarding of config map in to ChangeManagement class. 2018-07-10 12:30:31 +02:00
Marcus Holl
bb2ed27c10 Switch from gitLabel to gitChangeDocumentLabel
since we will have two labels in future. One for scanning changeDocumentIds and
another one for scanning transportRequestIds
2018-07-10 11:15:09 +02:00
Marcus Holl
71ca78e0a9 Switch from git_xxx to gitXxx like properties 2018-07-10 11:14:43 +02:00
Marcus Holl
74b6ac0c8e Support cmclient_opts in transportRequestCreate 2018-07-09 15:41:13 +02:00
Marcus Holl
d8d2249862 Support cmclientOpts for uploadFileToTransport 2018-07-09 09:40:07 +02:00
Marcus Holl
6829319ca5 Remove wrong package declaration and stange grovvy shebang
o we are in the default package, hence package 'steps' is inappropriate
o there is also no grovvy shebang in other test files, why should it be here?
2018-07-06 13:37:20 +02:00
Marcus Holl
44cee0475d
Merge pull request #176 from marcusholl/pr/decoupleTests
Pr/decouple tests
2018-07-06 13:09:44 +02:00
Marcus Holl
cf09b45025
Merge pull request #161 from marcusholl/marcusholl/pr/landscapeConfigLayer
Provide configuration layer for custom configuration
2018-07-06 12:47:52 +02:00
Christopher Fenner
96b2880ea0
Merge pull request #186 from SAP/CCFenner/newmanExecute
add step for Newman test execution
2018-07-06 10:27:55 +02:00
Marcus Holl
20612c726f Add tests asserting log messages 2018-07-04 11:56:53 +02:00
Marcus Holl
99c6012f4a
Merge pull request #177 from marcusholl/pr/customMessageForWithMandatoryParameter
withMandatoryParameter supports a error message from the caller
2018-07-04 11:42:52 +02:00
Christopher Fenner
cd891acc97
remove println 2018-07-04 11:13:41 +02:00
Marcus Holl
22b6dd63f6 Merge custom defaults with library defaults. 2018-07-03 17:01:22 +02:00
Marcus Holl
c29fb02dd9 wip 2018-07-03 17:01:22 +02:00
Christopher Fenner
232705f58c
add tests 2018-07-03 14:39:20 +02:00
Christopher Fenner
12cf07a73d
align used node images 2018-07-03 14:22:22 +02:00
Roland Stengel
b00a8c203a restore tracked methods on afterTestMethod 2018-07-02 14:03:41 +02:00
Marcus Holl
aa900d7dcf withMandatoryParameter supports a error message from the caller 2018-06-29 11:15:37 +02:00
Marcus Holl
d270a2d232 Decouple tests: transport request upload file 2018-06-29 10:53:47 +02:00
Marcus Holl
5a73af4c02 Decouple tests: transport request create 2018-06-29 10:15:20 +02:00
Alejandra Ferreiro Vidal
cc9332ae79
Merge pull request #175 from alejandraferreirovidal/changeParameters
change credentialsId and endpoint
2018-06-29 10:12:58 +02:00
Marcus Holl
3766bf4794
Merge pull request #166 from marcusholl/cm
isChangeInDevelopment
2018-06-29 08:25:15 +02:00
Marcus Holl
1a815c32cd
Merge pull request #165 from marcusholl/pr/scriptCallRuleWithRegex
Return a return value based on a regex comparism
2018-06-29 08:24:37 +02:00
Alejandra Ferreiro Vidal
ab8a1bb837 change credentialsId and endpoint 2018-06-28 16:24:14 +02:00
Marcus Holl
1493393805 Improve log message in case a call to cmclient for getting change status fails. 2018-06-28 15:37:14 +02:00
Marcus Holl
bdef708522 Assert logging 2018-06-28 15:37:14 +02:00
Marcus Holl
6d943d2005 Support CMCLIENT_OPTS
needed e.g. for providing a trust store.
2018-06-28 15:37:13 +02:00
Marcus Holl
5d0ffa3e69 Make use of unified cmCommandLine 2018-06-28 15:37:13 +02:00
Marcus Holl
38c6d35adb Introde getCMCommandLine 2018-06-28 15:37:13 +02:00
Marcus Holl
9d0eb79d94 filter null values from changeId array. 2018-06-28 15:37:13 +02:00
Marcus Holl
c494e33c1d Tests for isChangeInDevelopment 2018-06-28 15:37:13 +02:00
Marcus Holl
37ba20d060 more tests 2018-06-28 15:37:13 +02:00
Marcus Holl
00304d67db [refactoring] getting the gitUtils mock 2018-06-28 15:37:12 +02:00
Marcus Holl
cdb26e6b91 Introduce test for pipeline step checkChangeInDevelopment 2018-06-28 15:37:12 +02:00
Marcus Holl
9adad5ba37 Get changeDocumentId from git commits. 2018-06-28 15:37:12 +02:00
Marcus Holl
d8dca885bb Change parameter name 'changeId' to 'changeDocumentId'
the official term in SAP-SolutionManager is 'change document'.

The term 'change' as reflected in 'changeId' is ambigous and could also be understand in the
sense of a change in a revision control system.

Choosing appropriate terms for parameters here deceases the amount of documentation
required for explaining what is really denoted by the parameter.
2018-06-28 13:46:00 +02:00
Marcus Holl
dd456f0d00 Return a return value based on a regex comparism
Comparism on plain string level gets complicated for complex commands and means
an implict check for an exact version of a command line. There are cases where
such an exact check is not desired, e.g. there is nothing wrong with having the
order of arguments variable.
2018-06-28 13:38:48 +02:00
Christopher Fenner
cd10eed0c3
fix test issue on Windows 2018-06-27 14:56:50 +02:00
Christopher Fenner
44ff690a77
fix test issue on Windows 2018-06-27 14:38:57 +02:00
Christopher Fenner
70f7e5a6fa
fix test issue on Windows 2018-06-27 14:28:16 +02:00
Christopher Fenner
251f731ca8
fix test issue on Windows 2018-06-27 14:19:40 +02:00
Christopher Fenner
a93443ebdf add MTA versioning class 2018-06-27 11:08:09 +02:00
Marcus Holl
95520331e1
Merge pull request #168 from SAP/CCFenner/snykExecute
add step for snyk open source vulnerability scan
2018-06-27 10:11:34 +02:00
Christopher Fenner
bc84497b24
remove obsolete parameter 2018-06-27 09:59:44 +02:00
Christopher Fenner
267f5f6936
use default image / workspace 2018-06-27 09:52:32 +02:00
Christopher Fenner
f9d4fbda53
correct step name 2018-06-26 15:34:32 +02:00
Christopher Fenner
426f23b232
add step tests 2018-06-26 15:08:46 +02:00
Alejandra Ferreiro Vidal
4464c9427b add step transportRequestRelease 2018-06-26 10:40:08 +02:00
Alejandra Ferreiro Vidal
12652be421 add step transportRequestUploadFile 2018-06-26 10:40:07 +02:00
Alejandra Ferreiro Vidal
e34f99deac add step transportRequestCreate 2018-06-26 10:40:06 +02:00
Christopher Fenner
e51b82e0ea
fix imports 2018-06-25 22:49:34 +02:00
Christopher Fenner
b891b36fbf
add further test case 2018-06-25 22:45:43 +02:00
Christopher Fenner
1c924cc8df
add test for MtaMultiplexer 2018-06-25 14:53:28 +02:00
Christopher Fenner
257308298d extract map merging to MapUtils (#156)
* Update MapUtils.groovy

* Update ConfigurationMerger.groovy

* tests

* forward skipNull

* Fix indent in tests

* More tests.

* MapUtils simplified wrt deep merge and pruneNulls

* Add test for isMap with null value
2018-06-20 10:15:36 +02:00
Alejandra Ferreiro Vidal
fbefcfeffd include special characters in mta.jar file namex 2018-06-12 19:12:08 +02:00
Marcus Holl
3499d4843c GitUtils: Extract lines matching a pattern from a set of commits
In preparation of SOLMAN features. Here we need to get a change
document ID out of the commit message.

Start and end commit can be provided as well as a log format
and a filter condition.
2018-06-11 09:53:26 +02:00
Marcus Holl
599e8dedbc
Merge pull request #149 from marcusholl/pr/improveShellCallRuleReturnValues
fix: apply same script transformation when registering script and whe…
2018-06-11 09:49:52 +02:00
Marcus Holl
dd36e6ea5b
Merge pull request #152 from marcusholl/pr/neoDeployTestMoreTolerantWrtArgOrder
Make neo command line tests more tolerant wrt to order of args
2018-06-11 09:49:08 +02:00
Marcus Holl
3ae2d0ae47
Merge pull request #150 from marcusholl/pr/insideWorkingTree
git utils: is inside working tree
2018-06-11 09:46:51 +02:00
Daniel Kurzynski
322a437763 Revert "Merge branch 'master' of https://github.com/SAP/jenkins-library"
This reverts commit 65220efb4e, reversing
changes made to cf17510641.
2018-06-08 11:55:38 +02:00
Ramachandra Kamath Arbettu
d78dc454fb Support K8S execution 2018-06-07 13:58:32 +02:00
Florian Wilhelm
6dc13801b0
Disable download logs in Maven by default (#159)
Disable download logs in Maven by default

This commit adds a flag to Maven by default, which disables the messages
like "Downloading from central".

The logger is set to level "warn", so errors will still be visible, but
successful messages won't clutter logs anymore.

This option is also set by default in the GitLab CI template file for
maven.

See [1] for reference on the option.

1: https://stackoverflow.com/a/35653426/8843830
2018-06-06 14:42:47 +02:00
Oliver Nocon
f8e5733486 speed up tests
* use new base class for testing
* initialize jenkins unit test framework only once for all test classes
* minor test cleanups
2018-06-06 11:19:19 +02:00
Oliver Nocon
96cc75d72a pipelineStashFiles - cleanup & documentation
This contains some cleanups to the code
plus documentation for the step
2018-06-01 12:33:06 +02:00
Oliver Nocon
e276f58573 fix tests 2018-05-30 12:58:52 +02:00
Thorsten Duda
2e2b43d68b add missing file 2018-05-30 12:39:01 +02:00
Thorsten Duda
fed20184b4 fix maven execute test 2018-05-30 12:30:26 +02:00
Oliver Nocon
9d0e7eaf4e add steps for file stashing 2018-05-30 12:00:13 +02:00
Marcus Holl
4ca3236ba4 general default section mixed in automatically. 2018-05-30 10:53:21 +02:00
Marcus Holl
8f1e3dfa8f Make neo command line tests more tolerant wrt to order of args 2018-05-28 13:34:19 +02:00
Alejandra Ferreiro Vidal
53e5c0fe6b add multiple versions verification tests 2018-05-24 14:12:14 +02:00
Alejandra Ferreiro Vidal
3c59ac4454
Merge pull request #143 from alejandraferreirovidal/compatibilityCode
compatibility code for new feature
2018-05-24 14:03:23 +02:00
Marcus Holl
d7cfddd182 git utils: is inside working tree 2018-05-11 15:19:43 +02:00
Marcus Holl
e8ced708f6 fix: apply same script transformation when registering script and when quering
avoids trouble in case of multi line scripts.
2018-05-11 14:21:22 +02:00
Marcus Holl
e61f16abfb Check if inside git repo via rev-parse --is-inside-work-tree
This approach works also in case we are in a subdirectory of the git repo,
e.g. in the closure of a dir statement.

The decission is delegate to git rather than using internal knowledge
about git file names. Well, the directory will be always named '.git',
but nevertheless ...

May endup in a false positive in case we did not clone a repo AND there
is another git repo somewhere upwards in the file system. Maybe some
other git repo is located upstairs containing e.g. the jenkins setup.
The advantage of working also for subdirectories outweights the disadvantage
for the false positive. It is not likely that we have to deal with another
git repo upstairs, since the pipeline script is expected to be located in
the payload git repo. A phantom repo upstairs looks like a pure academical
discussion.
2018-05-11 10:04:18 +02:00
Daniel Kurzynski
e8fb41aab6 Add configuration support for postActions (#135) 2018-05-07 10:50:21 +02:00
Alejandra Ferreiro Vidal
9892bff907 compatibility code for new feature 2018-05-04 11:52:51 +02:00
Alejandra Ferreiro Vidal
407b71441c improve log 2018-04-26 18:02:17 +02:00
Alejandra Ferreiro Vidal
3bf3b49880 improve message and add test 2018-04-26 17:29:26 +02:00
Alejandra Ferreiro Vidal
e7b84345ae add file name and extension to mtaJarLocation
Adds the file name and extension to the mtaJarLocation to make the SAP
Multitarget Archive Builder jar file configurable.
2018-04-26 16:17:54 +02:00
Alejandra Ferreiro Vidal
a8a9281093
Merge pull request #138 from alejandraferreirovidal/addToolDescriptorTest
add ToolDescriptorTest
2018-04-25 17:45:55 +02:00
Alejandra Ferreiro Vidal
ce8f66bd12 add ToolDescriptorTest 2018-04-24 15:05:17 +02:00
Marcus Holl
afcb8f2c3f
Merge pull request #133 from marcusholl/pr/fixPackageDeclaration
Fix wrong package declaration
2018-04-24 09:57:04 +02:00
Marcus Holl
651a11f5d9
Merge pull request #136 from marcusholl/pr/useGroovyInIncreaseReadability
Pr/use groovy in increase readability
2018-04-24 09:48:11 +02:00
Daniel Kurzynski
540e8c36db
Fix merging if default values do not exist (#130) 2018-04-23 13:41:22 +02:00
Marcus Holl
62fee7a63c [refactoring] increase readability: warAction 2018-04-20 12:25:15 +02:00
Marcus Holl
73abb0ee99 [refactoring] increase readability: vmSize 2018-04-20 12:24:37 +02:00
Marcus Holl
39d23d29fd [refactoring] increase readability: deployMode 2018-04-20 12:23:26 +02:00
Marcus Holl
3e64f4a130 Fix wrong package declaration 2018-04-20 10:59:32 +02:00
Alejandra Ferreiro Vidal
c04bc79976 add extension to mtaBuild 2018-04-17 17:35:10 +02:00
Alejandra Ferreiro Vidal
64b45a13c4 review 2018-04-12 14:25:28 +02:00
Alejandra Ferreiro Vidal
2eafecf38d check tool on PATH 2018-04-10 10:26:55 +02:00
Alejandra Ferreiro Vidal
60d1b007a8 add JavaArchiveDescriptor 2018-04-10 10:26:45 +02:00
Alejandra Ferreiro Vidal
f29734c6da validate JAVA if it is in PATH 2018-04-10 10:20:43 +02:00
Alejandra Ferreiro Vidal
66c60b4f26 validate NEO if it is in the PATH or current dir 2018-04-10 10:20:42 +02:00
Alejandra Ferreiro Vidal
74ee6128b7 validate MTA if it is located in current dir 2018-04-10 10:20:42 +02:00
Alejandra Ferreiro Vidal
6f1e2cd205 add verifyTool to mtaBuild and neoDeploy 2018-04-10 10:20:37 +02:00
Alejandra Ferreiro Vidal
f6834c9a42 change file utils to bash 2018-04-10 10:05:26 +02:00
Alejandra Ferreiro Vidal
a1a6467495 remove outdated code from step toolValidate 2018-04-10 10:05:25 +02:00
Alejandra Ferreiro Vidal
dafd48504e refactor toolValidate step to tool utils 2018-04-10 10:05:12 +02:00
Daniel Kurzynski
b29de61f3c Fix referencing script in setVersion (#128)
In order to use the configuration the script needs to be forwarded to

* Fix reference to script in tests and steps
2018-04-05 11:36:51 +02:00
Christopher Fenner
b08d26f5fd
Merge pull request #4 from SAP/master
get changes from master
2018-04-05 09:06:09 +02:00
Daniel Kurzynski
fe4707faeb
Improve Docker options configuration and forward from mavenExecute (#123) 2018-03-29 14:13:11 +02:00
Ramachandra Kamath Arbettu
aa681dd166 Fix the syntax error in artifactSetVersion step (#127)
* Update artifactSetVersion.groovy
* Fix tests for artifactSetVersion
2018-03-28 21:38:30 +02:00
Marcus Holl
c8fdbcf263
Merge pull request #124 from IKirilova/master
generate mta.yml from package.json and given applicationName
2018-03-23 10:28:45 +01:00
Irina Kirilova
f70ae7f986 rework after code review 2018-03-21 13:07:26 +01:00
Irina Kirilova
29da70fd72 generate mta from package.json and given applicationName 2018-03-15 14:21:27 +01:00
Christopher Fenner
2bd7ffb529
fix tests 2018-03-14 15:58:16 +01:00
Christopher Fenner
3524f3cade
fix tests 2018-03-14 15:55:56 +01:00
Christopher Fenner
3ca1b6ac12
fix tests 2018-03-14 15:53:22 +01:00
Christopher Fenner
84ee9f2e39
fix test case 2018-03-14 15:45:49 +01:00
Christopher Fenner
cb9b8e6360
add tests 2018-03-14 15:44:04 +01:00
Marcus Holl
9529954acd Disable tool validation inside neoDeploy and mtaBuild
We know about two issues:

1.) groovy based file systems checks seems to be executed on Jenkins
    master even if there is a node which is dispatched to a slave.
2.) Environment variable contained in the value of a provided
    variable are not expanded. Example: In case we describe neoHome like
    "$JENKINS_HOME/tools/neo" we do not expand $JENKINS_HOME. Hence the
    file exists check for file '$JENKINS_HOME/tools/neo' fails.
2018-03-08 11:23:56 +01:00
Marcus Holl
840f93208c Merge tag 'mtaMerge2' into HEAD 2018-03-06 17:24:58 +01:00
Marcus Holl
86ab0e04c3 Merge remote-tracking branch 'mholl/pr/javaHomeValidationInsideNeoDeploy' into HEAD 2018-03-06 17:24:31 +01:00
Marcus Holl
690e59f4d2 erge remote-tracking branch 'mholl/pr/javaHomeValidationInsideMtaBuild' into HEAD 2018-03-06 17:16:21 +01:00
Marcus Holl
3cafd0b6d5 Validating mta jar inside mtaBuild 2018-03-06 16:53:14 +01:00
Marcus Holl
3bc53b906f Make test more tolerant 2018-03-06 16:50:03 +01:00
Marcus Holl
b8760201c7 Emit log message in case tool validation is skipped. 2018-03-06 16:44:11 +01:00
Marcus Holl
d93b865f8d java home validation inside mtabuild 2018-03-06 16:44:11 +01:00
Marcus Holl
9c544bb6e0 Make test more tolerant 2018-03-06 16:28:01 +01:00
Marcus Holl
23e6e87b75 Validation of neo toolset inside neoDeploy 2018-03-06 16:12:53 +01:00
Marcus Holl
bc9298738b Make validation of shell calls more tolerant.
Needed in order to deal with new shell calls wrt 'which neo.sh'.
2018-03-06 16:02:49 +01:00
Marcus Holl
1c45b043e5 java home validation inside neoDeploy 2018-03-06 15:37:52 +01:00
Marcus Holl
048e004ca7 Make validation of shell calls more tolerant.
Needed in order to deal with new shell calls wrt 'which neo.sh'.
2018-03-06 15:37:52 +01:00
Florian Wilhelm
f6c71a8484 Use executeMaven step for artifact versioning (#114)
* Execute Maven inside Docker container
* Fix test
2018-03-06 13:28:57 +01:00
Florian Wilhelm
ff46bb0f00 Make commit of new version optional in artifactSetVersion step (#112)
* Make commit of new version optional in `artifactSetVersion` step

You might not want to add a new commit for each version, when versions
are automatically created. This commit makes this feature optional, but
enabled by default to maintain API compatibility.

* Set `gitCommitId` if null

* Improve documentation of `commitVersion` parameter

* Allow to operate in a code checkout without `.git` directory
2018-03-05 09:04:53 +01:00
Florian Wilhelm
f18f11fafe Use UTC time zone for artifact version time stamp (#111)
By using UTC, we avoid potential issues when development happens in
different time zones. Also, daylight saving time does not exist in UTC.
2018-03-02 16:35:35 +01:00
Christopher Fenner
d10b94a166
Update SetupCommonPipelineEnvironmentTest.groovy 2018-03-02 10:57:50 +01:00
Christopher Fenner
e38eda33a7
Update DockerExecuteTest.groovy 2018-03-02 10:55:27 +01:00
Christopher Fenner
83d75e99b7
Update DockerExecuteTest.groovy 2018-03-02 10:54:50 +01:00
Christopher Fenner
76fd77f907
Update ChecksPublishResultsTest.groovy 2018-03-02 10:53:46 +01:00
Christopher Fenner
3ed2d64195
Update ArtifactSetVersionTest.groovy 2018-03-02 10:53:09 +01:00
Christopher Fenner
a54e1a7611
use new rules 2018-02-28 13:12:03 +01:00
Christopher Fenner
158a60aecc
use new rules 2018-02-28 13:11:09 +01:00
Christopher Fenner
4fcc911e6c
use new rules 2018-02-28 11:55:19 +01:00
Christopher Fenner
0ba1a2c594
add JenkinsEnvironmentRule 2018-02-28 11:54:52 +01:00
Christopher Fenner
be26c8dc1e
add JenkinsStepRule 2018-02-28 11:54:39 +01:00
Marcus Holl
efafd9a44a [refactoring] resolve data inside merge (#101) 2018-02-28 11:42:19 +01:00
Christopher Fenner
9d070767fc
remove duplicate class 2018-02-26 09:03:55 +01:00
Alejandra Ferreiro Vidal
e7bf3b1b0f mtaJarLocation as step configuration 2018-02-20 12:02:33 +01:00
Alejandra Ferreiro Vidal
5256494ffa
Merge pull request #88 from marcusholl/pr/useSetsInsteadOfLists
Replace usage of lists for denoting keys by sets.
2018-02-20 11:54:30 +01:00
Marcus Holl
5fe76eb9dc Replace usage of lists for denoting keys by sets.
The characteristics of a list are
  o the order of the entries is significant
  o duplicates are allowed

The characteristics of a set are
  o the order is not significant
  o duplicates are not allowed.

When describing keys for a step the characteristics of a
set applies here, whereas the characteristics of a list does
not apply.
2018-02-19 12:53:08 +01:00
Christopher Fenner
26bbee5fb4
use perfReport step 2018-02-19 10:26:50 +01:00
Alejandra Ferreiro Vidal
c12af7b8d5 add custom configuration test 2018-02-19 09:40:14 +01:00
Alejandra Ferreiro Vidal
ac6cc2aa60
Merge pull request #79 from alejandraferreirovidal/cleanUpNeoDeploymentTest
clean up NeoDeploymentTest
2018-02-19 09:34:15 +01:00
Alejandra Ferreiro Vidal
0510e087b8
Merge pull request #82 from alejandraferreirovidal/addTests
improve tests coverage
2018-02-16 17:26:55 +01:00
Alejandra Ferreiro Vidal
b243ce4e5c improve test coverage 2018-02-16 17:15:41 +01:00
Alejandra Ferreiro Vidal
f156509484
Merge pull request #78 from alejandraferreirovidal/mtaBuildTest
create test files before class - MTABuildTest
2018-02-16 17:09:27 +01:00
Christopher Fenner
98b5590d53
Merge branch 'master' into publishTestResults 2018-02-16 10:32:24 +01:00
Christopher Fenner
be5b5ec9fa
Merge pull request #58 from CCFenner/publishCheckResults
add new step checkResultsPublish
2018-02-16 10:30:59 +01:00
Alejandra Ferreiro Vidal
0703147802 create test files before class 2018-02-14 14:36:50 +01:00
Alejandra Ferreiro Vidal
b813dc4b42 add missing package 2018-02-14 11:32:52 +01:00
Alejandra Ferreiro Vidal
aea1dbfc9f String as String not GString 2018-02-13 16:38:09 +01:00
Alejandra Ferreiro Vidal
0a8d096a5e reduce scope of neoHome tests 2018-02-13 15:00:00 +01:00
Alejandra Ferreiro Vidal
2cb22ebf4d remove duplicate assertion 2018-02-13 14:59:48 +01:00
Alejandra Ferreiro Vidal
691257a458 refactor NEO_HOME 2018-02-13 14:59:19 +01:00
Alejandra Ferreiro Vidal
d36288dabf refactor host and account configuration 2018-02-13 14:59:08 +01:00
Alejandra Ferreiro Vidal
2e3d1ec488 create test files before class 2018-02-13 14:55:57 +01:00
Alejandra Ferreiro Vidal
a9895bab7d simplify workspace path 2018-02-13 14:43:07 +01:00
Alejandra Ferreiro Vidal
724cf64832 create test files before class 2018-02-13 14:32:54 +01:00
Alejandra Ferreiro Vidal
874dddfe33 String as String not GString 2018-02-12 16:00:05 +01:00
Alejandra Ferreiro Vidal
72f65a90bc make script private 2018-02-12 15:59:04 +01:00
Alejandra Ferreiro Vidal
56fe9488ff create test files before class 2018-02-12 15:56:48 +01:00
Alejandra Ferreiro Vidal
df9a3b3c14 improve log 2018-02-12 10:03:35 +01:00
Alejandra Ferreiro Vidal
39f982c598 refactor home to make it more readable 2018-02-12 10:03:35 +01:00
Alejandra Ferreiro Vidal
3ef6f2de80 remove duplicate code 2018-02-12 10:03:21 +01:00
Christopher Fenner
60691dde5b
Merge branch 'master' into publishCheckResults 2018-02-12 08:37:15 +01:00
Alejandra Ferreiro Vidal
5bfb68d24a move utils test classes to com.sap.piper folder
The folder com.sap.piper was created and the corresponding test classes
were not moved. Furthermore, a new UtilsTest class was created when this
test class did already exist, and the same tests were already
implemented, also this new test class uses the lesfurets testing
framework when it is not needed, so this new test class is removed and
the test class that there was before is kept.
2018-02-09 18:08:11 +01:00
Christopher Fenner
3f5d0c74db
use Integer for step invocation 2018-02-09 12:15:26 +01:00
Christopher Fenner
ddf1e609e4
rename step under test 2018-02-08 23:48:49 +01:00
Christopher Fenner
91e0b3294e
rename test script variable name 2018-02-08 16:38:55 +01:00
Christopher Fenner
b443ac0e41 Merge branch 'master' into publishTestResults5 2018-02-08 14:14:07 +01:00
Alejandra Ferreiro Vidal
9dafdd1cc0 mtaBuild with new config framework 2018-02-08 13:26:48 +01:00
Christopher Fenner
c6300f4570 correct handling of parameter maps 2018-02-08 10:50:11 +01:00
Christopher Fenner
ebedbb01e0 add test for default thresholds 2018-02-08 10:43:06 +01:00
Christopher Fenner
be41b71b84
Merge branch 'master' into publishCheckResults 2018-02-08 08:53:04 +01:00
Christopher Fenner
157c9cacfe
Merge pull request #66 from CCFenner/deepConfigMerge
extend config merger to handle deep config structures
2018-02-08 08:50:20 +01:00
Christopher Fenner
3bf3a2a9f5
Update ConfigurationMergerTest.groovy 2018-02-07 22:53:47 +01:00
Oliver Nocon
fbd03a88da
Step for automatic versioning (#65)
It contains:

* versioning step artifactSetVersion
* versioning implementation for Maven & Docker
* enhancements to commonPipelineEnvironment
* extended default configuration
* new utils object for git-related tasks
* automated tests incl. new Rules and resources
* incorporated PR feedback
* step documentation
2018-02-07 13:17:33 +01:00
Christopher Fenner
6300008fe2 adopt tests 2018-02-07 12:01:46 +01:00
Alejandra Ferreiro Vidal
42db55d5a5 remove public when not needed
See: https://github.com/SAP/jenkins-library/blob/master/CONTRIBUTING.md#do-not-use-a-visibility-modifier-for-public-classes-and-methods
2018-02-06 15:57:26 +01:00
Alejandra Ferreiro Vidal
334251ec82 remove curly braces when not needed
See: https://github.com/SAP/jenkins-library/blob/master/CONTRIBUTING.md#do-not-use-curly-braces--for-variables-or-variableproperty
2018-02-06 15:57:26 +01:00
Alejandra Ferreiro Vidal
615f8deb1d add blanks to keep format 2018-02-06 15:57:26 +01:00
Alejandra Ferreiro Vidal
ae66a5cbca add new lines to keep format 2018-02-06 15:57:26 +01:00
Alejandra Ferreiro Vidal
4360636609 add sed test
Removes straightForwardTest that has not a clear scope since it test all
that it is tested in the other tests.
Adds sed test.
Removes duplicated sed assertions.
2018-02-06 15:57:25 +01:00
Alejandra Ferreiro Vidal
69d0050e0c remove blanks 2018-02-06 15:57:25 +01:00
Alejandra Ferreiro Vidal
cafa0a703b format String as String not GString
See: https://github.com/SAP/jenkins-library/blob/master/CONTRIBUTING.md#use-single-quotes-for-strings-and-constants
2018-02-06 15:57:25 +01:00
Alejandra Ferreiro Vidal
8075157ea2 rename mtaHome with mtaJarLocation 2018-02-06 15:57:25 +01:00
Alejandra Ferreiro Vidal
868d13749c add mtaJarLocation from environment test
Adds a test to check if the mtaJarLocation is read from the environment
and removes all duplicate assertions.
2018-02-06 15:57:25 +01:00
Alejandra Ferreiro Vidal
5d60bc8199 add environment PATH test
Adds an unit test to test that the environment PATH is set and removes
duplicate PATH assertions.
2018-02-06 15:57:25 +01:00
Alejandra Ferreiro Vidal
7f3f76a8ad remove duplicated mtarFilePath assertions
mtarFile Path must be checked only when it is in the scope of the unit
test.
2018-02-06 15:57:24 +01:00
Alejandra Ferreiro Vidal
4aa4a1d2f5 remove unused cpe 2018-02-06 15:57:24 +01:00
Alejandra Ferreiro Vidal
9cb6f53678 remove unused code 2018-02-06 15:56:57 +01:00
Christopher Fenner
02c983e374
remove wrapping RuleChain 2018-02-06 09:53:27 +01:00
Christopher Fenner
edf3deaa9c rename method 2018-02-05 20:31:30 +01:00
Christopher Fenner
88d09eee63 filter by keyset 2018-02-05 19:54:04 +01:00
Christopher Fenner
8c02b8bc86 mock step configuration change 2018-02-05 16:02:59 +01:00
Christopher Fenner
87de7417ca add further tests 2018-02-05 13:48:39 +01:00
Christopher Fenner
853bc963c0 add additional test case 2018-02-05 13:33:15 +01:00
Christopher Fenner
bf1a2a98e0 remove debug log 2018-02-02 15:08:22 +01:00
Christopher Fenner
64046b6de2 rename step to checksPublishResults 2018-02-02 14:50:26 +01:00
Christopher Fenner
5dfc433601 add more test cases 2018-02-02 14:45:45 +01:00
Christopher Fenner
6337134607 add test cases 2018-02-02 12:25:18 +01:00
Marcus Holl
87f899a731 Merge remote-tracking branch 'github/master' into HEAD 2018-02-02 09:34:27 +01:00
Christopher Fenner
e92c233913 adapt new test rules 2018-02-02 09:33:39 +01:00
Christopher Fenner
192d96d082 add MapUtils 2018-02-02 09:30:31 +01:00
Christopher Fenner
41e85c035c extend config merger to handle deep config structures 2018-02-02 09:05:25 +01:00
Christopher Fenner
dc44fdba58 extend config merger to handle deep config structures 2018-02-01 12:16:21 +01:00
Alejandra Ferreiro Vidal
4f624d5aea add error rule as common rule 2018-02-01 10:11:37 +01:00
Alejandra Ferreiro Vidal
485eff7175 bugfix absolute path 2018-01-31 18:53:14 +01:00
Marcus Holl
c55673daea
Merge pull request #56 from marcusholl/pr/rules
Provide Rule chain for the common rules used as prerequisite in almost all tests
2018-01-31 10:34:14 +01:00
Christopher Fenner
9d4a9304db add further test cases 2018-01-30 15:26:54 +01:00
Christopher Fenner
653a66b841 add unit test 2018-01-30 13:33:28 +01:00
Marcus Holl
f52cbbe36a Fix wrong backward compatibility handling for deployHost, deployAccount. 2018-01-29 15:11:02 +01:00
Marcus Holl
ef0b1bd9dd [refactoring] Rule handling
Starting point for that refactoring: it turned out that the tests
was not independent. The DefaultValueCache which is a singleton
keeps the status over various tests. Success of test execution depends
on the order test execution.

We have now
  * a dedicated rule for resetting the default value cache
  * JenkinsConfiguration rule (which already provided facilities for
    dealing with the configuration) has been replaced by a readYaml rule.
    From the PipelineUnit test framework we get already a handler for
    libraryResource, which is also part of the setup of the default
    values.
  * An auxiliar class which combines the
      * JenkinsSetupRule (registers the lib)
      * JenkinsReadYamlRule (provides facilities for Yaml parsing)
      * JenkinsResetDefaultValueCacheRule (cleans up the DefaultValueCache)
    into a rule chain. By using this rule chain we ensure that our
    setup OK (piper lib registered, and default config can be setup in
    a clean way).
2018-01-29 09:42:23 +01:00
Marcus Holl
0d87348c21 Replace JenkinsConfigRule by more speaking readYaml rule
and reset default cache rule.
2018-01-29 09:42:23 +01:00
Marcus Holl
8e3e60f1d5 Avoid interdependencies between tests 2018-01-26 15:39:04 +01:00
Marcus Holl
9a96acff57 change default for neo toolset from neo to neo.sh
The bash script is named 'neo.sh', not 'neo'. 'neo' as default will not work
despite somebody takes extra action to make it work.
2018-01-25 16:41:27 +01:00
Marcus Holl
bc2fb93551 Use dockerExecute inside neoDeploy 2018-01-25 16:41:27 +01:00
Marcus Holl
1ff46861e0 Introduce new config framework into neoDeploy 2018-01-25 16:41:26 +01:00