Compare commits

..

37 Commits

Author SHA1 Message Date
Buck Doyle
db209f50b5 Parse index key from hostname
My goal is to use the branch name as the subdomain, this
is a step toward that.
2016-04-15 16:34:49 +02:00
Buck Doyle
6b53f583fd Change name of deploy target 2016-04-15 16:13:59 +02:00
Buck Doyle
1aeb2f9016 Add ember-cli-deploy-github
Thanks to @lukemelia for the suggestion.
2016-04-15 15:19:06 +02:00
Buck Doyle
2dff78b0ea Try to get current branch name 2016-04-15 15:05:23 +02:00
Buck Doyle
00be9c26bb Remove S3 prefix 2016-04-15 10:46:22 +02:00
Buck Doyle
1c59f0cf51 Add verbose deployment logging
The assets are seemingly missing from S3.
2016-04-15 10:38:28 +02:00
Buck Doyle
364fe16cfe Fix escaping 2016-04-15 10:07:46 +02:00
Buck Doyle
c2600f27c5 Add more escaping
ugh
2016-04-15 10:00:25 +02:00
Buck Doyle
e788de0acb Use double quotes for substitution 2016-04-15 09:48:57 +02:00
Buck Doyle
3ca1c216f5 Add call to status API
I would be surprised if this worked on the first try!

This uses a GitHub API token from my own account, stored
in an environment variable on Travis. Maybe we need a bot
account of some sort.
2016-04-15 09:38:49 +02:00
Buck Doyle
ab9f89f42b Add filter for deployment of PRs only 2016-04-15 09:27:57 +02:00
Buck Doyle
f9b1b7601e Change domain for asset host 2016-04-14 18:14:20 +02:00
Buck Doyle
dfb80470f6 Add index key option for Redis front-end 2016-04-14 18:10:01 +02:00
Buck Doyle
84ac5f2abf Test 2016-04-14 16:42:40 +02:00
Buck Doyle
067a19a264 Add logging 2016-04-14 16:32:28 +02:00
Buck Doyle
7ed9b4357b Remove tiny Sinatra server 2016-04-14 15:59:32 +02:00
Buck Doyle
a9bd47502d Restore original Ruby server 2016-04-14 15:54:38 +02:00
Buck Doyle
0403884224 Add Redis front-end to existing Ruby server 2016-04-14 15:54:05 +02:00
Buck Doyle
45f90c5ed2 Try other S3 credentials 2016-04-14 14:56:06 +02:00
Buck Doyle
ef73b927e8 Disable some builds for now 2016-04-14 14:47:32 +02:00
Buck Doyle
34444246fd Further refine logging 2016-04-14 14:46:58 +02:00
Buck Doyle
f8ccf9d8d8 Add more logging 2016-04-14 14:24:27 +02:00
Buck Doyle
4e1b2cd140 Add logging 2016-04-14 12:54:13 +02:00
Buck Doyle
0887bf9cde Add deployment link to log
My eventual goal is to use the GitHub Status API to add
this link to the pull request page, but I’m not currently
sure how to accomplish that.
2016-04-14 12:45:07 +02:00
Buck Doyle
770e708552 Disable activation of deployment 2016-04-14 12:22:47 +02:00
Buck Doyle
02e653576a Reduce verbosity of deployment 2016-04-14 12:21:53 +02:00
Buck Doyle
d8446a596c Restrict deployment to only default build 2016-04-14 12:20:28 +02:00
Buck Doyle
ce413fb8fc Convert deploy to after_script 2016-04-14 11:14:06 +02:00
Buck Doyle
fb0e7e16f4 Use existing environment variables 2016-04-14 10:47:23 +02:00
Buck Doyle
a672891b7e Update fingerprint prepended URL 2016-04-14 10:22:17 +02:00
Buck Doyle
8028b694e6 Add preliminary deployment script
I don’t yet know how the `on` option works…?
2016-04-14 10:21:40 +02:00
Buck Doyle
6325fa2e8d Add preliminary deployment configuration
This assumes that, for instance, the S3 credentials are
available as environment variables. There are some decisions
about where to store configuration that need discussion,
this is just to get things going for now.
2016-04-14 10:10:06 +02:00
Buck Doyle
167bd114c5 Add Redis gem 2016-04-13 18:00:29 +02:00
Buck Doyle
95da771778 Fix path to server 2016-04-13 17:55:10 +02:00
Buck Doyle
b921ab5191 Remove Ember CLI buildpack 2016-04-13 17:51:13 +02:00
Buck Doyle
1a84955bd0 Add experimental Redis front-end 2016-04-13 17:45:17 +02:00
Buck Doyle
2b878d8628 Add ember-cli-deploy and lightning pack 2016-04-13 16:08:38 +02:00
37 changed files with 259 additions and 140 deletions

View File

@ -1,2 +1 @@
https://github.com/heroku/heroku-buildpack-ruby.git
https://github.com/travis-ci/travis-web-ember-cli-buildpack.git

View File

