Jenkins: auto-merge pull-requests to dev

Description

Goal: automate the process of merging a PR to dev(/master), building, running all tests and feeding a report to Sonar so that by the time a PR is ready for review the reviewer already knows if the resulting merge builds, and what the test and quality gate report is so that he/she may focus on the other PR aspects.

Potential approach:

  • GitHub web-hook sends a PR notification to app

  • app checks out dev, makes branch with name indicative of the branch's merge (e.g. dev-myFeature) and merges in myFeature branch

  • Sonar name set to indicate what it is

  • Jenkins notices and starts build

  • Jenkins starts Sonar

  • human reviews and merges or denies PR

  • github webhook sends PR close/deny notification, deletes branch, deletes from sonar

Notes:

  • would require new commits on branch or dev to re-trigger above so that review is done on latest

  • would like for cleanup to understand difference between deny and success of PR - a denied PR we might want to point author of to Sonar results

Assignee

Unassigned

Reporter

Josh Zamor

Labels

Components

Priority

Trivial
Configure