Drone build start param option syntax


I am wondering how the param option works with the drone build start command. I’m trying to fork a build with new injected parameters, but it doesn’t seem to work.

The build gets created, but the variable isn’t injected (if I echo $MY_PARAM there’s nothing).

drone build start --fork --param MY_PARAM=1 owner/repo 44 doesn’t work
drone build start --fork --param=MY_PARAM=1 owner/repo 44 doesn’t work either
drone build start --fork --param="MY_PARAM=1" owner/repo 44 same
drone build start --fork --param "MY_PARAM=1" owner/repo 44 same

The documentation only says the format is KEY=value, which is a bit vague. I’ve tried all those ways and so far, my pipeline never receives the variable i set up in the param option.

I found out why it didn’t work in my case, I was reading the variable wrong.

But as an answer for anyone wondering about the syntax, it is --param "MY_PARAM=1"

1 Like