@ -4,15 +4,15 @@ node_js: stable
env:
- EMBER_VERSION=default
- EMBER_VERSION=release
- EMBER_VERSION=beta
- EMBER_VERSION=canary
# - EMBER_VERSION=release
# - EMBER_VERSION=beta
# - EMBER_VERSION=canary
matrix:
allow_failures:
- env: EMBER_VERSION=release
- env: EMBER_VERSION=beta
- env: EMBER_VERSION=canary
# - env: EMBER_VERSION=release
# - env: EMBER_VERSION=beta
# - env: EMBER_VERSION=canary
fast_finish: true
@ -46,21 +46,6 @@ notifications:
campfire:
secure: "JJezWGD9KJY/LC2aznI3Zyohy31VTIhcTKX7RWR4C/C8YKbW9kZv3xV6Vn11\nSHxJTeZo6st2Bpv6tjlWZ+HCR09kyCNavIChedla3+oHOiuL0D4gSo+gkTNW\nUKYZz9mcQUd9RoQpTeyxvdvX+l7z62/7JwFA7txHOqxbTS8jrjc="
before_deploy:
- ASSETS_HOST=https://s3.amazonaws.com/travis-error-pages ember build --env production
# delete some of the stuff that's useless for maintenance page
- rm -fr dist/assets/*.js dist/images/emoji dist/index.html dist/images/sponsors
- cp dist/maintenance.html dist/index.html
deploy:
provider: s3
access_key_id: $MAINTENANCE_S3_ACCESS_KEY_ID
secret_access_key: $MAINTENANCE_S3_SECRET_ACCESS_KEY
bucket: travis-error-pages
skip_cleanup: true
acl: public_read
local_dir: dist
region: us-east-1
on:
branch: master
condition: "$EMBER_VERSION = default"
# FIXME this needs refinement, obvs
after_success:
- "test $EMBER_VERSION == 'default' && test $TRAVIS_PULL_REQUEST && ember deploy pull-request --verbose"

View File

@ -8,6 +8,7 @@ gem 'rack-protection', '~> 1.3'
gem 'rack-mobile-detect'
gem 'sinatra'
gem 'hashr'
gem 'redis'
group :development, :test do
gem 'rake'

View File

@ -28,6 +28,7 @@ GEM
rack-test (0.6.2)
rack (>= 1.0)
rake (10.1.1)
redis (3.2.2)
rspec (2.99.0)
rspec-core (~> 2.99.0)
rspec-expectations (~> 2.99.0)
@ -61,10 +62,11 @@ DEPENDENCIES
rack-protection (~> 1.3)
rack-ssl (~> 1.3)
rake
redis
rspec (~> 2.11)
sinatra
sinatra-contrib
travis-web!
BUNDLED WITH
1.10.1
1.11.2

View File

@ -19,8 +19,12 @@ var App = Ember.Application.extend(Ember.Evented, {
podModulePrefix: config.podModulePrefix,
Resolver: Resolver,
lookup() {
return this.__container__.lookup.apply(this.__container__, arguments);
},
flash(options) {
return Ember.getOwner(Travis).lookup('controller:flash').loadFlashes([options]);
return Travis.lookup('controller:flash').loadFlashes([options]);
},
toggleSidebar() {

View File

@ -11,7 +11,7 @@ export default Ember.Controller.extend({
var user;
if ((user = this.get('model')) && user.get('isSyncing') && !user.get('syncedAt')) {
return Ember.run.scheduleOnce('routerTransitions', this, function() {
return Ember.getOwner(this).lookup('router:main').send('renderFirstSync');
return this.container.lookup('router:main').send('renderFirstSync');
});
}
}.observes('isSyncing', 'auth.currentUser')

View File

@ -76,7 +76,7 @@ var Controller = Ember.Controller.extend({
possiblyRedirectToGettingStartedPage() {
return Ember.run.scheduleOnce('routerTransitions', this, function() {
if (this.get('tab') === 'owned' && this.get('isLoaded') && this.get('repos.length') === 0) {
return Ember.getOwner(this).lookup('router:main').send('redirectToGettingStarted');
return this.container.lookup('router:main').send('redirectToGettingStarted');
}
});
},

View File

@ -2,6 +2,5 @@ import { timeAgoInWords, safe } from 'travis/utils/helpers';
import Ember from "ember";
export default Ember.Helper.helper(function(params) {
let date = new Date(params[0]);
return safe(moment(date).format('MMMM D, YYYY H:mm:ss') || '-');
return safe(moment(params[0]).format('MMMM D, YYYY H:mm:ss') || '-');
});

View File

@ -2,15 +2,16 @@ import config from 'travis/config/environment';
import TravisPusher from 'travis/utils/pusher';
var PusherInitializer, initialize;
initialize = function(applicationInstance) {
const app = applicationInstance.application;
initialize = function(data) {
var application;
application = data.application;
if (config.pusher.key) {
app.pusher = new TravisPusher(config.pusher, applicationInstance.lookup('service:ajax'));
app.register('pusher:main', app.pusher, {
application.pusher = new TravisPusher(config.pusher, data.container.lookup('service:ajax'));
application.register('pusher:main', application.pusher, {
instantiate: false
});
app.inject('route', 'pusher', 'pusher:main');
return app.pusher.store = applicationInstance.lookup('service:store');
application.inject('route', 'pusher', 'pusher:main');
return application.pusher.store = data.container.lookup('service:store');
}
};

View File

@ -30,7 +30,7 @@ var Broadcast = Model.extend({
Broadcast.reopenClass({
seen: function() {
var seenBroadcasts;
seenBroadcasts = Ember.getOwner(Travis).lookup('service:storage').getItem('travis.seen_broadcasts');
seenBroadcasts = Travis.lookup('service:storage').getItem('travis.seen_broadcasts');
if (seenBroadcasts != null) {
seenBroadcasts = JSON.parse(seenBroadcasts);
}

View File

@ -14,7 +14,7 @@ var Router = Ember.Router.extend({
// we should probably think about a more general way to
// do this, location should not know about auth status
return Location.create({
auth: Ember.getOwner(this).lookup('service:auth')
auth: this.container.lookup('service:auth')
});
}
}.property(),

View File

@ -1,7 +1,6 @@
import TravisRoute from 'travis/routes/basic';
import config from 'travis/config/environment';
import BuildFaviconMixin from 'travis/mixins/build-favicon';
import Ember from 'ember';
export default TravisRoute.extend(BuildFaviconMixin, {
needsAuth: false,
@ -100,7 +99,7 @@ export default TravisRoute.extend(BuildFaviconMixin, {
error(error) {
var authController;
if (error === 'needs-auth') {
authController = Ember.getOwner(this).lookup('controller:auth');
authController = this.container.lookup('controller:auth');
authController.set('redirected', true);
return this.transitionTo('auth');
} else {

View File

@ -1,8 +1,7 @@
import TravisRoute from 'travis/routes/basic';
import Ember from 'ember';
export default TravisRoute.extend({
setupController(controller) {
return Ember.getOwner(this).lookup('controller:repos').activate('owned');
return this.container.lookup('controller:repos').activate('owned');
}
});

View File

@ -17,7 +17,7 @@ export default TravisRoute.extend(ScrollResetMixin, {
},
setupController(controller, model) {
this.controllerFor('repos').activate('owned');
this.container.lookup('controller:repos').activate('owned');
if (model && !model.get) {
model = this.get('store').find('repo', model.id);
}

View File

@ -3,7 +3,7 @@ import TravisRoute from 'travis/routes/basic';
export default TravisRoute.extend({
setupController: function() {
$('body').attr('id', 'simple');
this.controllerFor('repos').activate('owned');
this.container.lookup('controller:repos').activate('owned');
return this._super.apply(this, arguments);
},
renderTemplate: function() {

View File

@ -64,7 +64,7 @@ export default Ember.Service.extend({
success = options.success || (function() {});
options.success = (data, status, xhr) => {
if (data != null ? data.flash : void 0) {
Ember.getOwner(Travis).lookup('controller:flash').loadFlashes(data.flash);
Travis.lookup('controller:flash').loadFlashes(data.flash);
}
if (data != null) {
delete data.flash;
@ -75,7 +75,7 @@ export default Ember.Service.extend({
options.error = (data, status, xhr) => {
console.log("[ERROR] API responded with an error (" + status + "): " + (JSON.stringify(data)));
if (data != null ? data.flash : void 0) {
Ember.getOwner(Travis).lookup('controller:flash').pushObject(data.flash);
Travis.lookup('controller:flash').pushObject(data.flash);
}
if (data != null) {
delete data.flash;

View File

@ -214,7 +214,7 @@ export default Ember.Service.extend({
// as a direct response to either manual sign in or autoSignIn (right now
// we treat both cases behave the same in terms of sent events which I think
// makes it more complicated than it should be).
router = Ember.getOwner(this).lookup('router:main');
router = this.container.lookup('router:main');
try {
return router.send(name);
} catch (error1) {

View File

@ -16,9 +16,8 @@
background-color: $oxide-blue
.sync-last
position: absolute
right: 9em
left: -15em
top: 0
width: 170%
z-index: -1
transition: transform 150ms ease, opacity 250ms ease
transform: translateX(80%)

View File

@ -3,17 +3,18 @@
max-width: 900px
margin: auto
h1
color: $cement-grey
color: #808080
font-size: 36px
margin-bottom: 1em
font-weight: 300
line-height: 1.1
h2
color: $turf-green
color: #35a764
font-size: 22px
margin-bottom: 1em
font-weight: 300
p, li
color: #666
font-size: $font-size-m
line-height: 25px
@ -75,3 +76,10 @@
strong
text-transform: uppercase
font-style: normal
.note--info
background-color: #e7eeee
color: #3e8987
code
color: #267c8d
background-color: white

View File

@ -11,14 +11,14 @@
background-color: #ffffff
background-image: inline-image('landing-page/signingithub.svg')
background-size: 16px 16px
border: 2px solid rgba($cement-grey, .4)
color: $cement-grey
border: 2px solid #e4e7e7
color: #a0a8a8
.button--signingin
border: 2px solid $turf-green
border: 2px solid #3FA75F
.button--signin:hover
background-color: $turf-green
background-color: #73c78d
background-image: inline-image('landing-page/signingithub-hover.svg')
border: 2px solid $turf-green
border: 2px solid #73c78d
color: #fff
.landing-centered-wrapper
@ -37,7 +37,7 @@
font-size: 5em
line-height: 1em
font-weight: 300
color: $cement-grey
color: #8f9294
margin-bottom: 0
.hero, .oss-testing, .customers, .recent-builds, .free-for-oss, .private-repos, .features-list, .build-flows, .user-testimonials
@ -52,7 +52,7 @@
font-size: 3.3em
line-height: 1.15em
font-weight: 300
color: $turf-green
color: #39a85b
p
line-height: 1.5em
@ -129,10 +129,6 @@
br.mobile-break
display: none
.os-numbers
width: 80%
@media #{$medium-up}
width: 60%
.customers
text-align: center

View File

@ -43,11 +43,11 @@ $color-bg-log-fold-highlight: #777
$ansi-black: #4E4E4E
$ansi-black-bold: #7C7C7C
$ansi-red: #FF6C60
$ansi-red-bold: #FF9B93
$ansi-red-bold: #FFB6B0
$ansi-green: #00AA00
$ansi-green-bold: #B1FD79
$ansi-green-bold: #CEFFAB
$ansi-yellow: #FFFFB6
$ansi-yellow-bold: #FFFF91
$ansi-yellow-bold: #FFFFCB
$ansi-blue: #96CBFE
$ansi-blue-bold: #B5DCFE
$ansi-magenta: #FF73FD

View File

@ -1,7 +1,6 @@
{{#if allHooks.isLoaded}}
<header>
{{#unless config.enterprise}}
<header>
{{#if config.billingEndpoint}}
<div class="cta-btn">
{{#if subscribeButtonInfo.subscribed}}
@ -15,7 +14,6 @@
{{/if}}
</div>
{{/if}}
{{/unless}}
<div class="profile-header">
<h1>{{accountName}}</h1>

View File

@ -1,6 +1,6 @@
<figure class="team-image">
<img class="front" src="../images/team/team-{{member.image}}.png" alt="{{member.name}}">
<img class="back" src="../images/team/{{member.image}}-animated.gif" alt="{{member.name}} gif">
<img class="front" src="../images/team/team-{{member.image}}.png" alt="">
<img class="back" src="../images/team/{{member.image}}-animated.gif" alt="">
</figure>
<h3 class="team-name">{{member.name}}</h3>
<p class="team-title">{{member.title}}</p>
@ -8,7 +8,7 @@
<p class="team-handle"><a href="https://twitter.com/{{member.handle}}" title="{{member.name}} on Twitter">@{{member.handle}}</a></p>
{{/if}}
<div class="team-flags">
<img src="../images/pro-landing/flag-{{member.nationality}}.svg" alt="flag {{member.nationality}}" title="is from {{member.nationality}}">
<img src="../images/pro-landing/flag-{{member.nationality}}.svg" alt="flag {{member.nationality}}">
<span class="flag-divider">/</span>
<img src="../images/pro-landing/flag-{{member.country}}.svg" alt="flag {{member.country}}" title="lives in {{member.country}}">
<img src="../images/pro-landing/flag-{{member.country}}.svg" alt="flag {{member.country}}">
</div>

View File

@ -22,6 +22,9 @@
<h2>Add .travis.yml file to your repository</h2>
<p>In order for Travis CI to build your project, you need to tell the systems a little bit about it. You'll need to add a file named .travis.yml to the root of your repository.</p>
<p>If .travis.yml is not in the repository, is misspelled or is not valid YAML, Travis CI will ignore it.</p>
<p class="note note--info">
<strong>Note:</strong> The <code>language</code> value is case-sensitive. If you set <code>language: C</code>, for example, your project will be considered a Ruby project.
</p>
<p>Here you can find some of our basic <a href="http://docs.travis-ci.com/user/language-specific/" title="">language examples</a>.</p>
</div>
</li>

View File

@ -1,7 +1,7 @@
{{#travis-layout layoutName="layouts/landing-page"}}
<div id="landing" class="landing">
<div class="row hero z-1">
<section class="landing-centered-wrapper">
<div class="landing-centered-wrapper">
<div class="large-12 columns" id="hero-copy">
<h1>Test and Deploy with Confidence</h1>
<p>Easily sync your GitHub projects with Travis CI<br class="mobile-break"> and youll be testing your code in minutes!</p>
@ -16,26 +16,25 @@
</div>
<div class="large-12 columns laptop-wrapper">
<div id="laptop">
<img src="../images/landing-page/laptop.png" alt="Travis CI screenshot">
<img src="../images/landing-page/laptop.png">
</div>
</div>
</section>
</div>
</div>
<div class="row oss-testing">
<section class="landing-centered-wrapper">
<div class="landing-centered-wrapper">
<div class="large-12 columns">
<h2>The home of<br class="mobile-break"> open source testing</h2>
<p>Over 300k open source projects<br class="mobile-break"> and 235k users are testing on Travis CI.</p>
<img src="../images/landing-page/customer-numbers.svg" alt="Open source project numbers" class="os-numbers">
<h2>The home of<br class="mobile-break"> open source testing</h2>
<p>Over 320k open source projects<br class="mobile-break"> and 235k users are testing on Travis CI.</p>
<img src="../images/landing-page/customer-numbers.svg">
</div>
</div>
</section>
</div>
<div class="row customers">
<div class="landing-centered-wrapper">
<div class="medium-6 columns">
<img src="../images/landing-page/customers-temp-together.svg" alt="customer logos">
<img src="../images/landing-page/customers-temp-together.svg">
</div>
<div class="medium-6 columns">
<p class="left">Some pretty awesome companies<br> and projects are using us.</p>
@ -44,16 +43,16 @@
</div>
<div class="row free-for-oss">
<section class="landing-centered-wrapper">
<div class="landing-centered-wrapper">
<div class="large-12 columns">
<h1>Testing your open source<br class="mobile-no-break"> project is 10000% free</h1>
<p><span class="bold-italic">Seriously. Always.</span> We like to think of it as our way of giving<br>back to a community that gives us so much as well.</p>
</div>
</section>
</div>
</div>
<div class="row private-repos">
<section class="landing-centered-wrapper">
<div class="landing-centered-wrapper">
<div class="medium-6 columns mobile-envelope">
<img src="../images/landing-page/envelope.svg">
</div>
@ -65,13 +64,13 @@
</div>
</div>
<div class="medium-6 columns desktop-envelope">
<img src="../images/landing-page/envelope.svg" alt="envelope">
<img src="../images/landing-page/envelope.svg">
</div>
</section>
</div>
</div>
<div class="row features-list">
<section class="landing-centered-wrapper">
<div class="landing-centered-wrapper">
<div class="large-6 columns features-callouts">
<div class="landing-vert-center-s">
<div class="medium-6 columns">
@ -105,16 +104,16 @@
<li>Did we say free for Open Source already?</li>
</ul>
</div>
</section>
</div>
</div>
<div class="row build-flows">
<section class="landing-centered-wrapper">
<div class="landing-centered-wrapper">
<div class="large-12 columns">
<h2>Branch build flow</h2>
<div class="branch-bf">
<div class="bf">
<img src="../images/landing-page/push-icon-1.svg" alt="GitHub logo">
<img src="../images/landing-page/push-icon-1.svg">
<p>You push your<br>code to GitHub</p>
</div>
<div class="divider-line-horizontal">
@ -122,7 +121,7 @@
<div class="divider-line-vertical">
</div>
<div class="bf">
<img src="../images/landing-page/push-icon-2.svg" alt="Trigger build">
<img src="../images/landing-page/push-icon-2.svg">
<p>GitHub triggers<br>Travis CI to build</p>
</div>
<div class="divider-line-horizontal">
@ -130,7 +129,7 @@
<div class="divider-line-vertical">
</div>
<div class="bf">
<img src="../images/landing-page/push-icon-3.svg" alt="Travis logo">
<img src="../images/landing-page/push-icon-3.svg">
<p>Hooray!<br>Your build passes!</p>
</div>
<div class="divider-line-horizontal">
@ -138,7 +137,7 @@
<div class="divider-line-vertical">
</div>
<div class="bf">
<img src="../images/landing-page/push-icon-4.svg" alt="Heroku logo">
<img src="../images/landing-page/push-icon-4.svg">
<p>Travis CI deploys<br>to Heroku</p>
</div>
<div class="divider-line-horizontal">
@ -146,14 +145,14 @@
<div class="divider-line-vertical">
</div>
<div class="bf">
<img src="../images/landing-page/push-icon-5.svg" alt="Slack logo">
<img src="../images/landing-page/push-icon-5.svg">
<p>Travis CI tells the<br>team all is well</p>
</div>
</div>
<h2 id="pr-bf-margin">Pull request build flow</h2>
<div class="branch-bf">
<div class="bf">
<img src="../images/landing-page/pull-icon-1.svg" alt="PR icon">
<img src="../images/landing-page/pull-icon-1.svg">
<p>A pull request<br>is created</p>
</div>
<div class="divider-line-horizontal">
@ -161,7 +160,7 @@
<div class="divider-line-vertical">
</div>
<div class="bf">
<img src="../images/landing-page/pull-icon-2.svg" alt="Check test">
<img src="../images/landing-page/pull-icon-2.svg">
<p>GitHub tells Travis CI the build is mergeable</p>
</div>
<div class="divider-line-horizontal">
@ -169,7 +168,7 @@
<div class="divider-line-vertical">
</div>
<div class="bf">
<img src="../images/landing-page/push-icon-3.svg" alt="Tavis logo">
<img src="../images/landing-page/push-icon-3.svg">
<p>Hooray!<br>Your build passes!</p>
</div>
<div class="divider-line-horizontal">
@ -177,7 +176,7 @@
<div class="divider-line-vertical">
</div>
<div class="bf">
<img src="../images/landing-page/pull-icon-4.svg" alt="Build status">
<img src="../images/landing-page/pull-icon-4.svg">
<p>Travis CI updates the PR that it passed</p>
</div>
<div class="divider-line-horizontal">
@ -185,22 +184,22 @@
<div class="divider-line-vertical">
</div>
<div class="bf">
<img src="../images/landing-page/pull-icon-5.svg" alt="Merge icon">
<img src="../images/landing-page/pull-icon-5.svg">
<p>You merge in<br>the PR goodness</p>
</div>
</div>
</div>
</section>
</div>
</div>
<div class="row user-testimonials">
<section class="landing-centered-wrapper">
<div class="landing-centered-wrapper">
<div class="medium-6 columns">
<h2>Some people have said some pretty nice things about us</h2>
</div>
<div class="medium-6 columns">
<div class="small-3 columns">
<img src="../images/landing-page/dhh.png" class="home-avatar" alt="image DHH">
<img src="../images/landing-page/dhh.png" class="home-avatar">
</div>
<div class="small-9 columns">
<p>Travis CI makes it so much easier for us to coordinate the thousands of commits and contributors that flow through the Rails code base. The test suite for such a large project is vast, and we wouldnt be catching issues as quickly or smoothly without the help of Travis.</p>
@ -209,7 +208,7 @@
</div>
<div class="small-3 columns">
<img src="../images/landing-page/chris.png" class="home-avatar" alt="image Chris Aniszczyk">
<img src="../images/landing-page/chris.png" class="home-avatar">
</div>
<div class="small-9 columns">
<p>We love Travis CI at @TwitterOSS and use it for the majority of our open source projects on GitHub. Travis CI is simple to use, we love their API to build tooling and adore the new container infrastructure for speedier builds.</p>
@ -218,7 +217,7 @@
</div>
<div class="small-3 columns">
<img src="../images/landing-page/alex.png" class="home-avatar" alt="Alex Gaynor">
<img src="../images/landing-page/alex.png" class="home-avatar">
</div>
<div class="small-9 columns">
<p>Not only is Travis CI the best way to test your software, it is the right way. rm -rf jenkins &amp;&amp; touch .travis.yml</p>
@ -226,7 +225,8 @@
<p class="title">PyPy and Python Core Team Member</p>
</div>
</div>
</section>
</div>
</div>
</div>
</div>
{{/travis-layout}}

View File

@ -14,7 +14,7 @@
{{#each broadcasts.content as |broadcast|}}
<li><p><span class="broadcast-status {{broadcast.category}}" title="Transmitted on {{broadcast.updated_at}}"></span> {{{broadcast.message}}} <a {{action 'markBroadcastAsSeen' broadcast}} class="icon-close"></a></p></li>
{{else}}
<li><p>There are no broadcasts</p></li>
<li><p>There are no broadcasts transmitted</p></li>
{{/each}}
</ul>
{{/if}}

View File

@ -1,6 +1,4 @@
import config from 'travis/config/environment';
import Ember from 'ember';
var ccXml, email, githubAdmin, githubCommit, githubNetwork, githubPullRequest,
githubRepo, githubWatchers, gravatarImage, plainTextLog, statusImage;

View File

@ -1,7 +1,7 @@
{
"name": "travis",
"dependencies": {
"ember": "2.4.5",
"ember": "2.2.1",
"ember-cli-shims": "0.1.1",
"ember-cli-test-loader": "0.2.2",
"ember-load-initializers": "0.1.7",
@ -22,6 +22,7 @@
"ceibo": "1.0.0"
},
"resolutions": {
"ember": "2.4.5"
"ember": "2.2.1",
"ember-qunit-notifications": "0.1.0"
}
}

74
config/deploy.js Normal file
View File

@ -0,0 +1,74 @@
var VALID_DEPLOY_TARGETS = [ //update these to match what you call your deployment targets
'dev',
'qa',
'pull-request'
];
module.exports = function(deployTarget) {
var ENV = {
build: {},
redis: {
allowOverwrite: true,
keyPrefix: 'travis:index'
},
s3: {
bucket: 'travis-web-production-next',
region: 'eu-west-1'
}
};
if (VALID_DEPLOY_TARGETS.indexOf(deployTarget) === -1) {
throw new Error('Invalid deployTarget ' + deployTarget);
}
if (deployTarget === 'dev') {
ENV.build.environment = 'development';
ENV.redis.url = process.env.REDIS_URL;
ENV.plugins = ['build', 'redis']; // only care about deploying index.html into redis in dev
}
if (deployTarget === 'qa' || deployTarget === 'pull-request') {
ENV.build.environment = 'production';
ENV.s3.accessKeyId = process.env.AWS_KEY;
ENV.s3.secretAccessKey = process.env.AWS_SECRET;
}
if (deployTarget === 'qa') {
ENV.redis.url = process.env.QA_REDIS_URL;
}
if (deployTarget === 'pull-request') {
ENV.redis.url = process.env.REDIS_URL;
ENV.github = {
token: process.env.GITHUB_TOKEN,
userOrOrganization: 'travis-ci',
repo: 'travis-web',
publicURL: 'https://travis-web-production-next.herokuapp.com/?index_key={{versionSha}}',
// FIXME is there an environment variable for this?
commitUser: 'backspace',
commitSha: process.env.TRAVIS_COMMIT
};
}
return ENV;
/* Note: a synchronous return is shown above, but ember-cli-deploy
* does support returning a promise, in case you need to get any of
* your configuration asynchronously. e.g.
*
* var Promise = require('ember-cli/lib/ext/promise');
* return new Promise(function(resolve, reject){
* var exec = require('child_process').exec;
* var command = 'heroku config:get REDISTOGO_URL --app my-app-' + deployTarget;
* exec(command, function (error, stdout, stderr) {
* ENV.redis.url = stdout.replace(/\n/, '').replace(/\/\/redistogo:/, '//:');
* if (error) {
* reject(error);
* } else {
* resolve(ENV);
* }
* });
* });
*
*/
}

