Add Additional Component Input Types for Map and List
<!--IssueSummary start--> <details> <summary> Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards. </summary> - [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=467493) </details> <!--IssueSummary end--> # Issue When using GitLab components, there is a use case for `map` and `list` data types. An example of this is the following: 1. I am developing a component for testing a specific language, that will be used by an indeterminant number of product teams 2. I want to leverage GitLab service containers as a way to standup ephemeral infra so integration tests fully exercise (redis, sql, ...) 3. I am not sure off hand what data stores the teams are using, so it will be dynamic in understanding which services to include In the example above, I cannot make the services dynamic without generating the job definition and running it as a downstream pipeline. I have another use case like the following: 1. I am developing a component for building and testing a specific language 2. Some data I might need to understand is a listing of files to include in the build/test 3. Some data I might need is a list of slack channels to report errors to 4. Some data I might need is a list of versions to tag the resulting image build from 5. To accomplish this today, I need to define a `string` input type and put regex validation on it to ensure teams enter with the right delimiter 1. It would be nice if we could just represent the array and handle the joining of data under the hood --- # Proposed Design ```yaml spec: inputs: services: type: list description: ... items: type: string regex: ... optional: !!bool additionalEnvVars: type: map description: ... optional: !!bool --- my-job: services: - redis:1.2.3 $[[ range $service in inputs.services ]] - $service $[[ end ]] variables: MY_VAR: value $[[ range $k,v in inputs.additionalEnvVars ]] $k: $v $[[ end ]] ```
issue