Problem to solve
Describe your question in as much detail as possible:
Hello Folks,
I am trying to use the array type recently introduced in the GitLab Component. I am a bit blocked with the syntax. Below is a glimpse of the existing template that I used. I am not able to fetch the value out of the inputs for some reason.
Configuration
spec:
inputs:
container_image_tag:
type: array
default:
- ${CI_COMMIT_SHA}
- latest
description: "Container Image Tags"
build-container-image:
stage: build
image: alpine:latest
script: |
tags=$[[ inputs.container_image_tag ]]
for tag in "${tags[@]}"
do
echo $tag
done
Output
/busybox/sh: eval: line 186: latest]: not found25
Versions
- Self-managed
- 17.0.x instance and runner as well