View File

@ -1,4 +1,30 @@
window.deprecationWorkflow = window.deprecationWorkflow || {};
window.deprecationWorkflow.config = {
workflow: []
workflow: [
// DONE
{ handler: "log", matchMessage: "Ember.LinkView is deprecated. Please use Ember.LinkComponent." },
{ handler: "log", matchMessage: "Calling store.find() with a query object is deprecated. Use store.query() instead." },
{ handler: "log", matchMessage: new RegExp("A property of .*? was modified inside the didInsertElement hook. You should never change properties on components, services or models during didInsertElement because it causes significant performance degradation.") },
{ handler: "log", matchMessage: "Ember.arrayComputed is deprecated. Replace it with plain array methods" },
// this will still emit deprecations, because we use state property in
// request-icon compoenent, that makes Ember.js think that we're using
// internal component's state
{ handler: "log", matchMessage: "Usage of `state` is deprecated, use `_state` instead." },
{ handler: "log", matchMessage: "RestAdapter#find has been deprecated and renamed to `findRecord`." },
{ handler: "log", matchMessage: "Usage of `typeKey` has been deprecated and will be removed in Ember Data 2.0. It has been replaced by `modelName` on the model class." },
{ handler: "log", matchMessage: "Using store.dematerializeRecord() has been deprecated since it was intended for private use only. You should use store.unloadRecord() instead." },
{ handler: "log", matchMessage: "Using the same function as getter and setter is deprecated." },
{ handler: "log", matchMessage: "`Ember.ArrayController` is deprecated." },
{ handler: "log", matchMessage: "The default behavior of `shouldBackgroundReloadRecord` will change in Ember Data 2.0 to always return true. If you would like to preserve the current behavior please override `shouldBackgroundReloadRecord` in your adapter:application and return false." },
{ handler: "log", matchMessage: "Function#observesBefore is deprecated and will be removed in the near future." },
{ handler: "log", matchMessage: "Ember.addBeforeObserver is deprecated and will be removed in the near future." },
{ handler: "log", matchMessage: "Ember.removeBeforeObserver is deprecated and will be removed in the near future." },
{ handler: "log", matchMessage: "Using DS.Snapshot.get() is deprecated. Use .attr(), .belongsTo() or .hasMany() instead." },
{ handler: "log", matchMessage: "The filter API will be moved into a plugin soon. To enable store.filter using an environment flag, or to use an alternative, you can visit the ember-data-filter addon page" },
{ handler: "log", matchMessage: "Ember.View is deprecated. Consult the Deprecations Guide for a migration strategy." },
// TODO
{ handler: "silence", matchMessage: "Using `ApplicationInstance.container.lookup` is deprecated. Please use `ApplicationInstance.lookup` instead." },
{ handler: "silence", matchMessage: new RegExp("the component:.*? test module is implicitly running in unit test mode, which will change to integration test mode by default in an upcoming version of ember-test-helpers. Add `unit: true` or a `needs:[]` list to explicitly opt in to unit test mode.") },
]
};

