What is the secret-file format?

I’m unable to find the exact format or any kind of example of what a secret-file should look like for drone cli. I understand that it’s a yaml format but I’m not understanding what that looks like.

I thought this would be something like this but that isn’t working (drone 1.1):

ssh_key: <maybe a key in quotes?>
ssh_port: 12345

I apologize if I’ve missed current documentation somewhere.

P.S. my current work-around (and, more secure?) is something like the following whereby I replace from_secret declarations with environment variables in .drone.yml:

# command line
SSH_KEY=$(cat /home/<username>/.ssh/id_rsa) SSH_PORT=2222 sudo -E bash -c 'drone exec' 

uses the format defined here https://github.com/joho/godotenv#usage

basically just a simple KEY=VALUE format.

1 Like