dpl 1.8.19.travis.1647.3 → 1.8.19.travis.1649.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MmJlODY4ZDdjMmU5ZGRjYzZkZmFhY2ZjNzhmMTlhZmJmMjc4NDY4Yw==
4
+ Nzc1ODRlYTE1NjdhYTU4Y2I0OTI1MzRhNjkyN2EzNjA5ODQ2MTQzMg==
5
5
  data.tar.gz: !binary |-
6
- MWMzZjQyNGMyODI0MzI4NTk0Mjg4ZGM3OGUxNmZhZmJhNDAwYWIyZg==
6
+ MGYxMWEwMTQ4MjIwNzAzZTc0NjFkNTc4N2VhNDk5Y2Q3NDAxYzQwZg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MWRiMDFkZmQ4OWNhYzc4ZmVjYTQ2MmMyZGQxN2U4NTU0MWNhNjU2OWQ1ZTQ5
10
- YzUzN2RhMGVjZWY5MTcwOGZhZjNmYzI2NWNkNzMwZDJmM2E1OGViM2RmYWJh
11
- ODQ0MjdlMDA3M2Y2ZjAzNmZmOTA4ZDZhNDQ3MzdmYTE1MTI4ZTE=
9
+ M2MzMjAyNzk1ZTA2ZTQxNWE5Y2FhZTUyODJhZmFmYTQwM2NmZDFkNzA1M2M3
10
+ NmVkODRlM2M0ZTg5OTVkZmM0ZThiY2ZlZDA5NWUxZjBlMzBlMzA3OTA2NTk4
11
+ MWNhYzU1ZmE3OTJlMzk4ZjFmNDA1YzFkYTE3YTExYWJkYzNlMTI=
12
12
  data.tar.gz: !binary |-
13
- NmM0NTEzYjc3MDRiN2VkNTQxMmZhZjMzODMxYmM3ZmJkZWIyMDllOGU1MGFk
14
- MzUyOWYxZDc5YTFiMDMyMmE1MTUxNTcyNmQ0MjFkNGQ1MGU2N2JhZGU3MWE3
15
- MTA4YzczMDdhMzYxMzBmY2NhOGE5ZjdmNDAwNDRhYjdkZTgxNjI=
13
+ MDZlZTIwYmZlMGU2NTJiMWFjNWQ2ZTA0ZjRmY2EyOTY0MWU2ZTlmZDNiM2Q2
14
+ MWM1NWQzZTAxMDA1MDE2MDAzYThmYmM4ZDcxODMwZWQ1MTE2OWI0YWJlMmQ4
15
+ OWNkYTI0ZDQzYWY5OGIyNWY3ZGYzZWNjNmEwNWNiMTIyMDg4NTI=
data/README.md CHANGED
@@ -52,7 +52,7 @@ Dpl supports the following providers:
52
52
 
53
53
  Dpl is published to rubygems.
54
54
 
55
- * Dpl requires ruby with a version greater than 1.8.7
55
+ * Dpl requires ruby with a version greater than 1.9.3
56
56
  * To install: `gem install dpl`
57
57
 
58
58
  ## Usage:
@@ -69,18 +69,18 @@ Running dpl in a terminal that saves history is insecure as your password/api ke
69
69
 
70
70
  #### Options:
71
71
  * **api-key**: Heroku API Key
72
- * **strategy**: Deployment strategy for Dpl. Defaults to `api`. Other options are `git`, `git ssh`, and `git deploykey`.
72
+ * **strategy[git/anvil]**: Deployment strategy for Dpl. Defaults to anvil.
73
73
  * **app**: Heroku app name. Defaults to the name of your git repo.
74
74
  * **username**: heroku username. Not necessary if api-key is used. Requires git strategy.
75
75
  * **password**: heroku password. Not necessary if api-key is used. Requires git strategy.
76
76
 
