# Promoting a build by branch

**URL:** <https://drone.discourse.group/t/promoting-a-build-by-branch/10639>\
**Category:** Drone Support\
**Created:** [June 3, 2019, 9:15pm UTC](https://drone.discourse.group/t/promoting-a-build-by-branch/10639 "2019-06-03T21:15:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![cyrillay](https://avatars.discourse-cdn.com/v4/letter/c/b782af/32.png) [@cyrillay](https://drone.discourse.group/u/cyrillay)\
**Post date:** [June 3, 2019, 9:15pm UTC](https://drone.discourse.group/t/promoting-a-build-by-branch/10639/1 "2019-06-03T21:15:03Z")

</div>

Hey there !

Is it still possible to promote a build from a repo on a specific branch ? I saw [this comment](http://discuss.harness.io/t/manually-trigger-a-build/874/4) (EDIT: original comment deleted) but I am still unable to do it, I get `Incorrect Usage: flag provided but not defined: -branch`, and I didn’t see anything about this argument in [drone-cli/drone/build/build\_promote.go](https://github.com/drone/drone-cli/blob/master/drone/build/build_promote.go)

Thanks in advance !

---

<div class="post-metadata">

**Author:** ![bradrydzewski](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/bradrydzewski/32/3513_2.png) [@bradrydzewski](https://drone.discourse.group/u/bradrydzewski)\
**Post date:** [June 3, 2019, 9:49pm UTC](https://drone.discourse.group/t/promoting-a-build-by-branch/10639/2 "2019-06-03T21:49:10Z")

</div>

Drone does not support `--branch` for build promotions. The referenced comment is unfortunately inaccurate.

---

<div class="post-metadata">

**Author:** ![cyrillay](https://avatars.discourse-cdn.com/v4/letter/c/b782af/32.png) [@cyrillay](https://drone.discourse.group/u/cyrillay)\
**Post date:** [June 4, 2019, 12:05am UTC](https://drone.discourse.group/t/promoting-a-build-by-branch/10639/3 "2019-06-04T00:05:34Z")

</div>

Thanks for the answer ! Has this feature already been requested ?

I would like to use the promotion feature for deployment, but very often I have the usecase of deploying the application from a feature branch, and leave it in production for a few until actually merging with master.

---

<div class="post-metadata">

**Author:** ![bradrydzewski](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/bradrydzewski/32/3513_2.png) [@bradrydzewski](https://drone.discourse.group/u/bradrydzewski)\
**Post date:** [June 4, 2019, 12:12am UTC](https://drone.discourse.group/t/promoting-a-build-by-branch/10639/4 "2019-06-04T00:12:57Z")

</div>

The `drone build promote` feature promotes an existing build. When you push to your feature branch it will execute a Drone build. You can then promote this build, by build number, to the target environment. You can then promote the build, by build number, to production.

---

<div class="post-metadata">

**Author:** ![cyrillay](https://avatars.discourse-cdn.com/v4/letter/c/b782af/32.png) [@cyrillay](https://drone.discourse.group/u/cyrillay)\
**Post date:** [June 4, 2019, 12:17am UTC](https://drone.discourse.group/t/promoting-a-build-by-branch/10639/5 "2019-06-04T00:17:03Z")

</div>

Ah yes that’s right absolutely ! Got confused for some reason, was running into errors because the version of the drone CLI I was using wasn’t matching the one from the server.

Thanks a lot !
