From 6ea2d620d1c6100805ac04f7560a4d46c9ac01e5 Mon Sep 17 00:00:00 2001 From: Joy Prakash Sharma Date: Thu, 4 Aug 2016 18:55:28 +0530 Subject: [PATCH] Always pull the latest changes from github By default AWS CodeDeploy pulls the last successful deployment revision. This change ensures that latest commit from the repository will be deployed no matter what. NOTE: This won't work if you try to Deploy to a previous revision from within AWS CodeDeploy console. In these scenarios the workaround will be to just add your previous commit to HEAD and then let the codedeployer agent pull that as a latest deployment. --- lib/instance_agent/plugins/codedeploy/command_executor.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/instance_agent/plugins/codedeploy/command_executor.rb b/lib/instance_agent/plugins/codedeploy/command_executor.rb index 08d0cf72..fb75eda4 100644 --- a/lib/instance_agent/plugins/codedeploy/command_executor.rb +++ b/lib/instance_agent/plugins/codedeploy/command_executor.rb @@ -235,7 +235,7 @@ def download_from_github(deployment_spec, account, repo, commit, anonymous, toke format = 'tarball' end - uri = URI.parse("https://api.github.com/repos/#{account}/#{repo}/#{format}/#{commit}") + uri = URI.parse("https://api.github.com/repos/#{account}/#{repo}/#{format}") options = {:ssl_verify_mode => OpenSSL::SSL::VERIFY_PEER, :redirect => true, :ssl_ca_cert => ENV['AWS_SSL_CA_DIRECTORY']} if anonymous