Hi.
I previously raised this issue on your Slack channel a couple of months ago where I think it was assigned to an engineer, but it still doesn’t seem to be fixed so I’ll raise it on these forums in case it has been forgotten or lost.
We have a Buildkite step like so that works fine on version 5 of the AWS Elastic Stack:
- label: ':docker: Docker build :php:'
agents:
docker: 'true'
queue: build
key: build_docker_php_image
plugins:
- artifacts#v1.9.0:
download: "public/admin/config/mandrill/*.html"
- docker-compose#v4.14.0:
build: php
cache-from: $ECR_REPO_URL:php-$BUILDKITE_BRANCH
image-name: php-$DOCKER_BUILD_TAG
image-repository: $ECR_REPO_URL
- ecr#v2.7.0:
login: true
<<: *automatic_retry
Where we have the following also defined in the pipeline for the variables that are referenced:
env:
DOCKER_BUILD_TAG: $BUILDKITE_BRANCH-$BUILDKITE_BUILD_NUMBER
ECR_REPO_URL: 759931498410.dkr.ecr.ap-southeast-2.amazonaws.com/$BUILDKITE_PIPELINE_SLUG
When switching to v6 (now on v6.7.1) the pipeline fails with the following error:
Running plugin docker-compose command hook
$ /var/lib/buildkite-agent/plugins/github-com-buildkite-plugins-docker-compose-buildkite-plugin-v4-14-0/hooks/command
/var/lib/buildkite-agent/plugins/github-com-buildkite-plugins-docker-compose-buildkite-plugin-v4-14-0/hooks/../commands/build.sh: line 79: cache_from__759931498410_dkr_ecr_ap_southeast_2_amazonaws_com/megatron: invalid variable name
🚨 Error: The command exited with status 1
The Buildkite agent version is unchanged in both stacks and is v3.55.0
I have also tried by specifying the cli-version: 2
option for the docker-compose
plugin with no change to the result.
If I remove the cache-from
directive then the step passes (but without the benefit of caching to speed things up).