Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

[WIP] chore(ci): add check-deploy to CI #1867

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,24 @@ env:
- DBUS_SESSION_BUS_ADDRESS=/dev/null
- DISPLAY=:99.0
- CHROME_BIN=chromium-browser
- LATEST_RELEASE=2.0.0-rc.4
matrix:
- SCRIPT=lint
- SCRIPT="run-e2e-tests --fast"
- SCRIPT="run-e2e-tests --fast" PREVIEW=true
- TASK=lint
- TASK="run-e2e-tests --fast" SCRIPT=examples-install.sh
- TASK="run-e2e-tests --fast" SCRIPT=examples-install-preview.sh
- TASK=harp-compile SCRIPT=deploy-install.sh
- TASK=harp-compile SCRIPT=deploy-install-preview.sh
matrix:
fast_finish: true
allow_failures:
- env: "SCRIPT=\"run-e2e-tests --fast\" PREVIEW=true"
- env: "TASK=\"run-e2e-tests --fast\" SCRIPT=examples-install-preview.sh"
- env: "TASK=harp-compile SCRIPT=deploy-install-preview.sh"
before_install:
- npm install -g gulp --no-optional
install:
- npm install --no-optional
- if [[ $SCRIPT ]]; then ./scripts/$SCRIPT; fi
before_script:
- sh -e /etc/init.d/xvfb start
install:
- ./scripts/install.sh
- if [[ $PREVIEW == true ]]; then npm install --prefix public/docs/_examples angular/{core,common,compiler,platform-browser,platform-browser-dynamic,http,forms,router-deprecated,router,upgrade}-builds; fi
script:
- gulp $SCRIPT
- gulp $TASK
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ This project generates a lot of untracked files, if you wish to reset it to a mi

- `git clean -xdf`

Also, there is a script available for Linux and OSX users that will setup the project using the steps shown in this section:
Also, there is a script available for Linux, OSX and Windows Gitbash users that will setup the project using the steps shown in this section:

- `./scripts/install.sh`
- `npm install --no-optional && ./scripts/examples-install.sh`


## Technology Used
Expand Down
14 changes: 7 additions & 7 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -564,16 +564,16 @@ gulp.task('git-changed-examples', ['_shred-devguide-examples'], function(){
});
});

gulp.task('harp-compile', ['build-docs'], function() {
return harpCompile();
});

gulp.task('check-deploy', ['build-docs'], function() {
return harpCompile().then(function() {
gutil.log('compile ok');
if(argv.dryRun) {
return false;
} else {
gutil.log('running live server ...');
execPromise('npm run live-server ./www');
return askDeploy();
}
gutil.log('running live server ...');
execPromise('npm run live-server ./www');
return askDeploy();
}).then(function(shouldDeploy) {
if (shouldDeploy) {
gutil.log('deploying...');
Expand Down
6 changes: 6 additions & 0 deletions scripts/deploy-install-preview.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash

set -ex -o pipefail

./scripts/deploy-install.sh
(cd ../angular && git checkout master)
5 changes: 5 additions & 0 deletions scripts/deploy-install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash

set -ex -o pipefail

(cd ../ && git clone https://github.com/angular/angular.git --branch $LATEST_RELEASE)
6 changes: 6 additions & 0 deletions scripts/examples-install-preview.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash

set -ex -o pipefail

./scripts/examples-install.sh
(cd public/docs/_examples && npm install angular/{core,common,compiler,platform-browser,platform-browser-dynamic,http,forms,router-deprecated,router,upgrade}-builds --no-optional)
1 change: 0 additions & 1 deletion scripts/install.sh → scripts/examples-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

set -ex -o pipefail

npm install --no-optional
(cd public/docs/_examples && npm install --no-optional)
(cd public/docs/_examples/_protractor && npm install --no-optional)
npm run webdriver:update --prefix public/docs/_examples/_protractor
Expand Down