chore(ci): add check-deploy to CI

closes #1867
This commit is contained in:
Filipe Silva 2016-07-11 15:54:29 +01:00 committed by Ward Bell
parent abd860c3ca
commit abe9dbe092
7 changed files with 38 additions and 18 deletions

View File

@ -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

View File

@ -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`
### Run with current build instead of release packages
Can switch the `@angular` packages in `~/public/docs/_examples/node_modules` to the current build packages with

View File

@ -594,16 +594,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...');

View File

@ -0,0 +1,6 @@
#!/usr/bin/env bash
set -ex -o pipefail
./scripts/deploy-install.sh
(cd ../angular && git checkout master)

5
scripts/deploy-install.sh Executable file
View File

@ -0,0 +1,5 @@
#!/usr/bin/env bash
set -ex -o pipefail
(cd ../ && git clone https://github.com/angular/angular.git --branch $LATEST_RELEASE)

View File

@ -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)

View File

@ -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