-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Speed up "push" builds. #2480
Comments
Also worth noting that even if the files endpoint didn't exist, the PR endpoint has a
|
dhermes
added a commit
to dhermes/google-cloud-python
that referenced
this issue
Oct 5, 2016
dhermes
added a commit
to dhermes/google-cloud-python
that referenced
this issue
Oct 5, 2016
dhermes
added a commit
to dhermes/google-cloud-python
that referenced
this issue
Oct 5, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Travis has two build types that we use: "push" and "pull request". On a "pull request" commit the
TRAVIS_BRANCH
env. var. tells us what we are diff-ing against and makes it easy to limit the build jobs based on the changed files.In "push" builds, the best we have is
TRAVIS_COMMIT_RANGE
but this is not a very dependable value. I propose we rely instead on the GitHub API to determine the changed files.TRAVIS_COMMIT
(and theHEAD
commit in our local checkout) matches themerge_commit_sha
in the PR endpoint: https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/pulls/2450As an alternative to the first step, there is an "unpublished" API which helps associate a commit SHA with a PR. For example, see the parenthetical 2461 below:
which tells us that 4e8afa8 came as part of #2461. The actual API returns an SVG with the payload containing
The API simply requires the commit hash in
TRAVIS_COMMIT
(i.e. just theHEAD
commit on our local checkout), e.g. https://github.com/GoogleCloudPlatform/google-cloud-python/branch_commits/4e8afa8c3877376d7e9a6df79e6a272ae1cdfee7@tseaver @jonparrott PTAL and LMKWYT
FYI this will build on top of work done for #2277.
The text was updated successfully, but these errors were encountered: