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

31 Commits

Author SHA1 Message Date
Alejandra Ferreiro Vidal
4f624d5aea add error rule as common rule 2018-02-01 10:11:37 +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
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
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
808170b88a Call pipeline steps directly, without using a pipeline snippet 2018-01-24 11:43:25 +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
Marcus Holl
492d4a1f68 Make use of Jenkins setup and logging rules 2018-01-23 14:51:18 +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
Milko Todorov
dd4f9a1b1d Exception in case of illegal arguments + tests 2018-01-16 10:54:17 +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
Marcus Holl
d3efa3edb7 [fix] missing quotes in neoDeploy shell exectution
Without proper quotation characters with a special semantics
on shell level (e.g. "${}", "!", """ gets escaped on shell level
before handed over to the neo tool.

neoExecutable is surrounded by double quotes since we may have
shell ${variables} inside the groovy variable.

All other variables (user, host, account, password) are surrounded
by single quotes since we do not expect to be variables used here.

The neoExecutable is
2017-12-01 09:51:54 +01:00
Alejandra Ferreiro Vidal
72b185e807 remove closure in withPipeline(p) 2017-11-21 16:27:01 +01:00
Alejandra Ferreiro Vidal
5ca3d39b02 adapt setUp method 2017-11-21 14:27:05 +01:00
Marcus Holl
9d59ba16d9 beautify inline script blocks
idents only
2017-11-16 14:09:48 +01:00
Marcus Holl
98a45bd961 Handling pipeline scripts in base class 2017-11-14 14:02:00 +01:00
Marcus Holl
2c53ade200 Handle shell calls in base class. 2017-11-14 14:02:00 +01:00
Marcus Holl
111a8e8222 Handle echo calls in base class. 2017-11-14 14:02:00 +01:00
Marcus Holl
b5cc4565fc Introduce PiperTestBase class. 2017-11-14 14:02:00 +01:00
Marcus Holl
083cb1bcde [fix] neo deploy fails with blanks in path of the deployable. 2017-11-13 10:51:26 +01:00
Oliver Nocon
47c195805f Initial version of piper-lib. 2017-11-10 16:30:52 +01:00