Created
July 24, 2012 00:24
-
-
Save drewdeponte/3167134 to your computer and use it in GitHub Desktop.
OctpusCI example job
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class RppTestJob < Octopusci::Job | |
def self.run(job_rec) | |
context "RSpec Tests (commit)" do | |
run_shell_cmd!("env 2>&1", true) | |
run_shell_cmd!("whoami 2>&1", true) | |
run_shell_cmd!("rvm rvmrc trust 2>&1") | |
run_shell_cmd!("rvm rvmrc load 2>&1") | |
run_shell_cmd!("bundle install 2>&1", true) | |
run_shell_cmd!("STAGE=#{job_rec['stage']} REPO_OWNER=#{job_rec['repo_owner_name']} bundle exec cap deploy:setup 2>&1", true) | |
run_shell_cmd!("STAGE=#{job_rec['stage']} REPO_OWNER=#{job_rec['repo_owner_name']} bundle exec cap deploy:cleanup 2>&1", true) | |
run_shell_cmd!("STAGE=#{job_rec['stage']} REPO_OWNER=#{job_rec['repo_owner_name']} bundle exec cap deploy -S branch=#{job_rec['branch_name']} 2>&1", true) | |
run_shell_cmd!("STAGE=#{job_rec['stage']} REPO_OWNER=#{job_rec['repo_owner_name']} bundle exec cap deploy:restart 2>&1", true) | |
run_shell_cmd!("STAGE=#{job_rec['stage']} REPO_OWNER=#{job_rec['repo_owner_name']} bundle exec cap deploy:testdbreset 2>&1", true) | |
run_shell_cmd!("STAGE=#{job_rec['stage']} REPO_OWNER=#{job_rec['repo_owner_name']} bundle exec cap deploy:rspec 2>&1") | |
end | |
context "Cucumber Tests (acceptance)" do | |
run_shell_cmd!("STAGE=#{job_rec['stage']} REPO_OWNER=#{job_rec['repo_owner_name']} bundle exec cap deploy:cucumber 2>&1") | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment