Comments (10)
We've just merged a PR that adds the following properties to the build api:
- pull_request_id
- pull_request_base_branch
- pull_request_repository
If added to
Lines 121 to 128 in 4b545cf
from ci-gate.
I spent a bunch of time digging into the buildkite source, the best work around I could come up with is documented at https://github.com/mvines/ci-gate#buildkite-configuration
I don't think using the commit sha will work, as when buildkite pulls the git project it won't pull the PR branches so the commit sha won't exist in the local clone (without that BUILDKITE_REFSPEC
override)
from ci-gate.
Here's a pointer to the part of buildkite agent that actually fetches from github:
https://github.com/buildkite/agent/blob/9912079678b2295b50dfae45332193abfbf68de4/bootstrap/bootstrap.go#L753
We really want b.PullRequest = true
somehow, so that this block executes but I could find no way to do this
from ci-gate.
Thanks for the context, that's super helpful :)
I spent a bunch of time digging into the buildkite source, the best work around I could come up with is documented at https://github.com/mvines/ci-gate#buildkite-configuration
I thought we uploaded a custom environment hook, but maybe we missed something. Will look at this again. (Will close if for some reason we didn't upload our environment hook correctly)
Edit - turns out we have our environment hook setup properly but are still seeing this often. Hunch is that this happens when we force push while a build is going..
from ci-gate.
So it seems like this is not an issue with the environment hook, we have that running ok. Currently debating if we want to run a fork of the agent temporarily /w a fix in place. Maybe @lox knows a workaround, or could say if they would accept a PR which could allow us to fall into the b.PullRequest = true
path.
from ci-gate.
Sounds like it might be related to buildkite/agent#782?
We have a PR internally that allows BUILDKITE_PULL_REQUEST
and BUILDKITE_PULL_REQUEST_BASE_BRANCH
to be set via the API to get that behaviour, would that fix the problem?
Otherwise, we are totally open to suggestions on agent changes to solve the problem.
from ci-gate.
We have a PR internally that allows BUILDKITE_PULL_REQUEST and BUILDKITE_PULL_REQUEST_BASE_BRANCH to be set via the API to get that behaviour, would that fix the problem?
I think that sounds like a pretty nice add to me that might solve this as well. Any thoughts @mvines ?
from ci-gate.
Did this end up working @KevinGrandon?
from ci-gate.
We now also support the environment variables BUILDKITE_PULL_REQUEST
and friends to do the same thing.
from ci-gate.
I think we had issues when passing along the PR details in build API, but I'm also not sure if we've had the race condition recently. I've been away from our open source stuff, but I'll try to do some more investigation soon.
Will reopen this or file a new issue if we're able to reproduce it.
from ci-gate.
Related Issues (20)
- Support buildkite log folding in public log
- Add visual indication in public_log when the job is not at rest HOT 1
- Support tunneling to buildkite build artifacts HOT 1
- Extract user whitelist from github API? HOT 1
- Add build pagination support for older builds
- Add support for a label to suppress CI HOT 1
- Automerge is broken while a build is running? HOT 3
- Clean up / document buildkite assumptions HOT 1
- Allow regular expression matching for public log whitelist HOT 1
- Unit testing HOT 2
- Flag 3rd party modifications to select files
- Trigger Buildkite builds for commits that land in master HOT 4
- Mechanism for 3rd party contributors to access buildkite logs HOT 4
- Add support for branch cherry picking HOT 1
- Support buildkite beta public pipelines
- Update README to discuss how we also manage public buildkite logs too. HOT 5
- Clean up buildkite public log when public steps all pass but a private step fails HOT 2
- Use GitHub checks API rather than labels to trigger CI HOT 1
- Add “accepted for CI” status even for write users HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ci-gate.