Closed cwalo closed 6 years ago
You can achieve this by setting a branch filter with an extremely unlikely branch name (like, say, please/dont/build/anything
), which will mean that we build nothing based on push. Then under your repository provider settings (GitHub, GitLab, etc.) configuring it to only build tags, so you’d end up with a configuration like this:
The reason this works is that builds triggered from Pull Requests or Tags ignore the global branch filter and operate with their own configuration!
I hope we can make this sort of setup simpler in the future. 😄
@ticky Ah, a little hacky, but good enough for now! Thanks!
Hi, may I know how to configure building on pushed tag on gitlab repo? There is no gitlab settings section on buildkite pipeline settings. After I enable the webhook with gitlab and select Tag push events trigger, no matter I create tag on gitlab or git push tag remotely, it actually nothing happened on buildkite.
"The reason this works is that builds triggered from Pull Requests or Tags ignore the global branch filter and operate with their own configuration!"
@ticky is this still the case? After setting a branch filter and configuring to build tags as suggested no builds are triggered when I push a tag up...
The reason I ask is that the Build pull requests configuration has a comment saying pipeline-level branch filtering is ignored but the Build tags configuration does not.
@ticky - I am unable to find the setting in Github. which you have mentioned.can you please help to find out
@oj22 👋 ah sorry, the setting is in Buildkite - not GitHub.
In Buildkite, go to your Pipeline Settings:
Then the GitHub Settings:
You'll see the option in here:
It doesn't seem to work anymore (at least in my setup).
If on GH webhook you choose to send only Branch or tag creation
event it doesn't trigger the build.
So if you add event Pushes
in GH webhook it starts. But it treats tag same way as branch, so specifically wrong branch name doesn't work anymore.
So you can solve this by naming tags like release-x.y.z
and setting branch filter pattern to release-*
or something similar
We'd like to only trigger builds by pushing a tagged commit. Currently, it looks like our only options are to use
[skip ci]
for every other commit or just use the buildkite API with some other github webhook. Do I have that right?-Corey