1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-12 10:55:20 +02:00
sap-jenkins-library/pkg
Marcus Holl f3f221ee80
generator helper: support for map[string]interface{} (#2232)
Up to now the code generator is not able to handle the type
map[string]interface{} which is important for nested
configurations.

With that change we support such nested configuration.

Fo now parameters with a map type are not supported via
command line parameters. Those parameters are simply
ommitted. But with this change is it possible to read
such nested structures from the pipeline configuration
(.pipeline/config.yml).

As a next step we can discuss if we would like to support
such values also via command line parameters. One possible
approach could be

```
./piper <command> -myParam key1=val1 --myParam key2=val2
```

which gets finally collected inside our map:

```
map["key1"] = "val1"
map["key2"] = "val2"
```

This is of course hard to do for deeper nestings. In that case
providing a pointer to a file might be more suitable.

In that context we need to consider how to
  - declare the default values for map like parameters in our
    metadata files.
  - deal with the different types we have for the parameter
    itself wrt the yaml like config on the one hand and on the
    level of the command line parameters on the other hand. Maybe for
    that we have to extend the metadata format (e.g. describe an
    alternate type receiving the values from the command line, like
    []string. With that approach values for simple nested (... not deep
    nested) params can be provided like described above, it would be
    possible to represent these parameters for the command line parser
    as string slice entries like "[]string{key1=val1, key2=val2". These
    parameters needs in this case transformed "by us" into the map we
    use further down the road.

In case we agree in principle on an approach as outlined here we should
adjust the golden files reflecting this use case.
2020-11-23 07:55:20 +01:00
..
abap Refactor build framework steps (#2068) 2020-09-30 16:40:36 +02:00
abaputils Remove assert.Error right before assert.EqualError (#2344) 2020-11-11 14:14:55 +01:00
checkmarx checkmarxExecuteScan: Relax timeout (#2265) 2020-10-29 18:03:22 +01:00
cloudfoundry Vars handling centralized (#1934) 2020-09-24 09:39:18 +02:00
command fix(typo): found by misspell (#2064) 2020-09-24 07:41:06 +02:00
config Feature/approle secret id rotation (#2311) 2020-11-17 13:49:31 +01:00
docker kanikoExecute: improve user experience (#2141) 2020-10-14 11:13:08 +02:00
documentation (documentation) Vault Setup documentation (#2366) 2020-11-16 11:53:52 +01:00
fortify fortifyExecuteScan: improve error categorization (#2295) 2020-11-11 13:04:45 +01:00
generator generator helper: support for map[string]interface{} (#2232) 2020-11-23 07:55:20 +01:00
git Remove assert.Error right before assert.EqualError (#2344) 2020-11-11 14:14:55 +01:00
github Add step for GitHub branch protection check (2) (#2016) 2020-09-14 12:05:12 +02:00
hadolint/mocks refactor(hadolint): implement step in GO (#1169) 2020-11-16 15:14:54 +01:00
http Retry capabilities for HTTP requests + enablement for Checkmarx step (#2346) 2020-11-11 13:35:53 +01:00
jenkins Feature/approle secret id rotation (#2311) 2020-11-17 13:49:31 +01:00
log fix(permissions) allow deletion of errors file (#2293) 2020-11-02 12:34:28 +01:00
maven Refactor maven utils and add tests for install artifacts (#2318) 2020-11-10 17:14:55 +01:00
mock Refactor maven utils and add tests for install artifacts (#2318) 2020-11-10 17:14:55 +01:00
nexus Extend nexusUpload to also handle npm (#1379) 2020-04-11 12:56:44 +02:00
npm npmExecuteScripts: allow passing a list of build descriptors to execute scripts for (#2312) 2020-11-04 16:20:26 +01:00
piperenv kanikoExecute: improve user experience (#2141) 2020-10-14 11:13:08 +02:00
piperutils Add step abapEnvironmentCreateSystem (#2273) 2020-11-03 12:02:13 +01:00
protecode chore(go): simplify code using gofmt -s (#2065) 2020-09-24 08:58:53 +02:00
sonar Remove assert.Error right before assert.EqualError (#2344) 2020-11-11 14:14:55 +01:00
telemetry Telemetry: report error category (#2085) 2020-09-29 13:49:40 +02:00
vault Feature/approle secret id rotation (#2311) 2020-11-17 13:49:31 +01:00
versioning Refactor maven utils and add tests for install artifacts (#2318) 2020-11-10 17:14:55 +01:00
whitesource Refactor maven utils and add tests for install artifacts (#2318) 2020-11-10 17:14:55 +01:00
yaml chore(go): simplify code using gofmt -s (#2065) 2020-09-24 08:58:53 +02:00