Grunt task not executing

Philip Parker March 16, 2016

I have Cloud Bamboo.

Problem statement: Grunt tasks (build, deploy) not running

Successful tasks:

  • npm install
  • npm install -g grunt-cli
  • npm install grunt -g

I have added "Grunt 0.4.x" task for running "grunt deploy. However build does not execute.

 

bamboo.png

Log file snippet

  
16-Mar-2016 09:57:58Finished task 'Install Grunt' with result: Success
16-Mar-2016 09:57:58Skipping execution of task 'Deploy' as it is disabled
16-Mar-2016 09:57:58Running post build plugin 'Docker Container Cleanup'
16-Mar-2016 09:57:58Running post build plugin 'NCover Results Collector'
16-Mar-2016 09:57:58Running post build plugin 'Clover Results Collector'
16-Mar-2016 09:57:58Running post build plugin 'npm Cache Cleanup'
16-Mar-2016 09:57:58Running post build plugin 'Artifact Copier'
16-Mar-2016 09:57:58Publishing an artifact: Toolkit artifacts
16-Mar-2016 09:58:19Finished publishing of artifact Job artifact: [Toolkit artifacts], pattern: [**/*.*] in 21s
16-Mar-2016 09:58:19Finalising the build...
  

8 answers

0 votes
Kalle Sirkesalo March 22, 2016
  1. Kalle Sirkesalo

    That step is currently disabled so this doesn't really tell anything as your grunt won't run if it's disabled. You need to enable the job step.

     

    Try disabling and enabling it. 

  2. Philip Parker

    Hi, I have disabled and re-enabled Grunt job step. I ran the build. Enclosed is a link to the log if you have access. 

    https://hpstage.atlassian.net/builds/browse/CAP-TCI-DEMO-98/log

    The build was successful, but /deploy was not created looking at Artifacts

    https://hpstage.atlassian.net/builds/browse/CAP-TCI-98/artifact/DEMO/Toolkit-artifacts/

    Additional question.

    The path to Grunt CLI executable. Which path would be correct? 

    • node_modules/grunt/lib/grunt.js
    • gruntfile.js (my grunt tasks)
  3. Kalle Sirkesalo

    It would be the the gruntfile.js as far as I can see what you are doing. Sadly I have no access to the logs. 

  4. Philip Parker

    I changes to my grunt file reference to execute tasks in "Gruntfile.js". So all the job steps are working except the "grunt deploy --production". This executes locally for me without issues.

    Since the job step creates a "/deploy" directory, could this be a permission issue when the directory can not be created?

    Can I add you to my Bamboo as a user so you can help debug? This would be helpful since these seems like pretty standard build using grunt and bamboo.

     

  5. Kalle Sirkesalo

    Okay so then what your missing is the user rights to that folder /deploy < you need to check that somehow or then deploy on the workspace in this case to test that it works. 

    so what you want to do is do it more like

    mkdir deploy

    grunt deploy --production within folder deploy

    This will show you the user right issue then you can just go and add bamboo agent rights to that folder or deploy to somekind of file storage.

    Yeah it's okay to add me. 

  6. Philip Parker

    Hi,

    I was able to solve the issue by adding dependency in package.json to "grunt-cli". This installed a local version in /node_modules. Thanks for assistance. Final issue is adding "ruby" and "sass" clients on build> I have read this is quite difficult based on answers below. Any insights ?

    https://answers.atlassian.com/questions/225134/how-to-set-up-ruby-and-gems-on-bamboo-ondemand

     

  7. Kalle Sirkesalo

    Might not be possible in the on demand instances. I run few self hosted bamboos so can't really say how to setup on demand that much. 

0 votes
Kalle Sirkesalo March 22, 2016

Might not be possible in the on demand instances. I run few self hosted bamboos so can't really say how to setup on demand that much. 

0 votes
Philip Parker March 22, 2016

Hi,

I was able to solve the issue by adding dependency in package.json to "grunt-cli". This installed a local version in /node_modules. Thanks for assistance. Final issue is adding "ruby" and "sass" clients on build> I have read this is quite difficult based on answers below. Any insights ?

https://answers.atlassian.com/questions/225134/how-to-set-up-ruby-and-gems-on-bamboo-ondemand

 

0 votes
Kalle Sirkesalo March 21, 2016

Okay so then what your missing is the user rights to that folder /deploy < you need to check that somehow or then deploy on the workspace in this case to test that it works. 

so what you want to do is do it more like

mkdir deploy

grunt deploy --production within folder deploy

This will show you the user right issue then you can just go and add bamboo agent rights to that folder or deploy to somekind of file storage.

Yeah it's okay to add me. 

0 votes
Philip Parker March 21, 2016

I changes to my grunt file reference to execute tasks in "Gruntfile.js". So all the job steps are working except the "grunt deploy --production". This executes locally for me without issues.

Since the job step creates a "/deploy" directory, could this be a permission issue when the directory can not be created?

Can I add you to my Bamboo as a user so you can help debug? This would be helpful since these seems like pretty standard build using grunt and bamboo.

 

0 votes
Kalle Sirkesalo March 21, 2016

It would be the the gruntfile.js as far as I can see what you are doing. Sadly I have no access to the logs. 

0 votes
Philip Parker March 21, 2016

Hi, I have disabled and re-enabled Grunt job step. I ran the build. Enclosed is a link to the log if you have access. 

https://hpstage.atlassian.net/builds/browse/CAP-TCI-DEMO-98/log

The build was successful, but /deploy was not created looking at Artifacts

https://hpstage.atlassian.net/builds/browse/CAP-TCI-98/artifact/DEMO/Toolkit-artifacts/

Additional question.

The path to Grunt CLI executable. Which path would be correct? 

  • node_modules/grunt/lib/grunt.js
  • gruntfile.js (my grunt tasks)
0 votes
Kalle Sirkesalo March 21, 2016

That step is currently disabled so this doesn't really tell anything as your grunt won't run if it's disabled. You need to enable the job step.

 

Try disabling and enabling it. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events