Skip to content

Commit 4165fdd

Browse files
gkalpakIgorMinar
authored andcommitted
ci(aio): deploy from CI to staging
1 parent c37af2a commit 4165fdd

20 files changed

Lines changed: 863 additions & 84 deletions

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
/dist/
44
node_modules
55
bower_components
6+
angular.io/dist
67

78
# Include when developing application packages.
89
pubspec.lock

.travis.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,21 @@ branches:
1717
- g3_v2_0
1818

1919
cache:
20+
yarn: true
2021
directories:
2122
- ./node_modules
2223
- ./.chrome/chromium
24+
- ./angular.io/node_modules
2325

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

3946
matrix:
4047
fast_finish: true
@@ -48,5 +55,8 @@ install:
4855
script:
4956
- ./scripts/ci-lite/build.sh && ./scripts/ci-lite/test.sh
5057

58+
after_success:
59+
- ./scripts/ci-lite/deploy_aio_staging.sh
60+
5161
after_script:
5262
- ./scripts/ci-lite/cleanup.sh

angular.io/.firebaserc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"projects": {
3+
"staging": "aio-staging"
4+
}
5+
}

angular.io/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Run `ng generate component component-name` to generate a new component. You can
1111

1212
## Build
1313

14-
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.
14+
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.
1515

1616
## Running unit tests
1717

angular.io/e2e/app.e2e-spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ describe('site App', function() {
99

1010
it('should display message saying app works', () => {
1111
page.navigateTo();
12-
expect(page.getParagraphText()).toEqual('app works!');
12+
expect(page.getParagraphText()).toEqual('home-page works!');
1313
});
1414
});

angular.io/e2e/app.po.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ export class SitePage {
66
}
77

88
getParagraphText() {
9-
return element(by.css('app-root h1')).getText();
9+
return element(by.css('app-home-page p')).getText();
1010
}
1111
}

angular.io/index.html

Lines changed: 0 additions & 8 deletions
This file was deleted.

angular.io/karma.conf.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Karma configuration file, see link for more information
22
// https://karma-runner.github.io/0.13/config/configuration-file.html
3-
console.log('karama!!!')
43
module.exports = function (config) {
54
config.set({
65
basePath: '',

angular.io/package.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,22 @@
11
{
22
"name": "angular.io",
33
"version": "0.0.0",
4+
"main": "index.js",
5+
"repository": "[email protected]:angular/angular.git",
6+
"author": "Angular",
47
"license": "MIT",
58
"angular-cli": {},
69
"scripts": {
710
"ng": "ng",
811
"start": "ng serve",
12+
"build": "ng build",
913
"lint": "tslint \"src/**/*.ts\" --project src/tsconfig.json --type-check && tslint \"e2e/**/*.ts\" --project e2e/tsconfig.json --type-check",
1014
"test": "ng test",
1115
"pree2e": "webdriver-manager update --standalone false --gecko false",
12-
"e2e": "protractor"
16+
"e2e": "protractor",
17+
"deploy-staging": "firebase use staging --token \"$FIREBASE_TOKEN\" && yarn run ~~deploy",
18+
"pre~~deploy": "ng build --prod",
19+
"~~deploy": "firebase deploy --message \"Commit: $TRAVIS_COMMIT\" --non-interactive --token \"$FIREBASE_TOKEN\""
1320
},
1421
"private": true,
1522
"dependencies": {
@@ -33,6 +40,7 @@
3340
"@types/node": "^6.0.42",
3441
"angular-cli": "1.0.0-beta.26",
3542
"codelyzer": "~2.0.0-beta.1",
43+
"firebase-tools": "^3.2.1",
3644
"jasmine-core": "2.5.2",
3745
"jasmine-spec-reporter": "2.5.0",
3846
"karma": "1.2.0",

angular.io/src/app/app.component.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ describe('AppComponent', () => {
1313
// TestBed.compileComponents();
1414
// });
1515
it('should work', () => {
16-
expect(true).toBe(true)
17-
})
18-
})
16+
expect(true).toBe(true);
17+
});
18+
});
1919

2020
// it('should create the app', async(() => {
2121
// const fixture = TestBed.createComponent(AppComponent);

0 commit comments

Comments
 (0)