Question

I just setup cruise control on my server for my projects . But now i am little bit confused how these rake task and capistrano work . I tried lots of settings but still no success . If somebody help how to run all rake task and after successful build how can i deploy my application .

Was it helpful?

Solution 2

Ok guys thanks after looking into code i find out that we can deploy -:

1.Either you can use ccrb_cap_deployer.rb plugin to do so , but it is little bit buggy so i made some changes in the path and pushed the code into git again here

https://vparihar01@github.com/webonise/cruisecontrol.git 
# in mean time I add some more plugins and features . Also add the wiki for proper step how to setup cruise control server and how make it customize as per your need

Now we had to add these two lines inside the project configuration file /.cruise/projects/your_project/cruise_config.rb

project.cap_deployer.emails = ['asda@fsdfsfsdfs.com'] #here add the email to notify given user if deployment is successful or not 
project.cap_deployer.stages = ['staging','production'] #here add the where you want to deploy test , staging or production

Also this plugin only let deploy the code into respective servers when the build is successful . Cheers

2.Second way is to create one shell script named it as build_script.sh to this path /.cruise/projects/your_project/work/

After that add

  #!/bin/bash
  # conditionally install project gems from Gemfile
  bundle check || bundle install || exit 1
  cap deploy

lines into the build_script.sh and save , Then add project.build_command = './build_script.sh' inside the project configuration file /.cruise/projects/your_project/cruise_config.rb
Now everthing done and works fine but in second method the problem is that if the build fails as well then also your code is deployed to server . SO i think that is a bad approach . Thanks for help everyone.

OTHER TIPS

CruiseControl isn't supposed to deploy your app.

When you want to deploy your app (after many successful cruisecontrol tests against many commits to source control, you'll then:

cap deploy

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top