Jenkins Rails build execute script
So if you’ve got your Jenkins build hosted on AWS with a configured AMI that’s booted as a slave node to run your tests on, you probably don’t want to have any per project configuration on that image so as to make it easy to add a new project to the build without having to create an new AMI image.
One of those common configuration options is the database.yml file. Just go into your projects configuration and under Build select the execute shell option and paste something similar into it to create a database.yml file.