Skip to content

Commit a4ec962

Browse files
authored
Merge branch 'master' into mri2.5.0
2 parents b37309e + 9dcc4d9 commit a4ec962

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+1050
-244
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
*Issue #, if available:*
2+
3+
*Description of changes:*
4+
5+
6+
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@ RemoteSystemsTempFiles/
88
codedeploy-local.log*
99
codedeploy-local.*.log
1010
deployment/
11+
.idea/
12+
.DS_STORE

CODE_OF_CONDUCT.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
## Code of Conduct
2+
This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
3+
For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
4+
[email protected] with any additional questions or comments.

CONTRIBUTING.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Contributing Guidelines
2+
3+
Thank you for your interest in contributing to our project. Whether it's a bug report, new feature, correction, or additional
4+
documentation, we greatly value feedback and contributions from our community.
5+
6+
Please read through this document before submitting any issues or pull requests to ensure we have all the necessary
7+
information to effectively respond to your bug report or contribution.
8+
9+
10+
## Reporting Bugs/Feature Requests
11+
12+
We welcome you to use the GitHub issue tracker to report bugs or suggest features.
13+
14+
When filing an issue, please check [existing open](https://github.com/aws/aws-codedeploy-agent/issues), or [recently closed](https://github.com/aws/aws-codedeploy-agent/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aclosed%20), issues to make sure somebody else hasn't already
15+
reported the issue. Please try to include as much information as you can. Details like these are incredibly useful:
16+
17+
* A reproducible test case or series of steps
18+
* The version of our code being used
19+
* Any modifications you've made relevant to the bug
20+
* Anything unusual about your environment or deployment
21+
22+
23+
## Contributing via Pull Requests
24+
Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that:
25+
26+
1. You are working against the latest source on the *master* branch.
27+
2. You check existing open, and recently merged, pull requests to make sure someone else hasn't addressed the problem already.
28+
3. You open an issue to discuss any significant work - we would hate for your time to be wasted.
29+
30+
To send us a pull request, please:
31+
32+
1. Fork the repository.
33+
2. Modify the source; please focus on the specific change you are contributing. If you also reformat all the code, it will be hard for us to focus on your change.
34+
3. Ensure local tests pass.
35+
4. Commit to your fork using clear commit messages.
36+
5. Send us a pull request, answering any default questions in the pull request interface.
37+
6. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation.
38+
39+
GitHub provides additional document on [forking a repository](https://help.github.com/articles/fork-a-repo/) and
40+
[creating a pull request](https://help.github.com/articles/creating-a-pull-request/).
41+
42+
43+
## Finding contributions to work on
44+
Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels ((enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any ['help wanted'](https://github.com/aws/aws-codedeploy-agent/labels/help%20wanted) issues is a great place to start.
45+
46+
47+
## Code of Conduct
48+
This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
49+
For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
50+
[email protected] with any additional questions or comments.
51+
52+
53+
## Security issue notifications
54+
If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/). Please do **not** create a public github issue.
55+
56+
57+
## Licensing
58+
59+
See the [LICENSE](https://github.com/aws/aws-codedeploy-agent/blob/master/LICENSE) file for our project's licensing. We will ask you to confirm the licensing of your contribution.
60+
61+
We may ask you to sign a [Contributor License Agreement (CLA)](http://en.wikipedia.org/wiki/Contributor_License_Agreement) for larger changes.

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,17 @@ The integration test creates the following
3737
It terminates the test ec2 instance and deletes the CodeDeploy application at the end of each test run.
3838
It also terminates any test ec2 instances before starting up the test.
3939

40-
Create your default aws credentials file in the default location (~/.aws/credentials on linux/mac and %USERPROFILE%.awscredentials on windows). Add your AWS access key, secret key, and optionally your session token there. The access key should have permission to create the above mentioned resources. You can also change the default region. To run the integration test execute
40+
Create your default aws credentials file in the default location (~/.aws/credentials on linux/mac and %USERPROFILE%.awscredentials on windows). Add your AWS access key, secret key, and optionally your session token there. The access key should have permission to create the above mentioned resources. You can also change the default region. Note that temporary credentials won't work.
41+
42+
Sample format of the credentials file:
43+
44+
```
45+
[default]
46+
aws_access_key_id=<keyID>
47+
aws_secret_access_key=<key>
48+
```
49+
50+
To run the integration test execute:
4151

4252
```
4353
rake test-integration

bin/codedeploy-agent

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
$:.unshift File.join(File.dirname(File.expand_path('..', __FILE__)), 'lib')
44

5-
ruby_versions = ["2.4", "2.3", "2.2", "2.1", "2.0"]
5+
ruby_versions = ["2.5", "2.4", "2.3", "2.2", "2.1", "2.0"]
66
actual_ruby_version = RUBY_VERSION.split('.').map{|s|s.to_i}
77
left_bound = '2.0.0'.split('.').map{|s|s.to_i}
88
ruby_bin = nil

bin/codedeploy-local

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ Synopsis
5050
[--type <value>]
5151
[--file-exists-behavior <value>]
5252
[--deployment-group <value>]
53+
[--deployment-group-name <value>]
54+
[--application-name <value>]
5355
[--events <value>]
5456
[--agent-configuration-file <value>]
5557
@@ -69,6 +71,12 @@ Options
6971
The path to the folder that is the target location for the content to be deployed. If you do not specify a folder, the tool creates one named default-local-deployment-group inside your deployment root directory. For each local deployment you create, the tool creates a subdirectory inside this folder with names like d-98761234-local. Your configuration shows it would be placed in #{InstanceAgent::Config.config[:root_dir]}/<deployment-group>. You can use the :root_dir: variable in an agent configuration file to configure a custom deployment root folder. If you want to deploy to a location previously deployed to by AWS CodeDeploy, you must specify its deployment group ID, which you can look up by using the AWS CLI. [default: #{AWS::CodeDeploy::Local::Deployer::DEFAULT_DEPLOYMENT_GROUP_ID}].
7072
See also: "get-deployment-group” in the AWS CLI Reference for AWS CodeDeploy.
7173
74+
-d, --deployment-group-name <value>
75+
Indicates the deployment group name to be used during the CodeDeploy hook execution, can be accessed on the DEPLOYMENT_GROUP_NAME environment variable. If you do not specify a name, "LocalFleet" will be used.
76+
77+
-a, --application-name <value>
78+
Indicates the application name to be used during the CodeDeploy hook execution, can be accessed on the APPLICATION_NAME environment variable. If you do not specify a name, the "bundle-location" will be used.
79+
7280
-e, --events <comma-separated-values>
7381
A set of lifecycle event hooks you want to run, in order, instead of the events listed in the AppSpec file. Multiple hook names must be separated by commas. If you don't specify DownloadBundle and Install events in the --events list, they will run before all the event hooks you do specify. If you include DownloadBundle and Install in the --events list, they can be preceded only by events that normally run before them in AWS CodeDeploy deployments.
7482

bin/install

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -243,15 +243,24 @@ EOF
243243
uri = get_s3_uri(region, bucket, key)
244244

245245
# stream package file to disk
246+
retries ||= 0
247+
exceptions = [OpenURI::HTTPError, OpenSSL::SSL::SSLError]
246248
begin
247249
uri.open(:ssl_verify_mode => OpenSSL::SSL::VERIFY_PEER, :redirect => true, :read_timeout => 120, :proxy => @http_proxy) do |s3|
248-
package_file.write(s3.read)
250+
package_file.write(s3.read)
251+
end
252+
rescue *exceptions => e
253+
@log.error("Could not find package to download at '#{uri.to_s}' - Retrying... Attempt: '#{retries.to_s}'")
254+
if (retries < 5)
255+
sleep 2 ** retries
256+
retries += 1
257+
retry
258+
else
259+
@log.error("Could not download CodeDeploy Agent Package. Exiting Install script.")
260+
exit(1)
249261
end
250-
rescue OpenURI::HTTPError => e
251-
@log.error("Could not find package to download at '#{uri.to_s}'")
252-
exit(1)
253262
end
254-
end
263+
end
255264

256265
def get_version_file_from_s3(region, bucket, key)
257266
@log.info("Downloading version file from bucket #{bucket} and key #{key}...")

buildspec-agent-rake.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
version: 0.2
2+
3+
phases:
4+
install:
5+
commands:
6+
- echo Installing bundler
7+
- gem install bundler
8+
- echo Using bundler to install remaining gems
9+
- bundle install
10+
pre_build:
11+
commands:
12+
- echo Build started on `date`
13+
- echo Running rake - unit tests
14+
- rake
15+
build:
16+
commands:
17+
- echo Build completed on `date`
18+
- echo Running rake test-integration - integ tests
19+
- rake test-integration
20+
post_build:
21+
commands:
22+
- echo $CODEBUILD_SOURCE_VERSION > codebuild_source_commit_id
23+
artifacts:
24+
files:
25+
- codebuild_source_commit_id

codedeploy_agent-1.1.0.gemspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Gem::Specification.new do |spec|
1717
spec.add_dependency('aws-sdk-core', '~> 2.9')
1818
spec.add_dependency('simple_pid', '~> 0.2.1')
1919
spec.add_dependency('docopt', '~> 0.5.0')
20+
spec.add_dependency('concurrent-ruby', '~> 1.0.5')
2021

2122
spec.add_development_dependency('rake', '~> 10.0')
2223
spec.add_development_dependency('rspec', '~> 3.2.0')

0 commit comments

Comments
 (0)