-
Notifications
You must be signed in to change notification settings - Fork 391
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
Mention which PR triggered build in Helm Chart Commit Message #405
Mention which PR triggered build in Helm Chart Commit Message #405
Conversation
…m charts This should make slightly easier to figure out which PRs are in a helm chart, and have descriptive PRs when updating mybinder.org-deploy
helm-chart/build.py
Outdated
@@ -154,10 +154,14 @@ def publish_pages(name, paths, git_repo, published_repo): | |||
os.path.join(checkout_dir, f) | |||
) | |||
subprocess.check_call(['git', 'add', '.'], cwd=checkout_dir) | |||
if extra_message: | |||
exta = '\n\n%s' % extra_message |
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.
extra
@@ -13,7 +13,7 @@ echo -e "hub:\n url: $HUB_URL" > helm-chart/travis-binder.yaml | |||
|
|||
echo "building helm chart" | |||
cd helm-chart | |||
./build.py --commit-range ${TRAVIS_COMMIT_RANGE} | |||
./build.py --commit-range ${TRAVIS_COMMIT_RANGE} --extra "${TRAVIS_REPO_SLUG}$(git log -1 --pretty=%B | head -n1 | sed 's/^.*\(#[0-9]*\).*/\1/')" |
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.
I guess this magically only displays the commits that are being added?
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.
Well, actually as binderhub is being build for each merged PR, then it only extract the PR number.
${TRAVIS_REPO_SLUG}
isjupyterhub/binderhub
log -1
logs only the latest commit--pretty=%B
only the message
As the message is Merge PR #123 into master
, sed 's/^.*\(#[0-9]*\).*/\1/')"
extract the number.
Thus extra
is only jupyterhub/binderhub#123
.
It will of course not work if we push commits directly.
I think it's a good idea! Can you paste what a sample output looks like? I looked through the travis logs but it doesn't seem to be building there so maybe this only shows up in an actual deployment? |
Can you integrate this into the build.py of z2jh too, @Carreau? |
(and thanks for the patch!) |
Good idea, I'll add on My todo list. |
This should make slightly easier to figure out which PRs are in a helm
chart, and have descriptive PRs when updating mybinder.org-deploy