77
- #### API vs Git vs Anvil Deploy:
78
- * API deploy will tar up the current directory (minus the git repo) and send it to Heroku.
79
- * Git deploy will send the contents of the git repo only, so may not contain any local changes.
80
- * Anvil deploys are no longer supported since Heroku shut down the Anvil service.
77
+ #### Git vs Anvil Deploy:
78
+ * Anvil will run the [buildpack](https://devcenter.heroku.com/articles/buildpacks) compilation step on the Travis CI VM, whereas the Git strategy will run it on a Heroku dyno, which provides the same environment the application will then run under and might be slightly faster.
81
79
  * The Git strategy allows using *user* and *password* instead of *api-key*.
82
80
  * When using Git, Heroku might send you an email for every deploy, as it adds a temporary SSH key to your account.
83
81
 
82
+ As a rule of thumb, you should switch to the Git strategy if you run into issues with Anvil or if you're using the [user-env-compile](https://devcenter.heroku.com/articles/labs-user-env-compile) plugin.
83
+
84
84
  #### Examples:
85
85
 
86
86
  dpl --provider=heroku --api-key=`heroku auth:token`
@@ -316,6 +316,7 @@ For authentication you can also use Travis CI secure environment variable:
316
316
  * **bucket**: S3 Bucket.
317
317
  * **region**: S3 Region. Defaults to us-east-1.
318
318
  * **upload-dir**: S3 directory to upload to. Defaults to root directory.
319
+ * **storage-class**: S3 storage class to upload as. Defaults to "STANDARD". Other values are "STANDARD_IA" or "REDUCED_REDUNDANCY". Details can be found [here](https://aws.amazon.com/s3/storage-classes/).
319
320
  * **local-dir**: Local directory to upload from. Can be set from a global perspective (~/travis/build) or relative perspective (build) Defaults to project root.
320
321
  * **detect-encoding**: Set HTTP header `Content-Encoding` for files compressed with `gzip` and `compress` utilities. Defaults to not set.
321
322
  * **cache_control**: Set HTTP header `Cache-Control` to suggest that the browser cache the file. Defaults to `no-cache`. Valid options are `no-cache`, `no-store`, `max-age=<seconds>`,`s-maxage=<seconds>` `no-transform`, `public`, `private`.
@@ -674,6 +675,9 @@ c. Update your `before_deploy` step in `.travis.yml` to update the `known_hosts`
674
675
 
675
676
  #### Options:
676
677
 
678
+ * **access_key_id**: AWS Access Key ID. Can be obtained from [here](https://console.aws.amazon.com/iam/home?#security_credential).
679
+ * **secret_access_key**: AWS Secret Key. Can be obtained from [here](https://console.aws.amazon.com/iam/home?#security_credential).
680
+ * **region**: AWS Region the Lambda function is running in. Defaults to 'us-east-1'.
677
681
  * **function_name**: Required. The name of the Lambda being created / updated.
678
682
  * **role**: Required. The ARN of the IAM role to assign to this Lambda function.
679
683
  * **handler_name**: Required. The function that Lambda calls to begin execution. For NodeJS, it is exported function for the module.
@@ -16,14 +16,15 @@ module DPL
16
16
  chmod +x $HOME/bin/gimme
17
17
  fi
18
18
 
19
- export GOPATH="$HOME/gopath:$GOPATH"
20
- eval "$(gimme 1.4.2)" &>/dev/null
19
+ if [ -z $GOPATH ]; then
20
+ export GOPATH="$HOME/gopath"
21
+ else
22
+ export GOPATH="$HOME/gopath:$GOPATH"
23
+ fi
24
+ eval "$(gimme 1.6)" &> /dev/null
21
25
 
22
26
  go get #{ATLAS_UPLOAD_CLI_GO_REMOTE}
23
- pushd $HOME/gopath/src/#{ATLAS_UPLOAD_CLI_GO_REMOTE} &>/dev/null
24
- make &>/dev/null
25
- cp bin/atlas-upload $HOME/bin/atlas-upload
26
- popd &>/dev/null
27
+ cp $HOME/gopath/bin/atlas-upload-cli $HOME/bin/atlas-upload
27
28
  fi
28
29
  EOF
29
30
 
@@ -59,7 +60,9 @@ module DPL
59
60
  private
60
61
 
61
62
  def install_atlas_upload
62
- context.shell ATLAS_UPLOAD_INSTALL_SCRIPT
63
+ without_git_http_user_agent do
64
+ context.shell ATLAS_UPLOAD_INSTALL_SCRIPT
65
+ end
63
66
  end
64
67
 
65
68
  def assert_app_present!
@@ -93,6 +96,13 @@ module DPL
93
96
  def atlas_app
94
97
  @atlas_app ||= options.fetch(:app).to_s
95
98
  end
99
+
100
+ def without_git_http_user_agent(&block)
101
+ git_http_user_agent = ENV.delete("GIT_HTTP_USER_AGENT")
102
+ yield
103
+ ENV["GIT_HTTP_USER_AGENT"] = git_http_user_agent
104
+ end
105
+
96
106
  end
97
107
  end
98
108
  end
@@ -50,6 +50,7 @@ module DPL
50
50
  opts[:cache_control] = get_option_value_by_filename(options[:cache_control], filename) if options[:cache_control]
51
51
  opts[:acl] = options[:acl].gsub(/_/, '-') if options[:acl]
52
52
  opts[:expires] = get_option_value_by_filename(options[:expires], filename) if options[:expires]
53
+ opts[:storage_class] = options[:storage_class] if options[:storage_class]
53
54
  unless File.directory?(filename)
54
55
  log "uploading #{filename.inspect} with #{opts.inspect}"
55
56
  result = api.bucket(option(:bucket)).object(upload_path(filename)).upload_file(filename, opts)
@@ -127,6 +127,13 @@ describe DPL::Provider::S3 do
127
127
  provider.push_app
128
128
  end
129
129
 
130
+ example "Sets Storage Class" do
131
+ provider.options.update(:storage_class => "STANDARD_AI")
132
+ expect(Dir).to receive(:glob).and_yield(__FILE__)
133
+ expect_any_instance_of(Aws::S3::Object).to receive(:upload_file).with(anything(), hash_including(:storage_class => "STANDARD_AI"))
134
+ provider.push_app
135
+ end
136
+
130
137
  example "Sets Website Index Document" do
131
138
  provider.options.update(:index_document_suffix => "test/index.html")
132
139
  expect(Dir).to receive(:glob).and_yield(__FILE__)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dpl
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.19.travis.1647.3
4
+ version: 1.8.19.travis.1649.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Konstantin Haase