Only run build step for particular branch

We are using git branches for development and have a build definition setup to track all branches. We run build the code and run tests, we then want to create an octopus deploy release, but only on the master branch. I saw an open feature request:

http://youtrack.jetbrains.com/issue/TW-17939

Do I need to wait for this feature, or is there a way to achieve what I want to do now?

2 comments
Comment actions Permalink

Did you ever find a way of achieving this? Seems like such a feature is going to land in the next version 2020.1: https://youtrack.jetbrains.com/issue/TW-17939?_ga=2.171926758.716234206.1578910166-1009962424.1551694387

0
Comment actions Permalink

While we hope we can implement it for the release, please keep in mind that we will need to ensure it works properly before releasing, and as it's not implemented yet, we cannot guarantee it will make it into the next major release. Once the issue is updated with a "Fixed in build" value, then it will be good to go.

 

In the meantime, this is easily achievable by simply separating the deployment step into a separate build configuration, making that one depend on the initial one but only triggering it for master. For more complex scenarios, two separate sets of build configurations, one for each behavior desired is the recommended way to go.

0

Please sign in to leave a comment.