locked
TFS 2015.3 On-prem : Gulp step error does not fail the build RRS feed

  • Question

  • Hello,

    this Gulp error should fail the build but it continues on:

    1. 
      
    2. 2017-05-29T05:17:48.8733544Z Error in plugin 'sass'
    3. 2017-05-29T05:17:48.8733544Z Message:
    4. 2017-05-29T05:17:48.8889799Z     node_modules\@angular\material\_theming.scss
    5. 2017-05-29T05:17:48.8889799Z Error: argument `$color` of `opacity($color)` must be a color
    6. 2017-05-29T05:17:48.8889799Z        Backtrace:
    7. 2017-05-29T05:17:48.8889799Z        	node_modules/@angular/material/_theming.scss:1114, in function `opacity`
    8. 2017-05-29T05:17:48.8889799Z        	node_modules/@angular/material/_theming.scss:1114, in function `if`
    9. 2017-05-29T05:17:48.8889799Z        	node_modules/@angular/material/_theming.scss:1114, in function `mat-color`
    10. 2017-05-29T05:17:48.8889799Z        	node_modules/@angular/material/_theming.scss:2540, in mixin `mat-slider-theme`
    11. 2017-05-29T05:17:48.8889799Z        	node_modules/@angular/material/_theming.scss:2757, in mixin `angular-material-theme`
    12. 2017-05-29T05:17:48.8889799Z        	origin/sass/adlib.scss:67
    13. 2017-05-29T05:17:48.8889799Z         on line 1114 of node_modules/@angular/material/_theming.scss
    14. 2017-05-29T05:17:48.8889799Z >>   $opacity: if($opacity == null, opacity($color), $opacity);
    15. 2017-05-29T05:17:48.8889799Z    ---------------------------------^

    Any ideas why this is happening? It makes it tricky to debug errors when a subsequent step fails. "Continue On Error" is not enabled.

    Thanks!


    Dave S.

    Monday, May 29, 2017 11:26 AM

All replies

  • Hi Dave S.

    Thank you for posting here.

    Do you mean that the Gulp task failed but the subsequent tasks can continue running or just the Gulp task passed with the error? What is the state of the Gulp task, is it marked as fail or pass?  Also the state of the build, failed or pass or Partially succeeded?

    Normally, the build is passed/failed base on the execution status of all the build steps in the build definition.

    If the Gulp task is failed without "Continue on error" option checked, the build will stop at this step. The subsequent tasks will not run and the build will be failed.

    But if with "Always run" option checked for the subsequent tasks, they will always run even though previous steps are failed.

    So, please check the tasks settings in the definition first.

    Best Regards.


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, May 30, 2017 6:33 AM
  • hi Andy-Li,

    I believe that all your questions were answered in my first post.

    The Gulp step has an error. Continue on error is NOT enabled.

    The build should fail immediately at the Gulp step because there is an error.

    Why is it not failing?


    Dave S.

    Friday, June 2, 2017 12:03 PM
  • Hi Dave S.

    Thank you for posting here.

    Just as I mentioned in above post, if with "Always run" option checked for the subsequent tasks, they will always run even though previous steps are failed. That means if the tasks behind Gulp step set to "Always run", the build will continue even though the Gulp step is failed. So, I suggest you check the tasks settings first.

    I checked this issue in my side, everything works correctly. You can try to create a new build definition with the Gulp task and check if that can be reproduced, or any other messages can be captured for further troubleshoot.

    Best Regards.


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, June 5, 2017 1:21 AM
  • I'm having this issue as well.  

    I have a gulp task and a visual studio build task.

    Neither of them have 'always run' or 'continue on error' checked

    if gulp has an error,  like a missing file or something like that, TFS doesn't care, it will move on to do the visual studio build regardless.

    Is there something in gulp i need to fire off to get this to work?  basically my gulp methods look like:

    var jqkendo = [
            paths.node + "jquery/dist/jquery.js",
            paths.appjs + "kendo/2017.2.504/kendo.web.js",
            paths.appjs + "kendo/2017.2.504/kendo.aspnetmvc.js"];
        gulp.src(jqkendo)
            .pipe(expect(jqkendo))
            .pipe(sourcemaps.init())
            .pipe(concat("jqkendo.js").on('error', gutil.log))
            .pipe(gulp.dest(paths.jsdist))
            .pipe(uglify({ compress: { negate_iife: false } }).on('error', gutil.log))
            .pipe(rename("jqkendo.min.js").on('error', gutil.log))
            .pipe(sourcemaps.write('.').on('error', gutil.log))
            .pipe(gulp.dest(paths.jsdist))
            ;


    Phil Johnson

    Wednesday, June 21, 2017 9:26 PM
  • Seeing this as an issue on TFS 2017. Continue on error and Always run are both unchecked. Build continues doing whatever it wants despite errors in that step.
    Friday, December 1, 2017 6:09 PM