Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Add TravisCI webhook #782

Merged
merged 3 commits into from

4 participants

@pangratz

This is the follow up PR to #747

This PR adds the possibility to define the GitHub credentials for the Rake upload_latest as ENV variables. It also adds a webhook to Travic: a POST to http://emberjs-uploader.herokuapp.com/upload is made. This heroku webapp checks out the latest ember.js from GitHub, does a rake dist and afterwards uploads the builds to the downloads section.

A core contributor needs to clone the pangratz/github-uploader repository, and install the app on heroku as described in the README. The Heroku app should be named emberjs-uploader, as this name is used in the TravicCI webhook.

/cc @wagenet

@travisbot

This pull request passes (merged 8bdde59 into 00b8940).

@wagenet
Owner

@pangratz I just realized something. Is there any reason to do this in Travis vs as a Github hook?

@pangratz

@wagenet Good question :) Going via Travis has the advantage that the tests have already been executed and the result of the Travis build is POST ed as JSON to the webhook. Using a "normal" Post-receive URL via GitHub services, the tests need to be run too.

What do you think?

@wagenet
Owner

Probably ok to have Travis do it, since it ensures that the tests passed.

@pangratz pangratz Merge branch 'master' into add_travisci_webhook
Conflicts:
	Rakefile
	lib/github_uploader.rb
e7157f1
@travisbot

This pull request passes (merged e7157f1 into e2d22aa).

@ebryn
Owner

This seems cool. @wagenet Do we have the Heroku app registered?

@wagenet
Owner

@ebryn, not yet. If you want to set that up let me know.

@ebryn ebryn merged commit 3a8e8e3 into from
@knusul knusul referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@pangratz pangratz deleted the branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 3, 2012
  1. @pangratz
  2. @pangratz

    Add webhooks notification

    pangratz authored
Commits on May 7, 2012
  1. @pangratz

    Merge branch 'master' into add_travisci_webhook

    pangratz authored
    Conflicts:
    	Rakefile
    	lib/github_uploader.rb
This page is out of date. Refresh to see the latest.
Showing with 5 additions and 3 deletions.
  1. +2 −0  .travis.yml
  2. +3 −3 Rakefile
View
2  .travis.yml
@@ -6,3 +6,5 @@ before_script:
- "sh -e /etc/init.d/xvfb start"
- "rake clean"
script: "rake test[all]"
+notifications:
+ webhooks: http://emberjs-uploader.herokuapp.com/upload
View
6 Rakefile
@@ -25,10 +25,11 @@ def setup_uploader
# git@github.com:emberjs/ember.js
repoUrl = origin.match(/github\.com[\/:]((.+?)\/(.+?))(\.git)?$/)
- username = repoUrl[2] # username part of origin url
- repo = repoUrl[3] # repository name part of origin url
+ username = ENV['GH_USERNAME'] || repoUrl[2] # username part of origin url
+ repo = ENV['GH_REPO'] || repoUrl[3] # repository name part of origin url
token = ENV["GH_OAUTH_TOKEN"]
+
uploader = GithubUploader.new(login, username, repo, token)
uploader.authorize
@@ -78,7 +79,6 @@ task :upload_latest => :dist do
upload_file(uploader, 'ember-latest.js', "Ember.js Master", "dist/ember.js")
end
-
namespace :docs do
def doc_args
"#{Dir.glob("packages/ember-*").join(' ')} -E #{Dir.glob("packages/ember-*/tests").join(' ')} -t docs.emberjs.com"
Something went wrong with that request. Please try again.