I’m successfully using successfully the new dropdown feature of Gitlab [15.7.5-ee] and use its value as variable to a docker image in one of my stages. I.e.
...
variables:
AUTOMATION_TESTING:
value: ""
options:
- ""
- my_docker:v1.0
...
automation testing:
image:
name: ${AUTOMATION_TESTING}
...
Now things need to become more dynamic a use the AUTOMATION_TESTING variable to store one more mapped value to this specific docker for internal docker use, so “my_docker:v1.0” will now become “my_docker:v1.0:mapped-value” and somehow hide the “mapped-value” when passing it to image->name. For example:
automation testing:
image:
name: ${AUTOMATION_DOCKER}
rules:
- if: $AUTOMATION_TESTING
variables:
AUTOMATION_DOCKER=$(echo $AUTOMATION_DOCKER | awk -F':' '{print $NF}' )
This of course doesn’t work. I also tried to place variables inside the options of AUTOMATION_TESTING variable, but they become literals.
Do you know of any meaningful approach to this situation, having in mind I want to keep the dropdown menu?