Hello i have successfully setup and integrated one of my projects with drone… its amazing… however i found one issue that might be the key factor if i will be able to keep using this CI along with my other projects…
i have several other projects hosted in different servers, which uses different username + different ssh_keys (which i have no control over) what i am trying to do is have something like this
and the other options are listed as Parameter Reference
host
target
user
key
i have also tried without the plugin_ prefix only in the key and user but got the same error message: missing ssh config (Host, Username) which i believe is caused because the HOST is not available as a secret, so back to my original question, what i wanted to do is give the value to this HOST param dynamically.
that’s why i didn’t understand why prefixing host with plugin_ was allowed in your example but not user and key as all of them are listed as Parameter in the doc…
but still don’t quite understand why host, user and key are listed as params but couldnt work with the plugin_ prefix, is this something to do with the way this docker image script was build? maybe didn’t take this in consideration? or this parsing and replacing happens on the drone side? and this is potentially a bug? i would like to assume that every “Parameter” could be set dynamically by this secret trick but for some reason i don’t yet understand it didn’t worked out…
The system is behaving as expected. Aside from passing secret environment variable names as uppercase, drone does not transform or alter the secret environment variable names in any way.
Please note that secret names do not by default correspond to the yaml attribute names. To learn more about how yaml atrributes are passed to the plugin, you might find the following document helpful: http://docs.drone.io/creating-custom-plugins-bash/
You can reference the plugin source code to see which environment variables it reads: