I’m considering replacing Jenkins with Drone. I have some questions about the feature sometimes deferred to as “Promoted Builds” or “Manual Deploys”. We have a couple of use-cases. One is to manually re-deploy the previous build if the active build turns out to be problematic. The second use-case is to deploy a custom branch to a specific environment for a specific customer.
There are some references to a “drone deploy” command being used for this purpose, but I don’t see it in the drone 1.2.0 CLI. Is “drone exec” the replacement. The docs for “drone exec” are really lacking: https://docs.drone.io/cli/commands/drone-exec/ There is no text at all there to explain what seems like an important feature. The page doesn’t even document the existence of all the flags found when running drone help exec from the CLI.
For example, drone help exec documents the existence of a flag named --event as being for “build event names” and provides some examples “(push, pull_request, etc)”. Looking up the official docs for “drone exec” seems like a good place to find a link the full list of events implied by “etc”. but no such documentation exists here: https://docs.drone.io/cli/commands/drone-exec/
Also, in addition to have multiple environments like “develop” and “production”, we have production environments in multiple clusters in multiple countries. How would I express “deploy this custom branch to the production environment on our Canadian server?” My guess that I could use environment variables which contained the custom host name. Then when writing a custom step, I could reference the “host” environment variable I set.
Thanks! Drone looks promising and I look forward to continuing the evaluation.
One is to manually re-deploy the previous build if the active build turns out to be problematic. The second use-case is to deploy a custom branch to a specific environment for a specific customer.
Yes, Drone can handle both of these use cases.
There are some references to a “drone deploy” command being used for this purpose, but I don’t see it in the drone 1.2.0 CLI
the drone deploy command was renamed to drone build promote
the drone exec command runs your pipeline locally (e.g. on your laptop for testing purposes). This is not the command you are looking for
we have production environments in multiple clusters in multiple countries. How would I express “deploy this custom branch to the production environment on our Canadian serve
the promote command has a --param flag that you can use to pass key value parameters to the pipeline, which are available to the pipeline as environment variables. For example --param=REGION=canada. You could then use this environment variable in your deployment script or possibly in your yaml using substitution.
That all sounds, great. Thanks for the promote response.
I tried drone help build to learn more, but that outputs hardly anything I assumed that drone build --help would likely output the same docs, but I tried it anyway. This at least documented the subcommands of drone build. It looks like Drone has all the features we need and likely fewer of the headaches. It seems like the documentation is the one area of challenge for getting up speed with Drone.
We are aware that our documentation needs improvement. We have hundreds of pages of documentation and we probably need to write hundreds more pages. We are heavily resource constrained and we are doing the best we can with the limited resources we have.
I personally find the drone build --help command to be useful since it prints a list of all subcommands. If you want documentation for a specific subcommand you can use drone build <subcommand> --help, for example, drone build promote --help