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

Proposal: Merge PR branch onto master in Jenkins checkout phrase #396

Closed
cofyc opened this issue Apr 16, 2019 · 6 comments
Closed

Proposal: Merge PR branch onto master in Jenkins checkout phrase #396

cofyc opened this issue Apr 16, 2019 · 6 comments

Comments

@cofyc
Copy link
Contributor

cofyc commented Apr 16, 2019

checkout([$class: 'GitSCM', branches: [[name: "${BUILD_BRANCH}"]], userRemoteConfigs:[[url: "${BUILD_URL}", credentialsId: "${CREDENTIALS_ID}"]]])

->

checkout([$class: 'GitSCM', branches: [[name: "${BUILD_BRANCH}"]], userRemoteConfigs:[[url: "${BUILD_URL}", credentialsId: "${CREDENTIALS_ID}"]], mergeRemote: 'origin', mergeTarget: 'master', fastForwardMode: 'NO_FF'])

xref: https://jenkins.io/doc/pipeline/steps/workflow-scm-step/

Currently, CI job checkouts PR branch to test, but the PR branch may be out of date.

It's best and convenient to merge the PR branch onto master before running the CI job. And it helps when the broken master is fixed, blocked PRs are not needed to be rebased onto the new master. (example #392 (comment))

@cofyc
Copy link
Contributor Author

cofyc commented Apr 16, 2019

cc @tennix @weekface

@weekface
Copy link
Contributor

I am fine with it @onlymellb PTAL

@cofyc
Copy link
Contributor Author

cofyc commented Apr 17, 2019

Another way is to enable "Require branches to be up to date before merging" in github repo settings.

@cofyc
Copy link
Contributor Author

cofyc commented Jul 16, 2019

@weekface It seems that we have "Require branches to be up to date before merging" enabled?

@weekface
Copy link
Contributor

yes

@cofyc
Copy link
Contributor Author

cofyc commented Jul 16, 2019

Then I think we can close this now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants