From 31c71df1588d14d0d6c83f3748b02f1752e5fec6 Mon Sep 17 00:00:00 2001 From: Rodrigo Carvalho Date: Thu, 29 Feb 2024 20:09:21 +0100 Subject: [PATCH] Update drone-build-promote.md This PR is intend to clarify the usage and give instruction on how to pass parameters to drone build promote. I have added an example section of pipeline being injected by parameters. Hope that way helps drone community to use parameters via drone cli. --- content/cli/build/drone-build-promote.md | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/content/cli/build/drone-build-promote.md b/content/cli/build/drone-build-promote.md index 9b58ddd87..e554d7de8 100644 --- a/content/cli/build/drone-build-promote.md +++ b/content/cli/build/drone-build-promote.md @@ -20,10 +20,21 @@ OPTIONS: --param value, -p value custom parameters to be injected into the job environment. ``` -Example usage, promotes a build by build number: +Example usage promotes in the pipeline: ``` -$ drone build promote octocat/hello-world 42 production +kind: pipeline +name: default + +steps: +- name: test + image: node + environment: + foo: ${foo} + baz: ${baz} + commands: + - npm install + - npm test ``` Example usage, with custom parameters: @@ -32,4 +43,4 @@ Example usage, with custom parameters: $ drone build promote octocat/hello-world 42 production \ --param=foo=bar \ --param=baz=qux \ -``` \ No newline at end of file +```