Issue
-
Can I pass variables to the Rake Plugin?
-
What is the proper syntax for passing variables to the Rake Plugin?
Resolution
You need to be able to pass in parameters to a rake task.
For example:
rake spec role=web env=dev
In this case, the values of role and env are variables. The appropriate syntax for this is:
rake spec role=${ROLE} env=${ENV}
This article is part of our Knowledge Base and is provided for guidance-based purposes only. The solutions or workarounds described here are not officially supported by CloudBees and may not be applicable in all environments. Use at your own discretion, and test changes in a safe environment before applying them to production systems.