Grunt task not executing

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

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. 

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)

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. 

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.

 

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. 

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

 

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. 

  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. 

Suggest an answer

Log in or Join to answer
Community showcase
Renan Battaglin
Published May 18, 2017 in Bamboo

FAQ: How to Upgrade Bamboo Server

Bamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...

1,070 views 0 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot