Skip to content

Commit

Permalink
ci(aio): deploy from CI to staging
Browse files Browse the repository at this point in the history
  • Loading branch information
gkalpak authored and IgorMinar committed Jan 27, 2017
1 parent c37af2a commit 4165fdd
Show file tree
Hide file tree
Showing 20 changed files with 863 additions and 84 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
/dist/
node_modules
bower_components
angular.io/dist

# Include when developing application packages.
pubspec.lock
Expand Down
10 changes: 10 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,21 @@ branches:
- g3_v2_0

cache:
yarn: true
directories:
- ./node_modules
- ./.chrome/chromium
- ./angular.io/node_modules

env:
global:
# GITHUB_TOKEN_ANGULAR
# This is needed for the e2e Travis matrix task to publish packages to github for continuous packages delivery.
- secure: "fq/U7VDMWO8O8SnAQkdbkoSe2X92PVqg4d044HmRYVmcf6YbO48+xeGJ8yOk0pCBwl3ISO4Q2ot0x546kxfiYBuHkZetlngZxZCtQiFT9kyId8ZKcYdXaIW9OVdw3Gh3tQyUwDucfkVhqcs52D6NZjyE2aWZ4/d1V4kWRO/LMgo="
# FIREBASE_TOKEN
# This is needed for publishing builds to the "aio-staging" firebase site.
# TODO(i): the token was generated using the iminar@google account, we should switch to a shared/role-base account.
- secure: "MPx3UM77o5IlhT75PKHL0FXoB5tSXDc3vnCXCd1sRy4XUTZ9vjcV6nNuyqEf+SOw659bGbC1FI4mACGx1Q+z7MQDR85b1mcA9uSgHDkh+IR82CnCVdaX9d1RXafdJIArahxfmorbiiPPLyPIKggo7ituRm+2c+iraoCkE/pXxYg="
matrix:
# Order: a slower build first, so that we don't occupy an idle travis worker waiting for others to complete.
- CI_MODE=e2e EXPERIMENTAL_ES2015_DISTRO=1
Expand All @@ -35,6 +41,7 @@ env:
- CI_MODE=saucelabs_optional
- CI_MODE=browserstack_optional
- CI_MODE=docs_test
- CI_MODE=aio

matrix:
fast_finish: true
Expand All @@ -48,5 +55,8 @@ install:
script:
- ./scripts/ci-lite/build.sh && ./scripts/ci-lite/test.sh

after_success:
- ./scripts/ci-lite/deploy_aio_staging.sh

after_script:
- ./scripts/ci-lite/cleanup.sh
5 changes: 5 additions & 0 deletions angular.io/.firebaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"projects": {
"staging": "aio-staging"
}
}
2 changes: 1 addition & 1 deletion angular.io/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Run `ng generate component component-name` to generate a new component. You can

## Build

Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `-prod` flag for a production build.
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.

## Running unit tests

Expand Down
2 changes: 1 addition & 1 deletion angular.io/e2e/app.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ describe('site App', function() {

it('should display message saying app works', () => {
page.navigateTo();
expect(page.getParagraphText()).toEqual('app works!');
expect(page.getParagraphText()).toEqual('home-page works!');
});
});
2 changes: 1 addition & 1 deletion angular.io/e2e/app.po.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ export class SitePage {
}

getParagraphText() {
return element(by.css('app-root h1')).getText();
return element(by.css('app-home-page p')).getText();
}
}
8 changes: 0 additions & 8 deletions angular.io/index.html

This file was deleted.

1 change: 0 additions & 1 deletion angular.io/karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Karma configuration file, see link for more information
// https://karma-runner.github.io/0.13/config/configuration-file.html
console.log('karama!!!')
module.exports = function (config) {
config.set({
basePath: '',
Expand Down
10 changes: 9 additions & 1 deletion angular.io/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
{
"name": "angular.io",
"version": "0.0.0",
"main": "index.js",
"repository": "[email protected]:angular/angular.git",
"author": "Angular",
"license": "MIT",
"angular-cli": {},
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"lint": "tslint \"src/**/*.ts\" --project src/tsconfig.json --type-check && tslint \"e2e/**/*.ts\" --project e2e/tsconfig.json --type-check",
"test": "ng test",
"pree2e": "webdriver-manager update --standalone false --gecko false",
"e2e": "protractor"
"e2e": "protractor",
"deploy-staging": "firebase use staging --token \"$FIREBASE_TOKEN\" && yarn run ~~deploy",
"pre~~deploy": "ng build --prod",
"~~deploy": "firebase deploy --message \"Commit: $TRAVIS_COMMIT\" --non-interactive --token \"$FIREBASE_TOKEN\""
},
"private": true,
"dependencies": {
Expand All @@ -33,6 +40,7 @@
"@types/node": "^6.0.42",
"angular-cli": "1.0.0-beta.26",
"codelyzer": "~2.0.0-beta.1",
"firebase-tools": "^3.2.1",
"jasmine-core": "2.5.2",
"jasmine-spec-reporter": "2.5.0",
"karma": "1.2.0",
Expand Down
6 changes: 3 additions & 3 deletions angular.io/src/app/app.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ describe('AppComponent', () => {
// TestBed.compileComponents();
// });
it('should work', () => {
expect(true).toBe(true)
})
})
expect(true).toBe(true);
});
});

// it('should create the app', async(() => {
// const fixture = TestBed.createComponent(AppComponent);
Expand Down
2 changes: 1 addition & 1 deletion angular.io/src/app/docs-app/docs-app.component.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Component, OnInit } from '@angular/core';

@Component({
selector: 'ngio-docs-app',
selector: 'app-ngio-docs',
templateUrl: './docs-app.component.html',
styleUrls: ['./docs-app.component.css']
})
Expand Down
4 changes: 2 additions & 2 deletions angular.io/src/app/docs-app/docs-app.module.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { DocsAppComponent } from './docs-app.component'
import { RouterModule } from '@angular/router'
import { DocsAppComponent } from './docs-app.component';
import { RouterModule } from '@angular/router';

@NgModule({
imports: [
Expand Down
2 changes: 1 addition & 1 deletion angular.io/src/app/home-page/home-page.module.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { HomePageComponent } from './home-page.component';
import { RouterModule } from '@angular/router'
import { RouterModule } from '@angular/router';

@NgModule({
imports: [
Expand Down
Loading

0 comments on commit 4165fdd

Please sign in to comment.