I just try to inject a kontena token (to deploy latest build) via kontena vault and drone PLUGIN_PARAMS, but it seems that drone don’t care about the variable PLUGIN_PARAMS set as an environment variable. Is that right? Or can a pass PLUGIN_PARAMS to drone inside the docker container?
An other question: is it possible to get into the drone-container to verify the environment variables? I tried it with docker exec -it XYZ bash and sh, but without success.
Drone 0.5 no longer interpolates secrets in the .drone.yml file, that means that this will not work:
environment:
- KONTENA_TOKEN=$$KONTENA_TOKEN
The solution is quite simple however; secrets are available to all allowed plugin containers as environment variables. This means that your KONTENA_TOKEN environment variable will already be available if you add it as a secret.
I’ve never heard of PLUGIN_PARAMS. But this will work: instead of adding PLUGIN_PARAMS as secret, add KONTENA_TOKEN instead.
As for your other question, I’m not quite sure what you mean by “verify”.
If you want to see what environment variables are injected into your container, you can dry dumping all the environment vars:
I just add a secret via “drone secret add …” and then “drone sign organisation/project” but I still got a “WARNING: unable to verify the Yaml signature.”
I tried to re-generate .drone.yml.sig, but git don’t recoginze changes. Hmm??