You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by "Vincent Hou (Confluence)" <no...@apache.org> on 2019/03/22 12:30:01 UTC

[CONF] OpenWhisk > How to make Jenkins pipeline jobs triggered by pull requests for Apache projects

There's **1 new edit** on this page  
---  
|  
---  
|  | [![page icon](cid:page-
icon)](https://cwiki.apache.org/confluence/display/OPENWHISK/How+to+make+Jenkins+pipeline+jobs+triggered+by+pull+requests+for+Apache+projects?src=mail&src.mail.product=confluence-
server&src.mail.timestamp=1553257801024&src.mail.notification=com.atlassian.confluence.plugins.confluence-
notifications-batch-plugin%3Abatching-
notification&src.mail.recipient=8aa980875bf24635015c9267bc8e02f6&src.mail.action=view
"page icon")  
---  
[How to make Jenkins pipeline jobs triggered by pull requests for Apache
projects](https://cwiki.apache.org/confluence/display/OPENWHISK/How+to+make+Jenkins+pipeline+jobs+triggered+by+pull+requests+for+Apache+projects?src=mail&src.mail.product=confluence-
server&src.mail.timestamp=1553257801024&src.mail.notification=com.atlassian.confluence.plugins.confluence-
notifications-batch-plugin%3Abatching-
notification&src.mail.recipient=8aa980875bf24635015c9267bc8e02f6&src.mail.action=view
"How to make Jenkins pipeline jobs triggered by pull requests for Apache
projects")  
|  |  |  |  | ![](cid:avatar_c8029f50a53268bda76f9372aaad6ca8) |  | Vincent
Hou edited this page  
---  
|  
|  | Here's what changed:  
---  
|

...

On the Datalog Tagging tab, check “GitHub project”, and put your project URL
in the field.

![](/confluence/download/attachments/109445786/Screen%20Shot%202019-03-21%20at%2010.43.44%20AM.png?version=1&modificationDate=1553257215800&api=v2)Image
Modified

On the Build Triggers tab, check “GitHub Pull Request Builder”. Then the
GitHub API credentials is automatically filled in. Make sure the Admin list is
filled in with at least one admin name. For my project, I put asfgit, which
you can use as well for Apache projects. Check “Use github hooks for build
triggering” below.

![](/confluence/download/attachments/109445786/Screen%20Shot%202019-03-21%20at%2010.44.57%20AM.png?version=1&modificationDate=1553257239888&api=v2)Image
Modified

Next step is a crucial step: click the Advanced button to extend further
options.

![](/confluence/download/attachments/109445786/Screen%20Shot%202019-03-21%20at%2010.49.43%20AM.png?version=1&modificationDate=1553257275797&api=v2)Image
Modified

You can see Skip build phrase and Crontab line are automatically filled in.
You can leave them as they are. You job here is to fill in the field “List of
organizations. Their members will be whitelisted.” with apache. If you miss
it, I am sure the PRs submitted by any Apache committer to your project will
not kick-off the pipeline. It took me over 24 hours to find out this
configuration, so take it.

![](/confluence/download/attachments/109445786/Screen%20Shot%202019-03-21%20at%2010.51.41%20AM.png?version=1&modificationDate=1553257297180&api=v2)Image
Modified

On the Pipeline tab, set Definition to Pipeline script from SCM, and set SCM
to Git. Under Repositories, set Repository URL to your Apache project. For
OpenWhisk, it is <git://github.com/apache/incubator-openwhisk.git>. Set the
Name to origin, and the Refspec to
+refs/pull/${ghprbPullId}/*:refs/remotes/origin/pr/${ghprbPullId}/*. Under
Branches to build, set the Branch Specifier to ${sha1}.

![](/confluence/download/attachments/109445786/Screen%20Shot%202019-03-21%20at%2010.56.22%20AM.png?version=1&modificationDate=1553257324813&api=v2)Image
Modified

At last but not least, configure the Script Path to the Jenkinsfile. By
default, this file is saved under the home directory of your Apache project,
but you may put somewhere else, as long as you configure your script path
pointing to it. After you click on the OK button, you are all set.

...  
  
---  
|  |  | [Go to page
history](https://cwiki.apache.org/confluence/pages/viewpreviousversions.action?pageId=109445786&src=mail&src.mail.product=confluence-
server&src.mail.timestamp=1553257801024&src.mail.notification=com.atlassian.confluence.plugins.confluence-
notifications-batch-plugin%3Abatching-
notification&src.mail.recipient=8aa980875bf24635015c9267bc8e02f6 "Go to page
history")  
---  
---  
| [View
page](https://cwiki.apache.org/confluence/display/OPENWHISK/How+to+make+Jenkins+pipeline+jobs+triggered+by+pull+requests+for+Apache+projects?src=mail&src.mail.product=confluence-
server&src.mail.timestamp=1553257801024&src.mail.notification=com.atlassian.confluence.plugins.confluence-
notifications-batch-plugin%3Abatching-
notification&src.mail.recipient=8aa980875bf24635015c9267bc8e02f6&src.mail.action=view)  
---  
  
|  | [Stop watching
space](https://cwiki.apache.org/confluence/users/removespacenotification.action?spaceKey=OPENWHISK&src=mail&src.mail.product=confluence-
server&src.mail.timestamp=1553257801024&src.mail.notification=com.atlassian.confluence.plugins.confluence-
notifications-batch-plugin%3Abatching-
notification&src.mail.recipient=8aa980875bf24635015c9267bc8e02f6&src.mail.action=stop-
watching&jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ4c3JmOjhhYTk4MDg3NWJmMjQ2MzUwMTVjOTI2N2JjOGUwMmY2IiwicXNoIjoiZGEwMTcxOTA0ZWRlZDE4ZmM5NmUyOTdiMzgyOTMzYzBiOWM5YTg1YWU1YjNhNTNiODFkNjk3ODUwYTYxMTRlMiIsImlzcyI6ImNvbmZsdWVuY2Vfbm90aWZpY2F0aW9uc0FSRUgtWFVEMS1QT1FHLUNTQU8iLCJleHAiOjE1NTM4NjI2MDEsImlhdCI6MTU1MzI1NzgwMX0.VB91lnuwLPql3vdUA84nh66ApCqYrTAZMn9iUViDLFs)
| •  
---|---  
[Manage
notifications](https://cwiki.apache.org/confluence/users/editmyemailsettings.action?src=mail&src.mail.product=confluence-
server&src.mail.timestamp=1553257801024&src.mail.notification=com.atlassian.confluence.plugins.confluence-
notifications-batch-plugin%3Abatching-
notification&src.mail.recipient=8aa980875bf24635015c9267bc8e02f6&src.mail.action=manage)  
---  
| ![Confluence logo big](cid:footer-desktop-logo)  
---  
This message was sent by Atlassian Confluence 6.14.2  
![](cid:footer-mobile-logo)  
---