This is a brief write-up to let everyone using drone:0.5
that we are planning some breaking changes
In 0.4 secrets were passed to the build through the yaml, similar to docker-compose:
pipeline:
publish:
image: plugins/docker
username:${DOCKER_USERNAME}
password: ${DOCKER_PASSWORD}
In 0.5 secrets were passed directly to the container as environment variables:
docker run -e DOCKER_USERNAME=... -DOCKER_PASSWORD=... plugins/docker
The goal with this change was to provide additional control of where secrets were exposed. For example, we could instruct drone to only expose Docker secrets to the Docker plugin.
These changes were very well intentioned, however, it turned out to be very user unfriendly. It became clear that since drone was a superset of docker-compose, users expected the ${variable}
syntax to work for secrets. There were also many, many, many support cases were individuals couldn’t figure out the correct matching logic for white-listing which secrets would be exposed to which containers.
It became apparent that we needed to reconsider this change before cutting an 0.5 release. It was discussed over the past weeks, and finally today I decided to re-enable interpolation of secrets. This change is effective immediately in the latest image and CLI tools.
The documentation has been updated to reflect this change.
Please note that right now we are supporting both ${variable}
syntax and passing secrets as environment variables. This means your existing repositories and configurations will work just fine for the time being. Passing secrets is, however, considered deprecated and will be removed in the coming weeks. Please consider changing your configurations to use ${variable}
syntax sooner rather than later.