Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

Grunt - fail the build if a task fails #762

Merged
merged 2 commits into from
Aug 6, 2015

Conversation

lirantal
Copy link
Member

@lirantal lirantal commented Aug 5, 2015

Updating grunt 'force' option to default/force it to false so that we can fail any task that is failing and thus fail the build in case of any issues in tests, jshint conventions, and so on.

This ensures that our CI process is catching any issues.

@@ -208,7 +208,7 @@ module.exports = function (grunt) {
require('load-grunt-tasks')(grunt);

// Making grunt default to force in order not to break the project.
Copy link
Member

Choose a reason for hiding this comment

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

Update the comment too, but can't we just delete it from the file?

Copy link
Member Author

Choose a reason for hiding this comment

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

about the comment yeah, but we have this:
grunt.option('force', false);
if we leave it there in the gruntfile then even if you do grunt test --force the force option won't override it and it will force the build to fail in any case. If we do remove this option then grunt indeed defaults to failing tests but you can override it with the --force option from cmdline.

WDYT we should choose?

Copy link
Member

Choose a reason for hiding this comment

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

I think letting people override from cmd is better because the cmd is already open to run grunt anyway.

@lirantal
Copy link
Member Author

lirantal commented Aug 5, 2015

addresses issue #761 and #717

@lirantal
Copy link
Member Author

lirantal commented Aug 5, 2015

and yay, we finally have some build fails.

… can fail any task that is failing and thus fail the build in case of any issues in tests, jshint conventions, and so on
@codydaig
Copy link
Member

codydaig commented Aug 5, 2015

We need to update the travis config then to install SASS properly. That's what this PR is failing on.

@lirantal
Copy link
Member Author

lirantal commented Aug 5, 2015

Yep, noticed.
I'll update the PR later.
On Aug 5, 2015 4:58 PM, "Cody B. Daig" notifications@github.com wrote:

We need to update the travis config then to install SASS properly. That's
what this PR is failing on.


Reply to this email directly or view it on GitHub
#762 (comment).

@lirantal lirantal force-pushed the feature/grunt_fail_on_failures branch from 3d61836 to ad31495 Compare August 5, 2015 16:01
@codydaig
Copy link
Member

codydaig commented Aug 5, 2015

LGTM

@lirantal lirantal added this to the 0.4.x milestone Aug 5, 2015
@lirantal lirantal self-assigned this Aug 5, 2015
@@ -6,3 +6,6 @@ env:
- NODE_ENV=travis
services:
- mongodb
before_install:
- gem update --system
- gem install sass --version "=3.3.7"
Copy link
Member

Choose a reason for hiding this comment

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

newline?

Copy link
Member Author

Choose a reason for hiding this comment

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

@ilanbiala fixed

@lirantal lirantal force-pushed the feature/grunt_fail_on_failures branch from ad31495 to dd254e1 Compare August 6, 2015 12:31
@ilanbiala
Copy link
Member

LGTM now.

@lirantal
Copy link
Member Author

lirantal commented Aug 6, 2015

@ilanbiala, Guys

We should really get this one pushed in quick because our CI is simply not reliable anymore.
I found one of my commits showing green on the merge PR window but looking into the travis-ci log (knowing that it's not reliable) I found this:

image

So let's try to push this in ASAP so we can add some trust to the travis-ci safety-net

@ilanbiala
Copy link
Member

@lirantal I don't see any issues with it, let's merge it in now no?

@lirantal
Copy link
Member Author

lirantal commented Aug 6, 2015

Cool

lirantal added a commit that referenced this pull request Aug 6, 2015
@lirantal lirantal merged commit 1e51e06 into meanjs:master Aug 6, 2015
@codydaig codydaig mentioned this pull request Aug 7, 2015
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.

3 participants