Skip to content
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

fix(discover branches): keep "PR branches" option #171

Merged
merged 3 commits into from Apr 11, 2019

Conversation

frickjack
Copy link
Contributor

This PR is in response to the branch-discovery help text:
"
Only branches that are also filed as PRs
This option exists to preserve legacy behaviour
when upgrading from older versions of the plugin.
NOTE: If you have an actual use case for this option
please file a pull request against this text.
"

We have a Jenkins pipeline that deploys dockers for
pull requests to a k8s cluster. The Dockers are
built by a separate process, and tagged with the
branch name, so we want our k8s-deploy pipeline
to be fed the PR branch name in env.GIT_BRANCH,
so it can reference the appropriate docker.

Hope that makes sense.

This PR is in response to the branch-discovery help text:
"
Only branches that are also filed as PRs
This option exists to preserve legacy behaviour
when upgrading from older versions of the plugin.
NOTE: If you have an actual use case for this option
please file a pull request against this text.
"

We have a Jenkins pipeline that deploys dockers for
pull requests to a k8s cluster.  The Dockers are
built by a separate process, and tagged with the
branch name, so we want our k8s-deploy pipeline
to be fed the PR branch name in env.GIT_BRANCH,
so it can reference the appropriate docker.

Hope that makes sense.
@AnneTheAgile
Copy link

@frickjack this is so much clearer! could you change the title of this PR to indicate it's just a documentation change?
I hope it will be merged :)

Copy link
Member

@stephenc stephenc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note on PRs the CHANGE_BRANCH variable has the name you are after and CHANGE_TARGET is the target branch name... not sure if that might modify your use-case

@@ -8,8 +8,8 @@
</dd>
<dt>Only branches that are also filed as PRs</dt>
<dd>
This option exists to preserve legacy behaviour when upgrading from older versions of the plugin.
NOTE: If you have an actual use case for this option please file a pull request against this text.
Similar to discovering pull requests directly, but env.GIT_BRANCH is set to the branch name rather than PR-#,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clarify that it is just origin pull requests.

This option exists to preserve legacy behaviour when upgrading from older versions of the plugin.
NOTE: If you have an actual use case for this option please file a pull request against this text.
Similar to discovering pull requests directly, but env.GIT_BRANCH is set to the branch name rather than PR-#,
and github pull-request checks are not updated.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be better to reword as something like “the status notification for the build will only be applied to the commit, the pull requests status will not be updated” (my text needs revision, but should point you in the direction more clearly

@bitwiseman
Copy link
Contributor

@frickjack @stephenc
Is this PR still valid?

@stephenc
Copy link
Member

The PR is still valid but I think my comments also still need addressing

@bitwiseman bitwiseman merged commit e5166c4 into jenkinsci:master Apr 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants