Variables not evaluated before comparison with the list of allowed services
Summary
The variables $CI_REGISTRY_IMAGE and $CI_COMMIT_REF_NAME are apparently not evaluated before comparison with the list of allowed services.
Steps to reproduce
- Allow the project as registry service in the runner Docker configuration:
allowed_services = ["docker:*", "registry.example.com/example/project:*"]
- Build the project which uses the service
- see the Job log
Actual behavior
ERROR: The $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME is not present on list of allowed services
Expected behavior
The $CI_REGISTRY_IMAGE and $CI_COMMIT_REF_NAME variables are evaluated before the comparison
with the list of allowed services. In the example above, CI_REGISTRY_IMAGE:
CI_COMMIT_REF_NAME
could be evaluated to registry.example.com/example/project:latest, which would pass the configured
allowed_services setting.
This worked with gitlab-ci-multi-runner 9.3.0. Maybe the changes of !596 (merged) cause the issue?
Relevant logs and/or screenshots
ERROR: The $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME is not present on list of allowed services
- docker:*
- registry.example.com/example/project:*
Environment description
docker:17.06.0-ce
Used GitLab Runner version
Running with gitlab-ci-multi-runner 9.4.1 (d24b11c)