Skip to content

Commit

Permalink
Merge pull request #3 from fgimenez/rebase-suppress-hello
Browse files Browse the repository at this point in the history
Rebase suppress hello
  • Loading branch information
directhex committed Mar 21, 2016
2 parents a13c5e7 + d2e8caa commit c5b08ef
Showing 71 changed files with 3,638 additions and 1,380 deletions.
File renamed without changes.
144 changes: 144 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -62,6 +62,7 @@ For more details, see https://wiki.jenkins-ci.org/display/JENKINS/GitHub+pull+re

### Credentials
* If you are using Enterprise GitHub set the server api URL in ``GitHub server api URL``. Otherwise leave there ``https://api.github.com``.
* Set the Jenkins URL if you need to override the default (e.g. it's behind a firewall)
* A GitHub API token or username password can be used for access to the GitHub API
* To setup credentials for a given GitHub Server API URL:
* Click Add next to the ``Credentials`` drop down
@@ -104,9 +105,152 @@ Make sure you **DON'T** have ``Prune remote branches before build`` advanced opt
#### Parameterized Builds
If you want to manually build the job, in the job setting check ``This build is parameterized`` and add string parameter named ``sha1`` with a default value of ``master``. When starting build give the ``sha1`` parameter commit id you want to build or refname (eg: ``origin/pr/9/head``).

### Job DSL Support

Since the plugin contains an extension for the Job DSL plugin to add DSL syntax for configuring the build trigger and
the pull request merger post-build action.

It is also possible to set Downstream job commit statuses when `displayBuildErrorsOnDownstreamBuilds()` is set in the
upstream job's triggers and downstreamCommitStatus block is included in the downstream job's wrappers.

Here is an example showing all DSL syntax elements:

```groovy
job('upstreamJob') {
scm {
git {
remote {
github('test-owner/test-project')
refspec('+refs/pull/*:refs/remotes/origin/pr/*')
}
branch('${sha1}')
}
}
triggers {
pullRequest {
admin('user_1')
admins(['user_2', 'user_3'])
userWhitelist('you@you.com')
userWhitelist(['me@me.com', 'they@they.com'])
orgWhitelist('my_github_org')
orgWhitelist(['your_github_org', 'another_org'])
cron('H/5 * * * *')
triggerPhrase('OK to test')
onlyTriggerPhrase()
useGitHubHooks()
permitAll()
autoCloseFailedPullRequests()
displayBuildErrorsOnDownstreamBuilds()
whiteListTargetBranches(['master','test', 'test2'])
allowMembersOfWhitelistedOrgsAsAdmin()
extensions {
commitStatus {
context('deploy to staging site')
triggeredStatus('starting deployment to staging site...')
startedStatus('deploying to staging site...')
statusUrl('http://mystatussite.com/prs')
completedStatus('SUCCESS', 'All is well')
completedStatus('FAILURE', 'Something went wrong. Investigate!')
completedStatus('PENDING', 'still in progress...')
completedStatus('ERROR', 'Something went really wrong. Investigate!')
}
}
}
}
publishers {
mergeGithubPullRequest {
mergeComment('merged by Jenkins')
onlyAdminsMerge()
disallowOwnCode()
failOnNonMerge()
deleteOnMerge()
}
}
}
job('downstreamJob') {
wrappers {
downstreamCommitStatus {
context('CONTEXT NAME')
triggeredStatus("The job has triggered")
startedStatus("The job has started")
statusUrl()
completedStatus('SUCCESS', "The job has passed")
completedStatus('FAILURE', "The job has failed")
completedStatus('ERROR', "The job has resulted in an error")
}
}
}
```

### Updates

#### -> 1.30.2
* Don't run through all the builds for changelog, track it in the PR object instead
* Synchronization around the PR object fields

#### -> 1.30.1
* Moved pull request state into build/pullrequests directory.
* Dynamic state is no longer kept as part of the trigger
* Merged #258 ignore comments on issues that aren't pull requests

#### -> 1.30
* Merged #253, cleaning up code.
* WebHooks are refactored to be closer to the variables it depends on
* PR data is now local per job instead of global
* The config.xml is only saved when there is a change to a PR the job is watching
* GitHub connections are now shared.
* Shouldn't run into rate limits on startup
* Pull Requests are only updated when the trigger runs, instead of on startup.

#### -> 1.29.8
* Merged #246 adding job dsl features and updating docs

#### -> 1.29.7
* Remove quoting of trigger phrase
* Merged #242 replaces newline and quoted quotes
* Merged #229 Add job dsl
* Merged #238 Update github-api version

#### -> 1.29.5
* Merge #232 fixes erroneous no test cases found

#### -> 1.29.4
* Add secret when auto creating the web hook
* Accomodate Jenkins being behind a firewall
* Fix for recursive repo initializations.

#### -> 1.29.1
* Fix NPE for triggers without a project
* Add back default URL if env variables are missing

#### -> 1.29
* Reduced the size of the plugin .xml file drastically.
* Fixed issues with persistance store credentials.
* Reduced the noise caused by webhook logic, and reduced amount of work for webhooks

#### -> 1.28
* Fixed [JENKINS-29850] Add author github repo URL
* Fixed NPE and other errors in merge logic
* Removed only trigger phrase, trigger is expected always now
* Fixed [JENKINS-30115] Downstream jobs can now attach GitHub status messages
* Fixed SHA1 for Matrix builds
* Global defaults are now used if the local value isn't set.
* Fixed issues with CSR protection
* Commit updates can be skipped all together or individual steps can be skipped using --none--

#### -> 1.27
* Trigger is now a regex term
* Phrases are no matched agains multiple lines properly
* All regex patterns use ignore case and dotall
* Added variables to the parameters

#### -> 1.26
* Extend the checking for own code.
* Fail build only when desired if we can't merge the build.
* Add option to delete branch when merge succeeds.

#### -> 1.25
* Fix condition where admin can't run tests #60 JENKINS-25572, JENKINS-25574, JENKINS-25603
* Check for when webhook encoding is null and default to UTF-8
15 changes: 13 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@

<artifactId>ghprb</artifactId>
<name>GitHub Pull Request Builder</name>
<version>1.26-SNAPSHOT</version>
<version>1.30.6-SNAPSHOT</version>
<packaging>hpi</packaging>

<url>https://wiki.jenkins-ci.org/display/JENKINS/GitHub+pull+request+builder+plugin</url>
@@ -50,10 +50,15 @@
<artifactId>github</artifactId>
<version>1.9.1</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>matrix-project</artifactId>
<version>1.4.1</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>github-api</artifactId>
<version>1.66</version>
<version>1.71</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
@@ -65,6 +70,12 @@
<artifactId>ssh-agent</artifactId>
<version>1.3</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>job-dsl</artifactId>
<version>1.39</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
Loading

0 comments on commit c5b08ef

Please sign in to comment.