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

178 Commits

Author SHA1 Message Date
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
ab80004356 remove unused test file 2018-02-08 10:58:56 +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
Marcus Holl
2001816318 Remove unused variables inside test 2018-01-25 16:41:22 +01:00
Oliver Feldmann
ec9895ec3e Improve fileExists mock
Before this commit the fileExists mock was not doing the same as the
real fileExists method. To stay close to reality we changed it construct
the absolute path and check for that when the fileExists method is
called.
Refactored to archiveName instead of archivePath, as this makes more
sense now.
2018-01-25 08:48:38 +01:00
Oliver Feldmann
58d3907093 Use fileExists to check whether archivePath really exists
When running on a slave we have to use the Pipeline method fileExists,
using the File class' exist on the absolute path fails.
The neo deployment uses the relative path as well.
The fileExists method is mocked with LesFurets.
2018-01-24 13:11:04 +01:00
Marcus Holl
c9d7cc8856
Merge pull request #53 from marcusholl/pr/testCleanup
Beautify the tests
2018-01-24 11:51:31 +01:00
Marcus Holl
808170b88a Call pipeline steps directly, without using a pipeline snippet 2018-01-24 11:43:25 +01:00
Oliver Nocon
749aa5e7ed
InfluxDB support (#52)
* adding step for writing metrics to InfluxDB including dependencies
* added documentation
* incorporated PR feedback
2018-01-24 09:55:38 +01:00
Thorsten Duda
e8363e9637 introduce JenkinsConfigRule 2018-01-23 15:02:25 +01:00
Marcus Holl
106a8b4693 Make use of JenkinsShellCallRule 2018-01-23 15:02:25 +01:00
Thorsten Duda
1089e192f3 added JenkinsShellCallRule class 2018-01-23 14:51:18 +01:00
Marcus Holl
492d4a1f68 Make use of Jenkins setup and logging rules 2018-01-23 14:51:18 +01:00
Marcus Holl
b9eedda38e
Merge pull request #44 from milkotodorov/master
Neo deploy - Add support for WAR file deployment/rolling-update
2018-01-23 09:42:02 +01:00
Milko Todorov
d9e8128860 Unit test for warAction: rolling-update 2018-01-17 14:01:15 +01:00
Milko Todorov
62b0cae3ac Changing IllegalArgumentException to general Exception
Requested by Oliver Nocon
2018-01-17 11:19:02 +01:00
Milko Todorov
98a0c5b548 Converting parameters names to lower-case
Requested by Oliver Nocon
2018-01-17 11:17:24 +01:00
Marcus Holl
00df52f9f1
Merge pull request #49 from marcusholl/pr/changePiperLibIdentifier
Change piper lib identifier
2018-01-17 09:28:11 +01:00
Milko Todorov
dd4f9a1b1d Exception in case of illegal arguments + tests 2018-01-16 10:54:17 +01:00
Marcus Holl
a794e9270b remove printing the callstack
I guess nobody is interested in the callstack printed into the log
during the tests.
2018-01-16 09:49:19 +01:00
Marcus Holl
2a7a35db29 [refactoring] Remove redundant code 2018-01-16 09:43:24 +01:00
Marcus Holl
998abed377 Switch library identifier to piper-library-os
this identifier is commonly used.
2018-01-15 15:06:02 +01:00
Milko Todorov
d3d35cc140 Unit tests for the new deployMode in NeoDeploy 2018-01-12 15:56:29 +01:00
Milko Todorov
ced5307eb5 Adjusting UnitTests 2018-01-10 17:40:07 +01:00