1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-14 11:03:09 +02:00
sap-jenkins-library/pkg/config
Oliver Feldmann 4f6b99cead
Don't allow empty strings as default container parameters (#2406)
First a bug fix is addressed in which the pull policy could not be configured to false by configuring the general configuration. It could neither be configured via dockerExecute or dockerExecuteOnKubernetes, even though this parameter is docker specific. Only by configuring the specific step where one wants to set the pull policy to false can it be configured.

As the bug stems from zero values being in the context config map, which is also addressed with this PR. That is the second part: Context config parameters are only set if they have a value.

* Don't set pull image if not configured

Otherwise, if the pull policy is not set explicitly for a step, dockerPullImage is set to true. Thus, before this change, it cannot be set in the general, or in dockerExecute or in dockerExecuteOnKubernetes configuration.

* Fix unit tests

* Add pullImage parameter test

* Do not place empty default values in context config

* Use putIfNotEmpty for sidecar container options

* Export common configuration

Keys that are set by both main and sidecar container can be exported

Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>
2020-12-10 11:28:39 +01:00
..
interpolation feat(vault): fetch secrets from vault (#2032) 2020-10-13 14:14:47 +02:00
mocks Avoid having the mocks in the productive binary (#2199) 2020-10-21 12:48:26 +02:00
config_test.go chore(go): simplify code using gofmt -s (#2065) 2020-09-24 08:58:53 +02:00
config.go Feature/approle secret id rotation (#2311) 2020-11-17 13:49:31 +01:00
defaults_test.go Provide first parts for golang implementation (#905) 2019-10-22 15:41:27 +02:00
defaults.go Reading defaults in go: Make sure all io.ReadClosers are closed (#1529) 2020-05-12 15:46:47 +02:00
errors_test.go Provide first parts for golang implementation (#905) 2019-10-22 15:41:27 +02:00
errors.go Provide first parts for golang implementation (#905) 2019-10-22 15:41:27 +02:00
flags_test.go Provide first parts for golang implementation (#905) 2019-10-22 15:41:27 +02:00
flags.go Checkmarx as golang (#1075) 2020-01-27 23:40:53 +01:00
resources.go Persisted pipeline environment for golang library (#1091) 2020-01-15 12:16:25 +01:00
stepmeta_test.go Don't allow empty strings as default container parameters (#2406) 2020-12-10 11:28:39 +01:00
stepmeta.go Don't allow empty strings as default container parameters (#2406) 2020-12-10 11:28:39 +01:00
vault_test.go consider alias during secret resolving (#2327) 2020-11-06 17:54:01 +01:00
vault.go Feature/approle secret id rotation (#2311) 2020-11-17 13:49:31 +01:00