How can I pass variables to the Rake Plugin?

Article ID:204274300
1 minute readKnowledge base

Issue

  • Can I pass variables to the Rake Plugin?

  • What is the proper syntax for passing variables to the Rake Plugin?

Environment

  • CloudBees Jenkins Enterprise 1.580

  • 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.