Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Running tests in Bamboo with a Gulp task

I configured a Bamboo job to run tests with a Gulp task. The Gulpfile.js provides an endpoint to run the test suite such as :

/webroot:port/tests/testLogin?testMode=1.

Somehow, the Bamboo task checks out the repository as expected and runs without error but cannot find the tests. However, I believe that Gulp cannot run the endpoint for some reason and therefore cannot find the tests. Bamboo's log does not provide any information on this and just returns a success.

My question is: In order to launch the test suite, Gulp requires a command gulp --url www.domain.com in order to form the complete endpoint:

http://www.domain.com/webroot:port/tests/testLogin?testMode=1

Where, in Bamboo task configuration should we provide this command?

2 answers

1 vote

Hi Philippe,

In this case I believe the only way to introduce a new parameter would be to create a Suggestion for the Gulp task at JAC.

Another option would be to run Gulp from the command line and not use the Gulp task and pass the entire command you want to execute to the Script task.

Cheers,

Branden

Thanks, Branden! In fact, I just realised that the Gulp task must run within the build directory, itself located in the bamboo-home.  Currently the bamboo-home is outside the web root, which means the command endpoint cannot be run... I probably have to re-install Bamboo and have Bamboo-home created under the web root.

1 vote
Marcin Oles Atlassian Team Aug 30, 2017

Hi Philippe,

just to add to what @somethingblue said:

It is technically possible to append custom configuration to the "Task" field of the Gulp task. Although this is not the cleanest solution, it should just do the trick. Simply setting the "Task" field to "task-to-execute --my-option --my-second-option" would work.

Additionally, if you find a need for more specific configuration of one of Node.js based tools, I'd say the fallback is to use Node.js task in Bamboo. There you can freely define exactly what you're interested in running - e.g. "node_modules/gulp/bin/gulp --custom-options gulp-task".

The advantage of Node.js task over the Script task is that it uses the Node.js capability, ensuring that only build agents capable of running Node will execute your plan.

Regards,
Marcin

Thanks Marcin, this is a good alternative. I am going to try running Node directly. But I think the cause of the problem is that the build directory and therefore bamboo-home are not located under my web root, which means a call to the test suite  at: http://www.domain.com/webroot:port/tests/runTests.cfm won't work anyway.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bamboo

Bamboo 101 Video

G’day Community! As we gear up to introduce Bamboo Data Center to the world, we wanted to make sure that we shared a bit more about Bamboo, the product. Our team has put together an overview video ...

190 views 4 6
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you