Bunty Thakkar
Bunty Thakkar

Reputation: 83

Team Build stops and waits for Gulp task to finish

I have an existing nodejs app which i have pushed to the VSTS repository. I have added three build tasks

  1. npm install - running fine
  2. Gulp - i have a gulpfile in which there is one task which executes "nodemon app.js" command, runs fine but this command starts listening the ports and hence the 3rd task which is the Web App task doesnt gets build. Until and unless Gulp task is built successfully, 3rd task wont get built. for eg "Express server started listening on port 1234" and then the gulp build task is still in running state due to which upfront task doesnt get started.

Upvotes: 1

Views: 333

Answers (1)

jessehouwing
jessehouwing

Reputation: 114561

Some tasks, like nodemon start a background process and will watch the folder for changes. Normally you'd place these under the watch command, then implement a one-pass version of that in the build command.

As long as the Watch is running, control over the process isn't handed back to the Build agent and this will hang your build.

(Re)moving the commands that start watch/monitor processes so they won't get executed during a build is your best solution.

Upvotes: 2

Related Questions