-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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
Travis performance improvement #13304
Conversation
Deploy preview for kubernetes-io-master-staging ready! Built with commit 026a9d8 https://deploy-preview-13304--kubernetes-io-master-staging.netlify.com |
9b9a8f7
to
43f6e3f
Compare
43f6e3f
to
c18ad77
Compare
set -e | ||
|
||
# List files changed in the commit to check | ||
FILES=`git log -n 2 --name-only --format=""` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tengqm do you need the last 2 commits or only latest one ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question. It has to be 2 because according to the travis log, the following operations are automatically performed during environment preparation:
git clone --depth=50 https://github.com/kubernetes/website.git kubernetes/website
cd kubernetes/website
git fetch origin +refs/pull/<PR number>/merge:
git checkout -qf FETCH_HEAD
After the above operations, the latest two commits to website repo are the 'merge' operation and the actual changes made by your PR. The "-n 2
" was carefully chosen to ensure we are examining exactly the set of files touched by the PR under testing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah right - missed that info, thank you for the details @tengqm .
a05cde0
to
984f50a
Compare
Three optimizations: - move example testing logic into a bash script to save travis specific commands; - use kubernetes release package (about 20MB) instead of git repo (about 800 MB at the moment); - detect whether a PR contains changes to examples and skip examples testing if not. Closes: kubernetes#13140
984f50a
to
026a9d8
Compare
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: zacharysarah The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Three optimizations: - move example testing logic into a bash script to save travis specific commands; - use kubernetes release package (about 20MB) instead of git repo (about 800 MB at the moment); - detect whether a PR contains changes to examples and skip examples testing if not. Closes: #13140
Three optimizations:
at the moment); this cuts the example testing time from ~7 minutes to ~3 minutes;
This further reduces the example testing job from ~3 minutes to ~1 minute for most PRs.
Closes: #13140