View File

@ -6,20 +6,17 @@ module.exports = function(defaults) {
var fingerprint,
assetsHost;
// FIXME: this should not have dev hardcoded
var s3Bucket = require('./config/deploy')('dev').s3.bucket;
if (process.env.DISABLE_FINGERPRINTS) {
fingerprint = false;
} else {
fingerprint = {
exclude: ['images/emoji'],
extensions: ['js', 'css', 'png', 'jpg', 'gif', 'map', 'svg']
extensions: ['js', 'css', 'png', 'jpg', 'gif', 'map', 'svg'],
prepend: '//' + s3Bucket + '.s3.amazonaws.com/',
};
if (assetsHost = process.env.ASSETS_HOST) {
if (assetsHost.substr(-1) !== '/') {
assetsHost = assetsHost + '/'
}
fingerprint.prepend = assetsHost
}
}
var app = new EmberApp({

View File

@ -28,8 +28,11 @@
"ember-cli-autoprefixer": "^0.5.0",
"ember-cli-babel": "^5.1.6",
"ember-cli-dependency-checker": "^1.2.0",
"ember-cli-deploy": "0.6.0",
"ember-cli-deploy-github": "0.3.0",
"ember-cli-deploy-lightning-pack": "0.6.1",
"ember-cli-deprecation-workflow": "0.1.6",
"ember-cli-document-title": "0.3.1",
"ember-cli-document-title": "0.2.0",
"ember-cli-htmlbars": "^1.0.3",
"ember-cli-htmlbars-inline-precompile": "^0.3.1",
"ember-cli-inject-live-reload": "^1.4.0",
@ -48,7 +51,6 @@
"ember-disable-proxy-controllers": "^1.0.1",
"ember-export-application-global": "^1.0.5",
"ember-load-initializers": "^0.5.1",
"ember-getowner-polyfill": "1.0.1",
"ember-resolver": "^2.0.3",
"ember-try": "0.0.7",
"emberx-select": "2.0.2",

View File

@ -4,6 +4,7 @@ import hbs from 'htmlbars-inline-precompile';
import fillIn from '../../helpers/fill-in';
import DS from 'ember-data';
moduleForComponent('add-env-var', 'Integration | Component | add env-var', {
integration: true
});
@ -13,7 +14,7 @@ test('it adds an env var on submit', function(assert) {
// this shouldn't be needed, probably some bug in tests setup with new ember-data
this.registry.register('transform:boolean', DS.BooleanTransform);
var store = Ember.getOwner(this).lookup('service:store');
var store = this.container.lookup('service:store');
assert.equal(store.peekAll('envVar').get('length'), 0, 'precond: store should be empty');
var repo;
@ -65,7 +66,7 @@ test('it adds a public env var on submit', function(assert) {
assert.expect(6);
this.registry.register('transform:boolean', DS.BooleanTransform);
var store = Ember.getOwner(this).lookup('service:store');
var store = this.container.lookup('service:store');
assert.equal(store.peekAll('envVar').get('length'), 0, 'precond: store should be empty');
var repo;

View File

@ -12,7 +12,7 @@ test('it adds an ssh key on submit', function(assert) {
assert.expect(6);
this.registry.register('transform:boolean', DS.BooleanTransform);
var store = Ember.getOwner(this).lookup('service:store');
var store = this.container.lookup('service:store');
var repo;
Ember.run(function() {
@ -47,7 +47,7 @@ test('it throws an error if value for ssh key is blank', function(assert) {
assert.expect(5);
this.registry.register('transform:boolean', DS.BooleanTransform);
var store = Ember.getOwner(this).lookup('service:store');
var store = this.container.lookup('service:store');
var repo;
Ember.run(function() {

View File

@ -4,6 +4,7 @@ import hbs from 'htmlbars-inline-precompile';
import fillIn from '../../helpers/fill-in';
import DS from 'ember-data';
moduleForComponent('env-var', 'Integration | Component | env-var', {
integration: true
});
@ -12,7 +13,7 @@ test('it renders an env-var with private value', function(assert) {
assert.expect(2);
this.registry.register('transform:boolean', DS.BooleanTransform);
var store = Ember.getOwner(this).lookup('service:store');
var store = this.container.lookup('service:store');
Ember.run(() => {
var envVar = store.push({data: { id: 1, type: 'env-var', attributes: { name: 'foo', value: 'bar', public: false}}});
this.set('envVar', envVar);
@ -29,7 +30,7 @@ test('it renders an env-var with public value', function(assert) {
assert.expect(2);
this.registry.register('transform:boolean', DS.BooleanTransform);
var store = Ember.getOwner(this).lookup('service:store');
var store = this.container.lookup('service:store');
Ember.run(() => {
var envVar = store.push({data: { id: 1, type: 'env-var', attributes: { name: 'foo', value: 'bar', public: true}}});
this.set('envVar', envVar);

View File

@ -3,6 +3,7 @@ import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
import fillIn from '../../helpers/fill-in';
moduleForComponent('ssh-key', 'Integration | Component | ssh-key', {
integration: true
});
@ -10,7 +11,7 @@ moduleForComponent('ssh-key', 'Integration | Component | ssh-key', {
test('it renders the default ssh key if no custom key is set', function(assert) {
assert.expect(2);
var store = Ember.getOwner(this).lookup('service:store');
var store = this.container.lookup('service:store');
var key = Ember.Object.create({fingerprint: 'fingerprint'});
this.set('key', key);
@ -24,7 +25,7 @@ test('it renders the default ssh key if no custom key is set', function(assert)
test('it renders the custom ssh key if custom key is set', function(assert) {
assert.expect(2);
var store = Ember.getOwner(this).lookup('service:store');
var store = this.container.lookup('service:store');
var key;
Ember.run(function() {
@ -43,7 +44,7 @@ test('it renders the custom ssh key if custom key is set', function(assert) {
test('it deletes a custom key if permissions are right', function(assert) {
assert.expect(1);
var store = Ember.getOwner(this).lookup('service:store');
var store = this.container.lookup('service:store');
var key;
Ember.run(function() {
@ -66,7 +67,7 @@ test('it deletes a custom key if permissions are right', function(assert) {
test('it does not delete the custom key if permissions are insufficient', function(assert) {
assert.expect(1);
var store = Ember.getOwner(this).lookup('service:store');
var store = this.container.lookup('service:store');
var key;
Ember.run(function() {

View File

@ -5,6 +5,7 @@ require 'delegate'
require 'time'
require 'json'
require 'travis/utils/deep_merge'
require 'redis'
class Travis::Web::App
autoload :AltVersions, 'travis/web/app/alt_versions'
@ -61,11 +62,21 @@ class Travis::Web::App
end
def call(env)
name = env['travis.alt'] || :default
routers[name] ||= create_router(alt: name)
route = routers[name].call(env)
route[1]["Date"] = Time.now.httpdate
route
# name = env['travis.alt'] || :default
# routers[name] ||= create_router(alt: name)
# route = routers[name].call(env)
# puts "routers"
# puts routers.inspect
# puts "env:"
# puts env
# puts "name: #{name}"
# puts "route!"
# puts route.inspect
# route[1]["Date"] = Time.now.httpdate
# route
req = Rack::Request.new(env)
response_for("index.html", {params: req.params, host: req.host})
end
private
@ -82,7 +93,7 @@ class Travis::Web::App
end
def response_for(file, options = {})
content = File.read(file)
content = content_for(file, options)
if fingerprinted?(file)
headers = {
'Content-Length' => content.bytesize.to_s,
@ -111,6 +122,20 @@ class Travis::Web::App
[ 200, headers, [content] ]
end
def content_for(file, options)
if index?(file)
redis = Redis.new
project = 'travis'
host = options[:host]
index_key = host.split('.')[0] || redis.get("#{project}:index:current")
redis.get("#{project}:index:#{index_key}")
else
content = File.read(file)
end
end
def each_file
Dir.glob(File.join(root, '**/*')) { |file| yield file if File.file?(file) }
end