1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-12 10:55:20 +02:00
Commit Graph

88 Commits

Author SHA1 Message Date
Marcus Holl
45a2bfc4f7 shift coding for preparing defaultValueCache into that class
rather than having it in a pipeline step.

With that we avoid going back from a class in the src folder into
a pipeline step (vars).
2019-05-31 14:26:25 +02:00
Marcus Holl
6a551884e0 Merge remote-tracking branch 'github/master' into HEAD 2019-05-27 09:14:28 +02:00
Marcus Holl
c053dbca17 Add test null provided via signatur for extensions (also inside collection) 2019-05-24 13:55:29 +02:00
Marcus Holl
952c6bbe88 remove empty line 2019-05-24 09:22:16 +02:00
Marcus Holl
7899f17b68 [nameing] improve misleading variable name. 2019-05-23 10:19:49 +02:00
Marcus Holl
4b61f362d2 Removing syntactically not needed commas which helps keeping diff smaller 2019-05-23 09:23:36 +02:00
Marcus Holl
ed155ece63 rename mtaExtensionDescriptos to extensions 2019-05-23 09:20:10 +02:00
Marcus Holl
c59cb912dd docu: mtaExtensionDescriptors are only valid for deploy mode mta. 2019-05-22 08:24:14 +02:00
Marcus Holl
74af6bab5f Add extensions to neoDeploy
Extensions can be provided via --extension --e to the neo deploy command
line for deploy-mta. This commits adds support for providing extension files.
2019-05-16 09:13:23 +02:00
Marcus Holl
48c96a5a31 Avoid having the same string literal for the neo log folder three times 2019-05-10 13:47:14 +02:00
Marcus Holl
46367263b6 Merge remote-tracking branch 'github/master' into HEAD 2019-05-09 15:49:26 +02:00
Alejandra Ferreiro Vidal
0df4df8d58 neoDeploy: generate docu 2019-04-12 21:35:27 +02:00
Marcus Holl
fc93326805 Merge remote-tracking branch 'github/master' into HEAD 2019-04-12 13:13:31 +02:00
Marcus Holl
28fa30fc8f Do not swallow original excpetion when we have trouble to cat the logs 2019-04-12 10:06:18 +02:00
Christopher Fenner
dccaa780fc
cloudFoundryDeploy: return proper error message on deploy error (#651)
* return proper error message on deploy error

* fix typo

* provide meaningful error messages

* Update cloudFoundryDeploy.groovy

* Update cloudFoundryDeploy.groovy

* Update neoDeploy.groovy

* Update neoDeploy.groovy
2019-04-12 09:07:53 +02:00
Marcus Holl
dea2dbcbaa neoDeploy: assert deployable exists before starting deployment.
Up to now the presence of the deployable (source) was checked late
by the NeoCommandLineHelper. The code doing this is surrounded by
the try/catch which finally also puts the log written by the neo
toolset into the job log in case an exception occured.

The check for the deployable returns with the same type of
exception like a failed neo command. Hence we cannot distiguish (ok,
would be possible to parse the exception message, but that is ugly).
When the exception is triggered by the missing deployable we try to
cat the neo log into the job log. But at this point the neo log has
not been provided - neo has not been called at all in this case.
Hence `cat logs/neo/*` in turn fails.

In order to avoid such a failure we check now for the presence of the
deployable earlier before launching the neo toolset.

Since the deployable is used in any deploy mode case no further check
for the deploy mode is required prior to the check for the deployable.
2019-04-02 13:53:31 +02:00
Marcus Holl
2b1b743082 provide the log in case of a failure always, not only in docker context
from property dockerImage we cannot conclude that we are in fact running inside a docker environment.
Step dockerExecute has some checks if we are in a docker context. If not there is a fallback to the
local environment.

The docker image property is provided from resources/default_pipeline_environment (value: 's4sdk/docker-neo-cli').
Hence a value will be present all the time (exception: someone configured null/ empty string explicitly). So we
will enter the corresponding code block anyway.

It is IMO also desirable to have the neo log in the job log when running inside a non-docker setup since this
simplifies troubleshooting anyway.
2019-03-29 16:31:09 +01:00
Marcus Holl
1a36a775f4 Fix sanity checks for warPropertiesFile deploy mode. (#574)
* Fix sanity checks for warPropertiesFile deploy mode.

* improve tests for the sanity checks

The sanity checks are performed per deploy mode.
All parameters are checked at once.

* Explict check for host, account not found by sanity checks for deploy mode war properties
2019-03-20 12:14:57 +01:00
Marcus Holl
4d4b9de660 Merge remote-tracking branch 'github/master' into HEAD 2019-03-19 09:06:15 +01:00
Daniel Kurzynski
af740e1092
Make source for neo deployments configurable in the config file (#564) 2019-03-18 14:55:51 +01:00
Marcus Holl
adafab91e2 Perform parameter validation early, do not truncate parameters
In case of a mis-configuration we get a hint like "host is missing".
Actually it should be "neo/host is missing" since the parameter "host" is nested inside "neo".

Having simply "host" confuses the person troubleshooting this issue.

With this change the input validation is performed right at the beginning of the step.
The NeoCommandLine helper does not check a second time now.
2019-03-13 15:44:57 +01:00
Marcus Holl
5afaf9cb06 Merge remote-tracking branch 'github/master' into HEAD 2019-03-12 16:08:15 +01:00
Marcus Holl
a7bc198342 neo toolset not configurable (#484) 2019-03-07 12:53:25 +01:00
Marcus Holl
5c6f57f3cb Check for credentials id as part of input validation 2019-02-15 14:15:58 +01:00
Marcus Holl
262f39dfdd Removing check for neo deploy credentials id
since there is a default defined in default_pipeline_environment.

I believe there is a misunderstanding. The check checks if there is a valid defined for the
credentials id key. Since there is one definded in the default config this check will always
succeed.
This check does not check if there is a credential defined with this id via the Jenkins
Credentials Plugin. Maybe when this check was provided this was the intention. There is a
speaking error message provided by the credentials plugin in case the credentials lookup
fails.
2019-01-29 09:48:52 +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
10267ce7d1
Analytics: add step parameter keys (#442)
* add stepParamKey values

* camelCase
2019-01-21 08:47:34 +01:00
Marcus Holl
b7468a7ae4 Step name is not a string literal anymore
Having the step name always the same like the file name, which is in turn the class name is
redundant.
2018-11-29 09:54:05 +01:00
Marcus Holl
5c4007180c Merge remote-tracking branch 'github/master' into HEAD 2018-11-12 13:11:54 +01:00
Christopher Fenner
3c86a3c54d
add missing script (#377)
fixes #376
2018-11-09 07:42:33 +01:00
Marcus Holl
1b8e9d0e30 Emit more explicit warning in case old config framework is is use 2018-11-08 13:10:43 +01:00
Marcus Holl
b3c5cba707 Notify about old config framework from neo deploy. 2018-11-08 12:18:49 +01:00
Marcus Holl
2e8a9db02c script = this as fallback instead of map with cpe of current step
o The map does not provide access to e.g. sh, echo.

o this has the same cpe as property as it is constructed with the
current map approach.
2018-10-31 12:52:45 +01:00
Marcus Holl
ea23d65594 Merge remote-tracking branch 'github/master' into HEAD 2018-10-30 17:01:19 +01:00
Marcus Holl
11d34c2157 Step called without script: webanalytics 2018-10-30 16:24:48 +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
6653b68c0f Merge remote-tracking branch 'github/master' into HEAD 2018-10-18 12:54:32 +02:00
Marcus Holl
f47d540aa3 Introduce dedicated factory method for configuration helper 2018-10-17 11:15:37 +02:00
Christopher Fenner
01365295cb remove step return types 2018-10-11 09:10:26 +02:00
Marcus Holl
8db2aaf5f0 don't use load step defaults as implicit factory method. 2018-09-07 10:08:16 +02:00
Christopher Fenner
704c5a1a17
neoDeploy: add web analytics (#269)
* add web analytics

* Update neoDeploy.groovy

* Update neoDeploy.groovy
2018-08-30 11:03:34 +02:00
Marcus Holl
3a72d16185 neoDeploy with archvive from CPE 2018-08-17 15:46:46 +02:00
Christopher Fenner
5a742a310f
neoDeploy: switch to chained ConfigurationHelper (#244)
* switch neoDeploy to chained ConfigurationHelper

* update imports
2018-08-15 09:26:38 +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
Roland Stengel
c3c7d8b142 remove the tool descriptor from neo deploy 2018-07-25 15:23:56 +02:00
Roland Stengel
4851ba94bf drop NEO version verification - remove neo version check 2018-07-18 09:46:11 +02:00
Marcus Holl
097b9a4455 Better speaking variable name 2018-05-28 13:40:33 +02:00
Marcus Holl
b092957f7d put source parameter into common parameters 2018-05-28 13:40:33 +02:00
Marcus Holl
cb9318814c Condence more common code 2018-05-28 13:38:34 +02:00