1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-14 11:03:09 +02:00
Jenkins shared library for Continuous Delivery pipelines.
Go to file
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
.github Replace deprecated set-env github actions command (#2264) 2020-10-30 10:47:03 +01:00
.hooks chore(go): add pre-commit hook (#1006) 2019-11-27 21:16:01 +01:00
.pipeline Update config.yml (#2371) 2020-11-13 16:51:25 +01:00
.reuse compliance with reuse (#1910) 2020-08-11 11:53:42 +02:00
cfg Deploy mkdocs when merging to master 2018-03-12 09:58:32 +01:00
cmd feat: expose complete step metadata through generated function (#2329) 2020-11-20 08:13:59 +01:00
consumer-test Run consumer tests in GPP instead of Cloud SDK Pipeline (#2405) 2020-11-20 15:27:27 +01:00
contrib Allow to trigger release manually (#1359) 2020-04-03 16:26:53 +02:00
documentation Build and Publish Add-on Products on SAP Cloud Platform ABAP Environment: Move limitations to top (#2412) 2020-11-22 17:25:34 +01:00
integration Feature/approle secret id rotation (#2311) 2020-11-17 13:49:31 +01:00
LICENSES compliance with reuse (#1910) 2020-08-11 11:53:42 +02:00
pkg generator helper: support for map[string]interface{} (#2232) 2020-11-23 07:55:20 +01:00
resources feat: expose complete step metadata through generated function (#2329) 2020-11-20 08:13:59 +01:00
src/com/sap/piper Support additional volume mounts for cm related steps (#2287) 2020-11-13 13:45:30 +01:00
template remove !#groovy header 2019-05-23 10:37:28 +02:00
test dockerExecute: Wrap all code in docker.withRegistry() (#2384) 2020-11-17 14:53:09 +01:00
vars dockerExecute: Add compatibility aliasing for renamed params (#2391) 2020-11-17 17:44:19 +01:00
.codeclimate.yml chore: fix markdownlint findings (#2385) 2020-11-17 09:20:47 +01:00
.editorconfig Add golang implementation for karma tests (#919) 2019-10-25 14:58:59 +02:00
.gitignore chore(git): add binary file to ignore list (#2110) 2020-10-02 11:15:36 +02:00
.markdownlint.yml chore: fix markdownlint findings (#2385) 2020-11-17 09:20:47 +01:00
config.toml Add revive config for proper linting 2020-02-26 09:44:18 +01:00
DEVELOPMENT.md chore: fix markdownlint findings (#2385) 2020-11-17 09:20:47 +01:00
Dockerfile Reduce go binary size by updating to go 1.15 (#1968) 2020-09-17 08:44:42 +02:00
go.mod Retry capabilities for HTTP requests + enablement for Checkmarx step (#2346) 2020-11-11 13:35:53 +01:00
go.sum add package for Jenkins interactions (#2296) 2020-11-02 17:11:18 +01:00
LICENSE compliance with reuse (#1910) 2020-08-11 11:53:42 +02:00
main.go Step generation: allow usage of go generate (#1793) 2020-07-17 08:06:11 +02:00
pom.xml Protecode as GoLang (#1119) 2020-02-06 16:16:34 +01:00
README.md fix: markdownlint findings for MD012 (#2383) 2020-11-16 18:22:38 +01:00

Maintainability Test Coverage Go Report Card REUSE status

Project Piper Repository

The Project "Piper" offers default pipelines to easily implement CI/CD processes integrating SAP systems. The corresponding "Shared Library" provides a set of "steps" to build your own scenarios beyond defaults.

User Documentation

If you want to view the User Documentation of Project Piper please follow this Piper Pages Link.

Known Issues

A list of known issues is available on the GitHub issues page of this project.

How to obtain support

Feel free to open new issues for feature requests, bugs or general feedback on the GitHub issues page of this project.

Register to our google group in order to get updates or for asking questions.

Contributing

Read and understand our contribution guidelines before opening a pull request.