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

10 Commits

Author SHA1 Message Date
Alejandra Ferreiro Vidal
86978becfc remove utils.getMandatoryParameter() 2019-04-09 16:25:25 +02:00
Marcus Holl
5f07490cf2 Unstash in loop only if identifier is available
In case unstashAll is called with a Set containing a null value we get
an ugly message in the log:

Unstash failed: null (Could not instantiate {name=null} for UnstashStep(name: String):

This can be avoided by unstashing only in case we have an ID.
2019-02-13 14:31:25 +01:00
Christopher Fenner
def66f4ffa
extend Analytics (#439)
* add extension mechanism for analytics

* add sha1 hashing

* correct return types

* correct registerEventListener method

* decrese visibility of createInstance

* correct typo

* catch exceptions from tests

* correct test case

* Update Analytics.groovy

* rename to Telemetry

* rename file

* fix typo

* add test case for generateSha1

* expose methods to tests

* add clear method for tests

* change return type

* add test for Telemetry class

* replace UtilsTests

* remove unused imports

* make default reporter static

* add stage parameters to payload

* simplify SHA1 method

* remove obsolete method

* remove obsolete methods

* remove outdated tests
2019-01-30 12:39:33 +01:00
Marcus Holl
9b1397e998 Better readable rule names: loggingRule 2019-01-23 14:54:50 +01:00
Marcus Holl
994e1f1692 Better readable rule names: shellRule 2019-01-23 14:54:49 +01:00
Christopher Fenner
4425629ee7
notify about deactivated SWA reporting (#261)
* report deactivated SWA reporting

* Update Utils.groovy

* add tests

* add test cases

* use hamcrest matchers in tests

* check for missing call to web analytics

* Update UtilsTest.groovy
2018-08-29 10:01:16 +02:00
Alejandra Ferreiro Vidal
b813dc4b42 add missing package 2018-02-14 11:32:52 +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
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
Sven Merk
fe89155a04
Initial check-in of lesfurets test improvements (#23)
Adding lesfurets test framwork improvements via helper classes
2018-01-10 10:27:55 +01:00