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

787 Commits

Author SHA1 Message Date
Marcus Holl
d8d2d8b1fd abap development client always under changeManagement.rfc 2019-02-07 10:11:22 +01:00
Marcus Holl
fd5a07d403 applicationId -> applicationName for RFC file upload 2019-02-07 08:29:53 +01:00
Marcus Holl
200e18f468 transportRequestRelease sanity checks for CTS case. 2019-02-06 15:31:50 +01:00
Marcus Holl
608b76f1c8 transportRequestRelease sanity checks for SOLMAN case. 2019-02-06 15:16:27 +01:00
Marcus Holl
663b840dee Add test for release transport CTS success 2019-02-06 14:23:00 +01:00
Marcus Holl
1b202f879a Provide flag for skipping docker image pulls (#407)
* Provide flag for skipping docker image pulls

Usefull for testing while developing images. Without pulling images it is possible to
use images available in the local registry only.
2019-02-06 08:48:33 +01:00
Marcus Holl
d8b0de3735 Add step test: transportRequestRelease for CTS fails 2019-02-05 17:29:45 +01:00
Oliver Nocon
74366631b5
Project "Piper" Template: framework and structure (#476)
* Project "Piper" Template: framework and structure

This is the first in a series of Pull-Requests to provide a fully functional Pipeline template into the library.

This PR contains:
* general Pipeline structure incl. tests
* Pipeline initialization incl. tests
* Hollow pipeline stages incl. tests
* first set of default values
* add gitUrls to commonPipelineEnvironment
* set correct git information on commonPipelineEnvironment
2019-02-05 15:37:59 +01:00
Marcus Holl
6f96f3d87b Add test for transportRequestRelease failure for type RFC 2019-02-01 13:29:41 +01:00
Marcus Holl
59bff987d7 Test for releaseTransportRequest RFC sanity checks 2019-02-01 13:23:08 +01:00
Marcus Holl
0d2dec0922 Introcude test transportRequest RFC release 2019-02-01 13:08:25 +01:00
Marcus Holl
cb61d80e12 development client for RFC release transport not hard coded anymore 2019-02-01 13:08:25 +01:00
Marcus Holl
c785e53317 split releaseTransportRequest method into three methods
one for each BackendType.
2019-02-01 13:08:24 +01:00
Marcus Holl
6072bbd280 Remove outdated comment from test class 2019-01-31 14:12:05 +01:00
Marcus Holl
6a6e075da8 Provide test for transport request create rfc fails 2019-01-31 14:02:54 +01:00
Marcus Holl
71148faa42 Test for create transport request via RFC succeeds. 2019-01-31 13:06:52 +01:00
Marcus Holl
3ea0cb6208 Remove duplicate test
the other test doing the same is testReleaseTransportRequestFailsSOLMAN
2019-01-31 12:38:46 +01:00
Marcus Holl
5302d1d7b1 Merge remote-tracking branch 'github/master' into work 2019-01-31 09:55:21 +01:00
Marcus Holl
06f48ce5e7 Test failure case RFC upload ChangeManagement 2019-01-31 09:39:34 +01:00
Oliver Nocon
3b2e42c74f
Add step containerExecuteStructureTest (#441)
* add step containerExecuteStructureTest
* include PR-review feedback
* documentation
2019-01-31 09:39:13 +01:00
Marcus Holl
80c7da76f4 Test good case RFC upload ChangeManagement 2019-01-31 09:31:52 +01:00
Christopher Fenner
bca5b8ccf1
Add step uiVeri5ExecuteTests (#469)
* add defaults for uiVeri5 step

* add step and tests

* correct parameter names

* add empty docs

* add docs annotations

* remove not needed parameter

* add docs annotations
2019-01-31 09:16:34 +01:00
Marcus Holl
01cdfc5d91 Make clear in the testName which type we test. 2019-01-31 09:06:02 +01:00
Marcus Holl
34b0e1f4f5 RFC: upload failure test 2019-01-30 17:34:16 +01:00
Marcus Holl
40d89f2e5d Test: sanity check parameters 2019-01-30 17:34:16 +01:00
Marcus Holl
dfe69d7a31 Test: upload rfc success 2019-01-30 16:57:25 +01:00
Marcus Holl
a70fc10ae0 Parameter applicationURL instead of file path 2019-01-30 16:02:48 +01:00
Marcus Holl
ce710dfa38 More consistent test names for transportRequestUploadFile 2019-01-30 15:13:10 +01:00
Marcus Holl
88d50a0a10 Fix error message: cmclient, rfc client 2019-01-30 15:13:10 +01:00
Marcus Holl
661745fd81 Merge remote-tracking branch 'github/master' into HEAD 2019-01-30 15:01:09 +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
Florian Geckeler
a72e33f488
Stop old instance only if it exists in CloudFoundry
If there was no instance deployed in CF and blue-green deployment was activated stopping the old instance caused a failure of the pipeline, even if the application was deployed successfully. 
With that change the failure of the pipeline will be avoided in case of no old application is available.
2019-01-30 10:07:00 +01:00
Bernd Maier
c7a6b073fc RFC release transport 2019-01-29 14:57:31 +01:00
Daniel Kurzynski
09a2e3f090 Remove compatibility for neoDeploy 2019-01-28 12:35:35 +01:00
Daniel Kurzynski
6e26d78047
Improve neo deploy (#440)
The following features were added:
Lock resources for deployment
New parameters: environment, vmArguments
Assert password does not start with @
Link to cloud cockpit
Only execute rolling update if app is running
Show logs if deployment failed
Restart app after normal deployment
Use neo namespace for parameters
Align parameter names with neo sdk: size, application, source
Remove vmSize check as done by the tool itself
2019-01-28 11:32:24 +01:00
Christopher Fenner
152c0e3682
Merge branch 'master' into pr/betterReadableRuleNames 2019-01-23 16:53:52 +01:00
Marcus Holl
ddc796b85d Better readable rule names: readJsonRule 2019-01-23 14:54:52 +01:00
Marcus Holl
9e56ebc724 Better readable rule names: dockerExecuteRule 2019-01-23 14:54:52 +01:00
Marcus Holl
f81b83169a Better readable rule names: readFileRule 2019-01-23 14:54:52 +01:00
Marcus Holl
e4c3228e25 Better readable rule names: writeJsonRule 2019-01-23 14:54:51 +01:00
Marcus Holl
7ba695e767 Better readable rule names: readJsonRule 2019-01-23 14:54:51 +01:00
Marcus Holl
da1969e089 Better readable rule names: writeFileRule 2019-01-23 14:54:51 +01:00
Marcus Holl
afa8889e9d Better readable rule names: errorRule 2019-01-23 14:54:51 +01:00
Marcus Holl
5c0abfdff8 Better readable rule names: readYamlRule 2019-01-23 14:54:51 +01:00
Marcus Holl
4e01b94458 Better readable rule names: dockerExecuteRule 2019-01-23 14:54:50 +01:00
Marcus Holl
b486f32dc1 Better readable rule names: stepRule 2019-01-23 14:54:50 +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
Marcus Holl
9bf38f9a76 Merge remote-tracking branch 'github/master' into HEAD 2019-01-23 14:26:30 +01:00
Oliver Nocon
05e0d958da
dockerExecute - fix issue when image does not contain which (#458)
command `which` requires a dedicated OS package to be installed.
In case a Jenkins Master or Jenkins Slave Image does not contain `which`, although `docker` command is available the step took a wrong turn.

This removes the check using `which` since checking `docker ps` is sufficient.
2019-01-23 14:19:36 +01:00
Marcus Holl
2330bfdcf4 Merge remote-tracking branch 'github/master' into HEAD 2019-01-23 12:34:25 +01:00
Oliver Nocon
27c3891685
deployToCloudFoundry - patch mta blue-green deployment (#457)
mta deploy plugin has flag:
` --no-confirm` which is described as _"Do not require confirmation for deleting the previously deployed MTA apps"_

This flag is essentials for performing fully automated blue-green deployments.
2019-01-22 16:13:59 +01:00
Marcus Holl
c8c96f11e3 Escape blanks when contained in env values for docker 2019-01-18 15:48:58 +01:00
sbmaier
423c9f52ba cloudFoundryDeploy: fix naming of Influx step (#450)
* fix naming Influx

* fix test for influx name change
2019-01-18 15:33:36 +01:00
Christopher Fenner
f6647d9ce5
newmanExecuteTests: use user-specific .npm-global directory (#447)
* use user-specific .npm-global directory

* Update newmanExecute.groovy

* fix typo

* Update NewmanExecuteTest.groovy

* Update NewmanExecuteTest.groovy
2019-01-18 13:14:39 +01:00
Marcus Holl
0914f6920a no docker pull 2019-01-18 10:26:27 +01:00
Marcus Holl
cca46d509b Upload binaries to transport requests via RFC 2019-01-18 10:26:03 +01:00
Oliver Nocon
e11478ca00
cloudFoundryDeploy - add deployment reporting to Influx (#421)
Add reporting of operations-related data to Influx (if configured), like:
* Version of deployed artifact
* Deployment time
* Target infrastructure for deployment
2019-01-18 08:25:22 +01:00
Oliver Nocon
98139bb498
influxWriteData - support Influx tags (#420)
* influxWriteData - support Influx tags

In order to better query data in Influx, tags needs to be written.
This change allows filling tag data via the Influx plugin.
2019-01-17 15:42:03 +01:00
Marcus Holl
db5022a4ff New Scenario Step: SAP UI5 on SAP Cloud Platform (#388)
This scenario builds a UI5 app and deploys it to SAP Cloud Platform (neo).
2019-01-15 13:32:01 +01:00
Oliver Nocon
20a54cf094
dockerExecute - extend Kubernetes capabilities (#432)
allow `dockerExecute` to pass on to dockerExecuteOnKubernetes
* containerCommand
* containerShell
2019-01-14 14:43:07 +01:00
Oliver Nocon
4064e6ffe1
piperStageWrapper - switch to parameter map for extensions (#424)
switch to using a parameter map
2019-01-14 10:25:47 +01:00
Oliver Nocon
724a851bcd
executeDockerOnKubernetes - specify custom shell (#428)
Depending on the Docker image used the default shell will not work in certain cases.
This extends the executeDockerOnKubernetes step to be able to use a custom shell according to https://github.com/jenkinsci/kubernetes-plugin#specifying-a-different-shell-command-other-than-binsh
2019-01-08 19:44:28 +01:00
Marcus Holl
d6372d5d96 Merge remote-tracking branch 'github/master' into HEAD 2018-12-19 13:18:00 +01:00
Oliver Nocon
130e607446
influxWriteData - fix issue when running in POST (#413)
influxWriteData requires a node to be executed.
In a declarative pipeline the POST section by default does not provide a node/agent.

This adds a parameter to force creation of a node/agent.
2018-12-12 17:33:36 +01:00
Marcus Holl
0751eda1ee Merge remote-tracking branch 'github/master' into HEAD 2018-12-12 12:24:26 +01:00
Marcus Holl
45170e979e Adapt mta build test test JenkinsShellCallRule
a lot of code can be replaced by configuring the JenkinsShellCallRule accordingly. At the time when
this test was provided there was not JenkinsShellCallRule ...
2018-12-12 12:14:14 +01:00
Marcus Holl
bf881bfc13 Merge remote-tracking branch 'github/master' into HEAD 2018-12-12 12:05:24 +01:00
Oliver Nocon
e556fba950
add wrapper for stages contained in library (#341)
* add wrapper for stages contained in library

`piperStageWrapper` provides a wrapper for stages which we may include into the library.
It will take care about extension capabilities, locking, node handling, ... which should be a capability of every stage contained in the library.
2018-12-12 11:45:11 +01:00
Marcus Holl
51afc894e5 Implement hashCode/equals/toString for JenkinsShellCallRule
* toString is helpful for troubleshooting during developing tests
* equals/hashCode are required in case somebody would like to register
  some responses again (e.g. register something valid almost all the time, and
  register something more specific for a certain test).
2018-12-10 16:23:24 +01:00
thorstenwillenbacher
4d06cf151e
Merge branch 'master' into pr/moreLoggingAndFailfastInMtaBuild 2018-12-06 15:12:46 +01:00
Marcus Holl
dc780b1248 [fix] Make regex in test Operating System independent.
We searched for the slash, but on win like operating system we have of course a backslash.
2018-11-28 11:52:37 +01:00
Oliver Nocon
2881877322
newmanExecute - adapt to changes (#400)
* script now mandatory, thus passing it to dockerExecute
* html reporter needs to be installed separately
2018-11-28 09:25:34 +01:00
Florian Geckeler
32e20a7293
Provide option to Stop and not delete old instance on BlueGreenDeploy (#394)
* Provide option to Stop and not delete old instance on BlueGreenDeploy
* Default is still delete old instance 

Closes #323
2018-11-27 11:47:44 +01:00
Oliver Nocon
d65a010158
testsPublishResults: Make jUnit pattern more universal (#386)
* Make jUnit pattern more universal
* update documentation & test
2018-11-16 08:57:09 +01:00
Marcus Holl
a84d91f6bf More logging and be failfast around mtaYamlFile
- don't log a message and continue when it is clear that we cannot succeed
    together with error raised later during attempt not parse a non-existing
    file
  - More log output in order to clarify what happens with mta.yaml
2018-11-13 09:23:26 +01:00
Marcus Holl
5c4007180c Merge remote-tracking branch 'github/master' into HEAD 2018-11-12 13:11:54 +01:00
Marcus Holl
f48c8a038e Merge remote-tracking branch 'github/master' into HEAD 2018-11-08 15:58:26 +01:00
Marcus Holl
7063aa1249 set build to unstable in case old config framework is used.
protected by feature flag (so we can test it manually already).
2018-11-08 13:11:24 +01:00
Marcus Holl
b3c5cba707 Notify about old config framework from neo deploy. 2018-11-08 12:18:49 +01:00
Christopher Fenner
9a1ab37c0b
add new step karmaExecuteTests (#351)
* add new step for karma execution

* add defaults

* Update karmaExecuteTests.groovy

* add key comments

* add test case

* docs

* add step docs

* add step docs

* Update karmaExecuteTests.md

* complete docs

* Update karmaExecuteTests.md

* init `script` the "new way"

* Update karmaExecuteTests.groovy

* Update karmaExecuteTests.groovy
2018-11-08 12:15:15 +01:00
Thorsten Duda
3896177b3e
Merge branch 'master' into pr/changeDocumentIdInCommonPipelineEnv 2018-11-08 11:00:28 +01:00
Christopher Fenner
33758e0e81
Merge branch 'master' into pr/cleanWorktreeCheck 2018-11-07 11:47:56 +01:00
Christopher Fenner
10ec0473c1
correct step invokation in tests (#368)
* correct step invokation in tests

* correct step invokation in tests

* correct step invokation in tests
2018-11-07 11:45:38 +01:00
Marcus Holl
e354da8a05 Merge remote-tracking branch 'github/master' into HEAD 2018-11-07 11:44:15 +01:00
Oliver Nocon
5ec37170fc
cloudFoundryDeploy - blue-green plugin extensions (#355)
* cloudFoundryDeploy - blue-green plugin extensions

* support blue-green application cleanup with new plugin flag
* enhance error reporting in case no app name is available

* include PR feedback
2018-11-07 10:39:30 +01:00
Marcus Holl
420746463e Remove return value from transportRequestCreate
it is contained in the common pipeline environment.
2018-11-06 15:37:11 +01:00
Marcus Holl
b8c0c8e6b3 Cache transport request Id in common pipeline environment 2018-11-06 15:36:39 +01:00
Marcus Holl
91f84389de The cases removed with the tests here are checked by corresponding step helper tests. 2018-11-06 14:42:03 +01:00
Marcus Holl
76be6f0b24 Cache change document id in common pipeline environment 2018-11-06 14:36:40 +01:00
Marcus Holl
3cb958b740 Merge remote-tracking branch 'github/master' into HEAD 2018-11-05 13:30:43 +01:00
Christopher Fenner
aa5ad1c0d1 dockerExecute: handle stashContent (#332)
* handle stashed content
* add utils
2018-11-05 11:24:25 +01:00
Marcus Holl
daaaadeea9 Remove duplicate step in whitelist 2018-11-02 15:06:25 +01:00
Marcus Holl
01753ccc6d Provide always the script from transport request releaded tests 2018-10-31 12:52:45 +01:00
Marcus Holl
1a62b263fe fix set the build status 2018-10-31 12:52:37 +01:00
Marcus Holl
c9457df43c Improve rule setup 2018-10-31 12:48:49 +01:00
Oliver Nocon
2dbfeed813
Merge branch 'master' into pr/adjustConfigKeySetsInSteps 2018-10-31 10:43:38 +01:00
Marcus Holl
ea23d65594 Merge remote-tracking branch 'github/master' into HEAD 2018-10-30 17:01:19 +01:00
Marcus Holl
c03a75da9f Ensure script is mandatory parameter
... only in case a step uses the script at all.
2018-10-30 16:24:47 +01:00
Marcus Holl
7312f87705 add gaugeExec and pipelineRestart to whitelist for generalconfig 2018-10-26 10:15:24 +02:00
Marcus Holl
0951dcb5d6 Add common step tests wrt to fields defining configuration 2018-10-26 10:15:24 +02:00
Oliver Nocon
1b2fa0398a
Merge branch 'master' into pr/fixTrailingWhitespaces 2018-10-25 16:56:40 +02:00
Oliver Nocon
a8a29b753a
add step githubPublishRelease (#345)
This step allows to easily create a new release for your GitHub repository

* include PR review feedback - add additional labels
* consider return status of api call
2018-10-25 16:56:09 +02:00
Christopher Fenner
5a3be2af49
Merge branch 'master' into pr/fixTrailingWhitespaces 2018-10-25 10:42:19 +02:00
Marcus Holl
dd9e26042d Fix trailing whitespaces 2018-10-25 08:41:50 +02:00
Marcus Holl
5cdd1129a0 Merge remote-tracking branch 'github/master' into HEAD 2018-10-25 08:38:48 +02:00
Christopher Fenner
dabbc724ad
handlePipelineStepErrors: extract error message to template (#350)
* add template for handleStepErrors

* add tests

* use template

* fix indent

* fix typo

* Update HandlePipelineStepErrorTest.groovy

* Update HandlePipelineStepErrorTest.groovy
2018-10-24 13:36:30 +02:00
Christopher Fenner
18078b3bdb add sources for code coverage (#349)
* add sources for code coverage
* hand-in mocked script
* remove obsolete test case
2018-10-24 12:09:51 +02:00
Christopher Fenner
48990bac47
dockerExecute: use docker network to connect sidecar containers (#352)
* use docker network to connect containers

* add container names

* use network-alias instead of name

* Update dockerExecute.groovy

* Update dockerExecute.groovy

* Update dockerExecute.groovy

* Update dockerExecute.groovy

* Update DockerExecuteTest.groovy

* remove obsolete parameter

* Update default_pipeline_environment.yml

* Update DockerExecuteTest.groovy

* Update dockerExecute.groovy

* Update DockerExecuteTest.groovy

* Update dockerExecute.groovy

* update docs
2018-10-24 10:13:28 +02:00
Marcus Holl
a2393c3f92 merge remote-tracking branch 'github/master' into HEAD 2018-10-23 09:08:59 +02:00
Marcus Holl
6653b68c0f Merge remote-tracking branch 'github/master' into HEAD 2018-10-18 12:54:32 +02:00
Marcus Holl
d4f9171247 erge remote-tracking branch 'github/master' into HEAD 2018-10-18 11:02:09 +02:00
Oliver Nocon
455461d3c1
add step pipelineRestartSteps (#337)
This step allows to restart a set of steps in order to retry in case of e.g. infrastructure failures which first need to be fixed.

* update documentation
2018-10-18 08:51:48 +02:00
Oliver Nocon
0e5ccabdae
add step gaugeExecuteTests (#340)
* seleniumExecuteTests - fixes
* add step gaugeExecuteTests incl. tests
* add documentation
* add more config options
2018-10-17 16:44:20 +02:00
Oliver Nocon
1f8b94528c
add step mailSendNotification (#336)
This step allows to send email notifications in case of pipeline failures.
2018-10-17 12:05:11 +02:00
Marcus Holl
96cae66bf4 seleniumExecuteTest with void return value on call method 2018-10-17 12:02:19 +02:00
Christopher Fenner
dba20d496c
Merge branch 'master' into pr/stepReturnVoid 2018-10-17 11:50:58 +02:00
Marcus Holl
f47d540aa3 Introduce dedicated factory method for configuration helper 2018-10-17 11:15:37 +02:00
Florian Wilhelm
7f7afdad1a
Implement workaround for incompatible change in cloud foundry API (#343) 2018-10-17 11:01:09 +02:00
Oliver Nocon
17e8390511
add step healthExecuteCheck (#339)
This step allows to perform a basic health check on an installed application.
It verifies that your app has a simple health endpoint available and that there is no error when calling it.
2018-10-12 16:06:41 +02:00
Marcus Holl
9e27fde76e CommonStepTest 2018-10-11 10:18:39 +02:00
Marcus Holl
6dc1f5aa59 Do not check return value of step isChangeInDevelopment 2018-10-11 10:18:39 +02:00
Marcus Holl
378f34da76 Fix return value for transport request create
since now handlePipelineStepError does not return anything anymore we need to put the
corresponding return statement inside createTransportRequest outside the handlinePipelineStepError
closure.
2018-10-11 10:18:39 +02:00
Marcus Holl
479b1d483a Merge remote-tracking branch 'github/master' into HEAD 2018-10-11 08:36:18 +02:00
Marcus Holl
11a7b24ce8 STEP_NAME test
Asserts that each step (modulo whitelist) comes with a STEP_NAME
field.
2018-10-11 08:24:33 +02:00
Marcus Holl
203be37f75 Merge remote-tracking branch 'github/master' into HEAD 2018-10-09 16:57:26 +02:00
Marcus Holl
b8ff2a5285 Merge remote-tracking branch 'github/master' into HEAD 2018-10-09 16:30:55 +02:00
Marcus Holl
b6a205f9aa Merge remote-tracking branch 'github/master' into HEAD 2018-10-09 15:31:43 +02:00
Christopher Fenner
d6f47e802a
executeDockerOnKubernetes: support workspace/container stashing for sidecar case (#330)
* simplify parameter handover

* extract default contaner name and map

* condense pod execution methods

* simplify closure handling

* fix map issue

* simplify

* stash only if needed

* fix test case
2018-10-08 11:54:13 +02:00
Christopher Fenner
34b675a030
handle test repositories (#324)
* handle test repositories

* use GitUtils

* add test case

* fix test cases

* return stash name

* handle seleniumExecuteTests step

* Revert "handle seleniumExecuteTests step"

This reverts commit 2b33d274fe.

* handle seleniumExecuteTests step

* add import of GitUtils
2018-10-08 11:30:42 +02:00
Oliver Nocon
aeb814fc2b
Merge branch 'master' into pr/noExplictGetterAnDSettersInCommonPipelineEnvironment 2018-10-08 09:45:14 +02:00
Oliver Nocon
0ee27774f6
Merge branch 'master' into pr/assertOrderOfGitCommands 2018-10-08 09:43:16 +02:00
Oliver Nocon
130fe6a941
Merge branch 'master' into pr/swaPushOldConfigUsed 2018-10-08 09:42:33 +02:00
Oliver Nocon
7a961ef38e
seleniumExecuteTests - add step to run Selenium tests (#318)
It comes with an extension to executeDocker and executeDockerOnKubernetes to run sidecar containers.

This helps to execute Selenium tests using two Docker images:

1. Execution runtime for tests (e.g. node image)
2. Selenium instance which holds Selenium server + browser

* add documentation & some name cleanup
* include PR feedback
* add step documentation to structure
2018-10-04 17:06:42 +02:00
Marcus Holl
afc17707d8 Notify about old config (properties) used 2018-10-02 10:56:13 +02:00
Marcus Holl
ba725dc52f test asserting setupCPE works with config properties file 2018-10-02 10:55:50 +02:00
Marcus Holl
d0d4cac75b Assert that there is no git commit if there should be not commit intentionally (#321)
up to now only the mvn call for setting the version was asserted, but it was not asserted
whether or not there is a commit.
2018-10-02 08:53:21 +02:00
Marcus Holl
252c6da4bd Ensure the order of the git commands
Up to now we checked for git commands, but the order was not taken into account.
Test would pass even if the commit happens before git add.

Now the order of the git commits is asserted.
2018-10-01 13:56:59 +02:00
Marcus Holl
0e6f44a4ed Switch default for changeManagement.type to NONE
before we had SOLMAN.
2018-09-28 14:16:20 +02:00
Marcus Holl
2d779233cc Swich for switching off cm integration 2018-09-28 14:16:19 +02:00
Marcus Holl
01b03f0df3 [refactoring] Reduce number of sh calls 2018-09-27 16:18:46 +02:00
Marcus Holl
3e556f4afb test asserting setupCPE works with config properties file 2018-09-27 15:46:06 +02:00
Marcus Holl
f14781d913 Report all missing mandatory parameters instead of only the first one 2018-09-27 11:13:47 +02:00
Marcus Holl
09e4e999a2 Merge remote-tracking branch 'mholl/pr/shStdoutOrReturnStatus' into HEAD 2018-09-27 09:10:06 +02:00
Marcus Holl
752993aefa Merge remote-tracking branch 'github/master' into HEAD 2018-09-27 08:24:04 +02:00
Marcus Holl
56d150932f release transport CTS support 2018-09-25 12:34:52 +02:00
Marcus Holl
4d7274ee45 Introduce backend type for releasing transports 2018-09-25 10:50:05 +02:00
Marcus Holl
de05e1dc55 Merge provide either stdout or return status 2018-09-25 10:11:14 +02:00
Marcus Holl
ddbb09fa66 transport request create CTS 2018-09-25 09:27:11 +02:00
Marcus Holl
f34308ffe0 upload file to transport for CTS use case 2018-09-24 15:08:01 +02:00
Marcus Holl
726b969682 Merge remote-tracking branch 'github/master' into HEAD 2018-09-21 13:33:42 +02:00
Marcus Holl
9cd31e7236 Merge remote-tracking branch 'github/master' into HEAD 2018-09-21 13:27:29 +02:00
Marcus Holl
f07b596c46 Merge remote-tracking branch 'github/master' into HEAD 2018-09-21 12:48:14 +02:00
Marcus Holl
8a5685bae7 Merge remote-tracking branch 'github/master' into HEAD 2018-09-21 12:18:25 +02:00
Marcus Holl
123ce3a603 Merge remote-tracking branch 'github/master' into HEAD 2018-09-21 11:20:14 +02:00
Marcus Holl
42188d3a4f Merge remote-tracking branch 'github/master' into HEAD 2018-09-21 11:13:07 +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
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
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
8afec9b4dc Merge remote-tracking branch 'github/master' into HEAD 2018-09-12 11:14:03 +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
Sven Merk
61de848114
Merge branch 'master' into pr/removeMockHelper 2018-09-10 14:03:07 +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
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
0dd74fe684 GitUtils: provide method for checking worktree is clean. 2018-09-07 12:38:14 +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
b65eca35b2 MapUtils: Provide method for traversing of nested maps. 2018-09-06 12:17:55 +02:00
Christopher Fenner
7b49858233
Merge branch 'master' into pr/artifactSetVersionStreamlineGitHandling 2018-09-05 11:46:11 +02:00
Marcus Holl
12d8f48c38 Do only what is really needed inside the body of sshAgent
- there is no need to do the git commit inside the body of sshAgent
- there is no need to do the git tag inside the body of sshAgent

- side catch: availablility of git user name and git user email is
  checked at its own. If one is missing the other may be present
  ~somehow~ in the configuration.
2018-09-04 17:04:07 +02:00
Florian Wilhelm
50ac5b0ac9
Execute MTA builder in Docker 2018-09-04 11:32:54 +02:00
Marcus Holl
cb3860ffe9 remove not needed closure when registering yaml file 2018-09-04 10:50:03 +02:00
Marcus Holl
138a41f02a Merge remote-tracking branch 'github/master' into work 2018-09-04 10:42:36 +02:00
Marcus Holl
6b7dc48c44 Be more flexible with JenkinsReadYaml rule
When we register a closure as file, the closure will be exectutd.
Otherwise we return what is registered.

This gives us a maximum level of flexibility. We can throw exceptions (e.g. FileNotFound) as
as test setup requires this, in simple cases we provide the yaml as a string.
2018-09-04 09:46:59 +02:00
Marcus Holl
fb425a4c70 Register empty pipeline config yml by default 2018-09-03 15:43:17 +02:00
Marcus Holl
94241f1a6c Register yaml content at beginning of test 2018-09-03 15:43:17 +02:00
Marcus Holl
26ecbe5013 Provide option for registering file for read yaml.
We can now registering files to JenkinsReadYamlRule by
providing the file name alongside with the expected content
(or e.g. an expception)

With that change it is possible to remove pwd statements
from mtaBuild. These statements was used in order to pass
a temporary directory inside the mtaBuild (code under test).
This is not needed anymore since we can register the files
directly.

Having pwd implies working with absolute pathes which is
also a no-go when working with docker, since the absolute
pathes inside and outside docker are normally not the same.

For pathes relative to a build root directory it is rather
easy to keep the pathes consistent the same.

Adjust sources according to registering yaml file to jenkins rule.

For mtaBuild this means also: get ride of absolute pathes for denoting the yaml file.
Having absolute pathes makes it difficult/impossible to work also with dockerized versions
of mtaBuild since the absolute pathes are most probably not the same inside and outside
the docker container, but the relatives pathes can be kept the same easily.
2018-09-03 15:43:15 +02:00
Marcus Holl
5cca5fddbb Tests: make use of JenkinsCredentialsRule
JenkinsCredentialsRule now closer to reality since it mimics
the bevavior or the credentials plugin in case a credential
is not known.
2018-09-03 12:28:08 +02:00
Marcus Holl
c54b6e6cf2 Make DefaultConfigurationCache instance checks more precise
up to now we check some values provided by the DefaultConfigurationCache. This is some kind
of plausibility check, but this is not really a check that the instance did not change.

With the tests as they are now we check in fact for a new instance.
2018-09-03 09:38:41 +02:00
Marcus Holl
b6fd507145 Be more precise with libraryResource and read yaml in prepareDefaultValuesTest
In the free wild it is the duty of libraryResource to provide some resource as text
and it is the duty of readYaml to parse a text (... would also be possible to read
a file instead just parsing text, but that is a different story).

In our setup we just forwarded the resource name in libraryResource and reacted on
that resource name inside read yaml. There was no yaml parsing at all, the yaml 'as
it' was returned.

The approach now is much closer to reality. Library resource now provides the
text 'behind' the resource and yaml parses it. There is now a real yaml parsing.
Read yaml is now not registered explicitly anymore. It is just the readYaml closure
which is registerd by default for our tests.
2018-09-03 09:24:57 +02:00
Marcus Holl
f2feb8f5ad Ensure consistent location for files used by versioning tests (#278) 2018-08-31 14:13:11 +02:00
Marcus Holl
8a019f5b86 Remove read yaml rule from common rules
read yaml rule is a very frequently used rule. But having the rule in the common rules
means we cannot register text or files to that rule, which makes it less handy to work
with yaml files in the tests.
2018-08-31 10:22:46 +02: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
Roland Stengel
67429626a7 cmclient call needs to quote the file path 2018-08-28 15:29:08 +02:00
Marcus Holl
edee92020c No versionBackup files for mvn versioning (#259) 2018-08-22 09:59:19 +02:00
Ramachandra Kamath Arbettu
c84114c3df
Enable support for executing on K8S as a step (#231)
* Create executeDockerOnKubernetes.groovy

* Update dockerExecute.groovy

* Create SysEnvTest.groovy

* Update default_pipeline_environment.yml

* Update executeDockerOnKubernetes.groovy

* Create utils object

* update docker image

* Update mavenExecute.groovy

* Use pipeline-lib than piper

* Check container name

* Always change ownership to 1000

* Check for map

* Fix command

* Move chmod to docker execute

* Use generic name for the pod

* runAsPod has been added

* Return false if script has no k8smapping

* fix syntax error

* Null checks

* Returnn dockerImage name

* Check method body

* Return container name

* Cleanup echos

* Use runAsPod

* Rename step

* Use official jenkins JNLP agent image

* Construct containersMap

* Check if kubernetes plugin is active

* Support JaaS

* pass script object

* Move configuration to default section

* Use generic flag to check if running in k8s

* fix jnlp agent name

* Solve travis errors

* Improvements to config and changes to name of the method

* Improvements to config

* Fix type

* Rename stash config

* add import

* Fix map order

* Fix jnlp agent name

* cleanup config usage

* Check if config is enabled

* Use nested k8s mapping

* Support custom docker workspace and move flag to env

* Feature/k8s stage (#1)

* Use nested k8s mapping

* Support custom docker workspace and move flag to env

* Check dockerOptions value

* Support local execution

* Add tests for dockerExecute

* Move config to step and Fix tests

* Use step configuration while running as a pod

* Streamline parameter and config initialization

* Streamline parameter and tests

* Cleanup and align variable name

* Use default JNLP agent if one not defined in config

* Add tests for runInsidePod. Ensure lowercase container names.

* Improve tests and remove unused code block

* Fix permission issues

* Perform stashing and unstashing inside container

* Use custom jnlp agent due to user id restriction

* Fix tests after jnlp agent change

* Address review comments

* Initialize script to default value if null

* Address review comments

* Update exeception handling and documentation

* Improve documentation

* correct indent

* Link documents to the index page

* Merge containerExecute and dockerExecuteOnKuberenetes step and address comments.

* Update dockerExecute.md

* Update dockerExecuteOnKubernetes.md

* Update default_pipeline_environment.yml

* update documentation

* Update documentation. Use annotation for singleton

* Update DockerExecuteOnKubernetesTest.groovy

* Update dockerExecute.groovy

* Update dockerExecuteOnKubernetes.groovy

* Improve documentation and test case names

* neoDeploy: switch to chained ConfigurationHelper (#244)

* switch neoDeploy to chained ConfigurationHelper

* update imports

* Improve tests

* Address review comments

* Improve documentation

* made dockerImage non-mandatory parm, improved test

* add comment regarding userid assumption
2018-08-21 15:45:59 +02:00
Marcus Holl
044e940dec No need for manipulating origin url
the gitSshUrl can be provided directly to the push call. This avoids footprint on the build
servers git repository.
2018-08-21 13:39:48 +02:00
Marcus Holl
6c6f106f26 Avoid several sh calls for consecutive git calls. 2018-08-21 13:39:48 +02:00
Marcus Holl
3a72d16185 neoDeploy with archvive from CPE 2018-08-17 15:46:46 +02:00
Christopher Fenner
6007f54074
use new config handler in steps (#253)
* use new config handler

* use new config handler

* add reporting

* Update checksPublishResults.groovy

* remove unused ConfigurationMerger methods

* fix typo

* revert changes on script loading

* remove outdated test case

* Add missing import
2018-08-15 11:53:28 +02:00
Oliver Nocon
17ee927807
batsExecuteTests - add step for executing bats-core (#254)
details are available in the documentation contained in this PR
2018-08-15 11:41:01 +02:00
Christopher Fenner
8e40a4cf62
Merge branch 'master' into pr/trUploadFileApplicationIdFromConfiguration 2018-08-15 09:59:25 +02:00
Marcus Holl
45f4952c71 Read applicationId also from configuration 2018-08-15 09:48:59 +02:00
Marcus Holl
bfb131407d Merge remote-tracking branch 'github/master' into HEAD 2018-08-14 12:13:30 +02:00
Christopher Fenner
c538e896f3
Merge branch 'master' into CCFenner/newman 2018-08-09 14:25:22 +02:00
Oliver Nocon
71f7f05427
add telemetry reporting to steps (#243)
add telemetry to all steps using ConfigurationHelper.
Other steps need to be switched to ConfigurationHelper first.

update docs
2018-08-09 11:35:33 +02:00
Thorsten Willenbacher
9dfc7fcd01 refactor withCredentials to ChangeManagement util class
fix tests to match refactoring
2018-08-09 11:03:30 +02:00
Christopher Fenner
059268459a
Merge branch 'master' into CCFenner/newman 2018-08-09 10:34:00 +02:00
Oliver Nocon
65b582dc9d
artifactSetVersion - add new artifact types & cleanup (#242)
* artifactSetVersion - add new artifact types & cleanup

added:
* dlang
* golang
* npm
* pip
* scala

* add documentation update
2018-08-08 22:21:26 +02:00
Christopher Fenner
240df88882
add stashing & private test repositories 2018-08-08 11:22:08 +02:00
Marcus Holl
3d78affc3b
Merge branch 'master' into pr/transportRequestUploadFilewithMtarFileFromCPE 2018-08-03 08:49:05 +02:00
Christopher Fenner
2c2700f10a
Merge branch 'master' into CCFenner-patch-2 2018-08-01 08:54:45 +02:00
Christopher Fenner
30f0c5a6cc
correct test cases 2018-08-01 08:50:21 +02:00
Christopher Fenner
0db93df011
fix closure 2018-08-01 08:41:49 +02:00
Christopher Fenner
8c7dc44d1d
add tests 2018-08-01 08:30:10 +02:00
Marcus Holl
0bac7ac27e Take mtarFilePath in commonPipelineEnviroment into account
This allows the steps to interact without using return values (which is not possible in
declarative pipelines). On the other hand we have depencencies between the steps based
on the status of the commonPipelineEnvironment.
2018-07-31 16:55:15 +02:00
Marcus Holl
f2e0e81802
Merge branch 'master' into fix/rolebackNeoDeployChange 2018-07-31 16:41:36 +02:00
Oliver Nocon
d844b23b90
add cloudFoundryDeploy step (#173)
* add cloudFoundryDeploy step
* added cf-cli docker image
* support existing parameters
* support check script with flexible STATUS_CODE
* add mandatory parameters
* fix compatibility handling
* address PR feedback
* fix access to smokeTest script
* make credentialsId mandatory to avoid NPE
2018-07-30 09:28:24 +02:00
Marcus Holl
d49a9ad68c Revert "remove the tool descriptor from neo deploy"
This reverts commit c3c7d8b142.
2018-07-27 14:09:08 +02:00
Florian Wilhelm
0a86c8534d
Improve check for batch mode in mavenExecute (#226)
The old naive check fails if an argument starts with '-B'. Now we use a
regular expression, which should correctly match if batch mode was
already supplied, and add it if not.
2018-07-26 16:03:05 +02:00
rodibrin
9e547cd605
Merge branch 'master' into pr/neoimage 2018-07-26 10:04:20 +02:00
Roland Stengel
c3c7d8b142 remove the tool descriptor from neo deploy 2018-07-25 15:23:56 +02:00
Marcus Holl
f16d5c766b Merge remote-tracking branch 'github/master' into HEAD 2018-07-25 12:26:20 +02:00
Christopher Fenner
aa57127e84
Merge branch 'master' into pr/readNestedProperties 2018-07-25 09:49:33 +02:00
Marcus Holl
411fd7fe62 Access to nested properties
yaml configuration supports nested properties. With this change
we can read those nested properties.
2018-07-25 09:47:16 +02:00
Marcus Holl
2a851abdfd Merge remote-tracking branch 'github/master' into HEAD 2018-07-23 09:41:02 +02:00
Marcus Holl
b65a5d5699 Release transport request: decouple tests
Focus on only one class under test, not having the step and the util class under
test at once.
2018-07-23 09:39:40 +02:00
Marcus Holl
43a9dcbcfd Do not fail immediatly in case commit history does not contain a changeDocumentId
we emit a log message and fail later at withManadotoryProperty check.
2018-07-19 10:26:34 +02:00
Marcus Holl
1e0fa0799e [fix] Remove early check for mandatory param 'changeDocumentId'
otherwise we will never try to read the change document id from commit history.
2018-07-19 10:09:24 +02:00
Marcus Holl
46f6587a97 Merge remote-tracking branch 'github/master' into HEAD 2018-07-19 09:17:07 +02:00
Marcus Holl
3effe404b0 Merge remote-tracking branch 'github/master' into HEAD 2018-07-19 08:54:57 +02:00
Marcus Holl
0678019efb Merge remote-tracking branch 'github/master' into HEAD 2018-07-18 12:49:41 +02:00
Marcus Holl
ab0a0c6882 Introduce CredentialsRule
Instead of configuring the credentials setup

  o withCredentials
  o usename

in each of our tests (for the moment change-management related)
we collect the common coding in a JUnitRule.
2018-07-18 12:45:30 +02:00
Marcus Holl
f2bf406dee Merge remote-tracking branch 'github/master' into HEAD 2018-07-18 12:42:54 +02:00
Marcus Holl
9d9c17d937 Merge remote-tracking branch 'github/master' into HEAD 2018-07-18 12:23:34 +02:00
Marcus Holl
3e3af733f2 Merge remote-tracking branch 'github/master' into pr/fixExceptionMessage 2018-07-18 11:45:48 +02:00
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