9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
# File 'lib/chatops_deployer/destroy_job.rb', line 9
def perform(repository:, branch:, callback_url:)
git_basename = repository.split('/').last
project = File.basename(git_basename,File.extname(git_basename))
@branch = branch
@deployment_alias = "#{project}-#{branch}"
project_dir = "#{WORKSPACE}/#{project}/#{branch}"
puts "Removing #{project_dir}"
FileUtils.rm_rf project_dir
if remove_nginx_config && dockerdown
callback(callback_url, :destroy_success)
else
callback(callback_url, :destroy_failure)
end
end
|