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

Conversation

filipesilva
Copy link
Contributor

This PR adds CI entries to the existing matrix that run gulp check-deploy for the latest release and for the master branch of angular.io.

@@ -7,3 +7,4 @@ npm install --no-optional
(cd public/docs/_examples/_protractor && npm install --no-optional)
npm run webdriver:update --prefix public/docs/_examples/_protractor
gulp add-example-boilerplate
sh -e /etc/init.d/xvfb start
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Problem with this is that I couldn't use this script anymore on my machine to install the repo, right? Couldn't we leave this on the travis file?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, didn't know that was an issue but it makes sense.

@filipesilva filipesilva force-pushed the add-check-deploy-ci branch from 581e275 to fbfb759 Compare July 11, 2016 15:29
@filipesilva
Copy link
Contributor Author

This PR will require that the latest release be updated on the LATEST_RELEASE travis env global as part of the release process for new angular.io updates.

@filipesilva filipesilva force-pushed the add-check-deploy-ci branch 4 times, most recently from 4dc91f6 to 80374f6 Compare July 11, 2016 16:12
@filipesilva
Copy link
Contributor Author

@chalin can you review and tell me if this is what you intended?

I'm talking with @naomiblack for a way around the LATEST_RELEASE variable, but for now it works.

@filipesilva filipesilva force-pushed the add-check-deploy-ci branch from 80374f6 to c2c1437 Compare July 11, 2016 20:12
@chalin
Copy link
Contributor

chalin commented Jul 12, 2016

Great to see this move forward! Please see my comments below.


The check-deploy --dry-run essentially just does a harp compile. Defining and using a simpler target might make sense (in fact, I've been using such a target in my Dart API work):

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

Note that scripts/install.sh is now part of our instructions to developers on how to install/reset their workspace. Could you ensure that you keep a copy of this file?

Actually, I think that we can simplify the situation by having a single install.sh script with conditional logic inside (defaulting to the install steps we had before). To accomplish this we might need a matrix something like this:

env:
  ...
  matrix:
    - TASK=lint
    - TASK='e2e --fast' PREVIEW=false
    - TASK='e2e --fast' PREVIEW=true
    - TASK='check' PREVIEW=false
    - TASK='check' PREVIEW=true
matrix:
  ...
  allow_failures:
    - env: "TASK='e2e --fast' PREVIEW=true"
    - env: "TASK='check' PREVIEW=true"
...
install:
  - ./scripts/install.sh

Then scripts/install.sh could have conditional logic based on the value of TASK. This is just a suggestion, but having a single install.sh file also makes it easier to assess the installation variants.

Btw, eventually we may also want to add checks on the output produced by the harp compile command to help determine if the check was truly successful or not.

Looking forward to having this in master.

@filipesilva
Copy link
Contributor Author

@chalin thanks for the feedback! I think the simpler task for harp seems like a good idea, I'll put that in.

I don't think having a simple script with conditionals inside is a good idea though. It might default to what install.sh did, but that's not a one size fit all. In fact, that install.sh was only part of the install procedure - the bit that prepared the environment for authors (and only TS/JS ones I suspect).

That is why I renamed it to examples-install.sh. The only difference from before is that it doesn't do a base npm install --no-optional, which I agree we should add back for simplicity's sake.

I see the CI being expanded to also running dart if possible, but even in that case it's still useful to have the standalone scripts that setup your environment for what you need instead of having to setting flags locally to guide an install script.

@filipesilva
Copy link
Contributor Author

Ah, I remember why I left npm install --no-optional out of examples-install.sh... because linting the project doesn't need the rest of the install procedure, but needs npm install --no-optional.

I'll update the readme to reflect that.

@filipesilva filipesilva force-pushed the add-check-deploy-ci branch from c2c1437 to 9e80e41 Compare July 13, 2016 01:55
@filipesilva
Copy link
Contributor Author

Updated the PR with a dedicated gulp task and updated readme.

@chalin
Copy link
Contributor

chalin commented Jul 13, 2016

LGTM

@filipesilva
Copy link
Contributor Author

@naomiblack this PR still missing the latest release tag in angular/angular but it good otherwise. After it's in, we should look at triggering angular/angular.io CI on master when there is a angular/angular build.

cc @IgorMinar

@filipesilva filipesilva reopened this Jul 13, 2016
@wardbell
Copy link
Contributor

Merging because @chalin and @filipesilva say so. Presumably they'll fix a busted CI.

@wardbell wardbell closed this in abe9dbe Jul 14, 2016
@wardbell wardbell deleted the add-check-deploy-ci branch July 14, 2016 21:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants