Run pipeline manually for any forked repo

I forked a main repo and named it something and created a new pipeline on buildkite and now I want to build manually on that new pipeline from that forked repo.
suppose I have a repo “abc” and I forked it privately. That created a branch (‘patch-1’) and then we created a new pipeline on buildkite and committed something on the repo. Now I want to build manually on that new pipeline using this new branch (‘patch-1’)
there is a env variable “BUILDKITE_REPO” but while creating a build when we are providing a repo url of that forked repo in UI in env variable it is still building build for that main pipeline, we are new to buildkite so, any help will be appreciated…

Hi @Avnshrai welcome to the forum! :wave:

I’m just trying to understand what you’ve done so far and what you are wanting to achieve. You’ve created a fork of a repo and a new pipeline intended to build the fork? Or are you wanting to use the old pipeline to build the forked repo?

If the former, since you’ve created a new pipeline, you can configure it in settings to point to the fork. It doesn’t need to know anything about the original repo and should just work without modifying the env vars.

However, the latter is a bit difficult. You can’t set the BUILDKITE_REPO env var in the UI as it is protected. You would need to use an environment hook to override it at runtime.

We might be able to provide more concrete information if you email us at support@buildkite.com with details of the repo and pipeline you are working with as well.

Hi @jarryd thank you for your quick response and I was trying to use a forked repo to build a old pipeline and as you told me to override it at runtime to achieve that I wrote a script inside environment hook to override the BUILDKITE_REPO and it worked like a charm…
thanx for your help :grin:

That’s great news @Avnshrai. Happy to help!

1 Like