dpl 2.0.0.alpha.2 → 2.0.0.alpha.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +34 -1
  3. data/Gemfile.lock +13 -8
  4. data/NOTES.md +1 -74
  5. data/README.md +464 -193
  6. data/lib/dpl/assets/convox/install +11 -0
  7. data/lib/dpl/assets/dpl/README.erb.md +4 -0
  8. data/lib/dpl/cli.rb +54 -18
  9. data/lib/dpl/ctx/test.rb +7 -3
  10. data/lib/dpl/helper/env.rb +67 -18
  11. data/lib/dpl/helper/wrap.rb +9 -0
  12. data/lib/dpl/provider.rb +11 -9
  13. data/lib/dpl/provider/dsl.rb +3 -1
  14. data/lib/dpl/provider/status.rb +6 -6
  15. data/lib/dpl/providers.rb +3 -1
  16. data/lib/dpl/providers/anynines.rb +5 -3
  17. data/lib/dpl/providers/azure_web_apps.rb +1 -1
  18. data/lib/dpl/providers/bintray.rb +2 -0
  19. data/lib/dpl/providers/bluemixcloudfoundry.rb +5 -3
  20. data/lib/dpl/providers/boxfuse.rb +1 -1
  21. data/lib/dpl/providers/cargo.rb +10 -1
  22. data/lib/dpl/providers/chef_supermarket.rb +3 -1
  23. data/lib/dpl/providers/cloud66.rb +2 -0
  24. data/lib/dpl/providers/cloudfiles.rb +2 -0
  25. data/lib/dpl/providers/cloudformation.rb +278 -0
  26. data/lib/dpl/providers/cloudfoundry.rb +6 -4
  27. data/lib/dpl/providers/codedeploy.rb +5 -5
  28. data/lib/dpl/providers/convox.rb +121 -0
  29. data/lib/dpl/providers/datica.rb +1 -1
  30. data/lib/dpl/providers/engineyard.rb +2 -0
  31. data/lib/dpl/providers/gae.rb +6 -7
  32. data/lib/dpl/providers/gcs.rb +5 -3
  33. data/lib/dpl/providers/gleis.rb +70 -0
  34. data/lib/dpl/providers/hackage.rb +2 -0
  35. data/lib/dpl/providers/hephy.rb +3 -1
  36. data/lib/dpl/providers/heroku.rb +4 -8
  37. data/lib/dpl/providers/heroku/api.rb +4 -2
  38. data/lib/dpl/providers/heroku/git.rb +3 -1
  39. data/lib/dpl/providers/lambda.rb +4 -4
  40. data/lib/dpl/providers/launchpad.rb +3 -1
  41. data/lib/dpl/providers/netlify.rb +2 -0
  42. data/lib/dpl/providers/npm.rb +2 -0
  43. data/lib/dpl/providers/openshift.rb +2 -0
  44. data/lib/dpl/providers/opsworks.rb +1 -1
  45. data/lib/dpl/providers/packagecloud.rb +2 -0
  46. data/lib/dpl/providers/pages.rb +4 -7
  47. data/lib/dpl/providers/pages/api.rb +16 -12
  48. data/lib/dpl/providers/pages/git.rb +16 -12
  49. data/lib/dpl/providers/puppetforge.rb +2 -0
  50. data/lib/dpl/providers/pypi.rb +2 -0
  51. data/lib/dpl/providers/releases.rb +8 -6
  52. data/lib/dpl/providers/rubygems.rb +3 -1
  53. data/lib/dpl/providers/s3.rb +7 -7
  54. data/lib/dpl/providers/scalingo.rb +2 -0
  55. data/lib/dpl/providers/testfairy.rb +2 -0
  56. data/lib/dpl/providers/transifex.rb +2 -0
  57. data/lib/dpl/version.rb +1 -1
  58. metadata +7 -3
  59. data/lib/dpl/providers/atlas.rb +0 -49
@@ -12,6 +12,8 @@ module Dpl
12
12
  gem 'puppet', '~> 5.5.14', require: 'puppet/face'
13
13
  gem 'puppet-blacksmith', '~> 3.3.1', require: 'puppet_blacksmith'
14
14
 
15
+ env :puppetforge
16
+
15
17
  opt '--username NAME', 'Puppet Forge user name', required: true, alias: :user
16
18
  opt '--password PASS', 'Puppet Forge password', required: true, secret: true
17
19
  opt '--url URL', 'Puppet Forge URL to deploy to', default: 'https://forgeapi.puppetlabs.com/'
@@ -13,6 +13,8 @@ module Dpl
13
13
 
14
14
  VERSION = /\A\d+(?:\.\d+)*\z/
15
15
 
16
+ env :pypi
17
+
16
18
  opt '--username NAME', 'PyPI Username', required: true, alias: :user
17
19
  opt '--password PASS', 'PyPI Password', required: true, secret: true
18
20
  opt '--server SERVER', 'Release to a different index', default: 'https://upload.pypi.org/legacy/'
@@ -13,14 +13,16 @@ module Dpl
13
13
  gem 'mime-types', '~> 3.2.2'
14
14
  gem 'public_suffix', '~> 3.0.3'
15
15
 
16
- required :api_key, [:user, :password]
16
+ env :github, :releases
17
17
 
18
- opt '--api_key TOKEN', 'GitHub oauth token (needs public_repo or repo permission)', secret: true
18
+ required :token, [:username, :password]
19
+
20
+ opt '--token TOKEN', 'GitHub oauth token (needs public_repo or repo permission)', secret: true, alias: :api_key
19
21
  opt '--username LOGIN', 'GitHub login name', alias: :user
20
22
  opt '--password PASS', 'GitHub password', secret: true
21
23
  opt '--repo SLUG', 'GitHub repo slug', default: :repo_slug
22
- opt '--file FILE', 'File to release to GitHub', required: true, type: :array
23
- opt '--file_glob', 'Interpret files as globs'
24
+ opt '--file GLOB', 'File or glob to release to GitHub', default: '*', type: :array
25
+ opt '--file_glob', 'Interpret files as globs', default: true
24
26
  opt '--overwrite', 'Overwrite files with the same name'
25
27
  opt '--prerelease', 'Identify the release as a prerelease'
26
28
  opt '--release_number NUM', 'Release number (overide automatic release detection)'
@@ -30,7 +32,7 @@ module Dpl
30
32
  opt '--tag_name TAG', 'Git tag from which to create the release'
31
33
  opt '--target_commitish STR', 'Commitish value that determines where the Git tag is created from'
32
34
  opt '--name NAME', 'Name for the release'
33
- # should this have --github_url, like Pages does?
35
+ # should this have --url, like Pages does?
34
36
 
35
37
  needs :git
36
38
 
@@ -189,7 +191,7 @@ module Dpl
189
191
  end
190
192
 
191
193
  def creds
192
- username && password ? { login: username, password: password } : { access_token: api_key }
194
+ username && password ? { login: username, password: password } : { access_token: token }
193
195
  end
194
196
 
195
197
  def files
@@ -9,7 +9,9 @@ module Dpl
9
9
 
10
10
  gem 'gems', '~> 1.1.1'
11
11
 
12
- required :api_key, [:user, :password]
12
+ env :rubygems
13
+
14
+ required :api_key, [:username, :password]
13
15
 
14
16
  opt '--api_key KEY', 'Rubygems api key', secret: true
15
17
  opt '--username USER', 'Rubygems user name', alias: :user
@@ -17,7 +17,7 @@ module Dpl
17
17
  gem 'aws-sdk-s3', '~> 1.0'
18
18
  gem 'mime-types', '~> 3.2.2'
19
19
 
20
- env :aws
20
+ env :aws, :s3
21
21
  config '~/.aws/credentials', '~/.aws/config', prefix: 'aws'
22
22
 
23
23
  opt '--access_key_id ID', 'AWS access key id', required: true, secret: true
@@ -26,19 +26,19 @@ module Dpl
26
26
  opt '--region REGION', 'S3 region', default: 'us-east-1'
27
27
  opt '--endpoint URL', 'S3 endpoint'
28
28
  opt '--upload_dir DIR', 'S3 directory to upload to'
29
- opt '--storage_class CLASS', 'S3 storage class to upload as', default: 'STANDARD', enum: %w(STANDARD STANDARD_IA REDUCED_REDUNDANCY)
30
- opt '--server_side_encryption', 'Use S3 Server Side Encryption (SSE-AES256)'
31
29
  opt '--local_dir DIR', 'Local directory to upload from', default: '.', example: '~/travis/build (absolute path) or ./build (relative path)'
30
+ opt '--dot_match', 'Upload hidden files starting with a dot'
31
+ opt '--acl ACL', 'Access control for the uploaded objects', default: 'private', enum: %w(private public_read public_read_write authenticated_read bucket_owner_read bucket_owner_full_control)
32
32
  opt '--detect_encoding', 'HTTP header Content-Encoding for files compressed with gzip and compress utilities'
33
33
  opt '--cache_control STR', 'HTTP header Cache-Control to suggest that the browser cache the file', type: :array, default: 'no-cache', enum: [/^no-cache.*/, /^no-store.*/, /^max-age=\d+.*/, /^s-maxage=\d+.*/, /^no-transform/, /^public/, /^private/], note: 'accepts mapping values to globs', eg: 'public: *.css,*.js'
34
34
  opt '--expires DATE', 'Date and time that the cached object expires', type: :array, format: /^"?\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2} .+"?.*$/, note: 'accepts mapping values to globs', eg: '2020-01-01 00:00:00 UTC: *.css,*.js'
35
- opt '--acl ACL', 'Access control for the uploaded objects', default: 'private', enum: %w(private public_read public_read_write authenticated_read bucket_owner_read bucket_owner_full_control)
36
- opt '--dot_match', 'Upload hidden files starting with a dot'
37
- opt '--index_document_suffix SUFFIX', 'Index document suffix of a S3 website'
38
35
  opt '--default_text_charset CHARSET', 'Default character set to append to the content-type of text files'
39
- opt '--max_threads NUM', 'The number of threads to use for S3 file uploads', default: 5, max: 15, type: :integer
36
+ opt '--storage_class CLASS', 'S3 storage class to upload as', default: 'STANDARD', enum: %w(STANDARD STANDARD_IA REDUCED_REDUNDANCY)
37
+ opt '--server_side_encryption', 'Use S3 Server Side Encryption (SSE-AES256)'
38
+ opt '--index_document_suffix SUFFIX', 'Index document suffix of a S3 website'
40
39
  opt '--overwrite', 'Whether or not to overwrite existing files', default: true
41
40
  opt '--force_path_style', 'Whether to force keeping the bucket name on the path'
41
+ opt '--max_threads NUM', 'The number of threads to use for S3 file uploads', default: 5, max: 15, type: :integer
42
42
  opt '--verbose', 'Be verbose about uploading files'
43
43
  # how come there is no glob or file option?
44
44
 
@@ -7,6 +7,8 @@ module Dpl
7
7
  tbd
8
8
  str
9
9
 
10
+ env :scalingo
11
+
10
12
  required :api_token, [:username, :password]
11
13
 
12
14
  opt '--app APP', default: :repo_name
@@ -16,6 +16,8 @@ module Dpl
16
16
  gem 'json'
17
17
  gem 'multipart-post', '~> 2.0.0', require: 'net/http/post/multipart'
18
18
 
19
+ env :testfairy
20
+
19
21
  opt '--api_key KEY', 'TestFairy API key', required: true, secret: true
20
22
  opt '--app_file FILE', 'Path to the app file that will be generated after the build (APK/IPA)', required: true
21
23
  opt '--symbols_file FILE', 'Path to the symbols file'
@@ -11,6 +11,8 @@ module Dpl
11
11
 
12
12
  required :api_token, [:username, :password]
13
13
 
14
+ env :transifex
15
+
14
16
  opt '--api_token TOKEN', 'Transifex API token', secret: true
15
17
  opt '--username NAME', 'Transifex username'
16
18
  opt '--password PASS', 'Transifex password', secret: true
@@ -1,3 +1,3 @@
1
1
  module Dpl
2
- VERSION = '2.0.0.alpha.2'
2
+ VERSION = '2.0.0.alpha.5'
3
3
  end
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: 2.0.0.alpha.2
4
+ version: 2.0.0.alpha.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Konstantin Haase
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2019-08-28 00:00:00.000000000 Z
13
+ date: 2019-09-11 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: cl
@@ -63,6 +63,7 @@ files:
63
63
  - bin/dpl
64
64
  - lib/dpl.rb
65
65
  - lib/dpl/assets/atlas/install
66
+ - lib/dpl/assets/convox/install
66
67
  - lib/dpl/assets/dpl/README.erb.md
67
68
  - lib/dpl/assets/dpl/git_ssh
68
69
  - lib/dpl/assets/git/detect_private_key
@@ -80,6 +81,7 @@ files:
80
81
  - lib/dpl/helper/interpolate.rb
81
82
  - lib/dpl/helper/memoize.rb
82
83
  - lib/dpl/helper/squiggle.rb
84
+ - lib/dpl/helper/wrap.rb
83
85
  - lib/dpl/helper/zip.rb
84
86
  - lib/dpl/provider.rb
85
87
  - lib/dpl/provider/dsl.rb
@@ -87,7 +89,6 @@ files:
87
89
  - lib/dpl/provider/status.rb
88
90
  - lib/dpl/providers.rb
89
91
  - lib/dpl/providers/anynines.rb
90
- - lib/dpl/providers/atlas.rb
91
92
  - lib/dpl/providers/azure_web_apps.rb
92
93
  - lib/dpl/providers/bintray.rb
93
94
  - lib/dpl/providers/bluemixcloudfoundry.rb
@@ -96,14 +97,17 @@ files:
96
97
  - lib/dpl/providers/chef_supermarket.rb
97
98
  - lib/dpl/providers/cloud66.rb
98
99
  - lib/dpl/providers/cloudfiles.rb
100
+ - lib/dpl/providers/cloudformation.rb
99
101
  - lib/dpl/providers/cloudfoundry.rb
100
102
  - lib/dpl/providers/codedeploy.rb
103
+ - lib/dpl/providers/convox.rb
101
104
  - lib/dpl/providers/datica.rb
102
105
  - lib/dpl/providers/elasticbeanstalk.rb
103
106
  - lib/dpl/providers/engineyard.rb
104
107
  - lib/dpl/providers/firebase.rb
105
108
  - lib/dpl/providers/gae.rb
106
109
  - lib/dpl/providers/gcs.rb
110
+ - lib/dpl/providers/gleis.rb
107
111
  - lib/dpl/providers/hackage.rb
108
112
  - lib/dpl/providers/hephy.rb
109
113
  - lib/dpl/providers/heroku.rb
@@ -1,49 +0,0 @@
1
- module Dpl
2
- module Providers
3
- class Atlas < Provider
4
- status :alpha
5
-
6
- description sq(<<-str)
7
- tbd
8
- str
9
-
10
- opt '--app APP', 'The Atlas application to upload to', required: true
11
- opt '--token TOKEN', 'The Atlas API token', required: true, secret: true
12
- opt '--paths PATH', 'Files or directories to upload', type: :array, default: ['.']
13
- opt '--address ADDR', 'The address of the Atlas server'
14
- opt '--include GLOB', 'Glob pattern of files or directories to include', type: :array
15
- opt '--exclude GLOB', 'Glob pattern of files or directories to exclude', type: :array
16
- opt '--metadata DATA', 'Arbitrary key=value (string) metadata to be sent with the upload', type: :array
17
- opt '--vcs', 'Get lists of files to exclude and include from a VCS (Git, Mercurial or SVN)'
18
- opt '--args ARGS', 'Args to pass to the atlas-upload CLI'
19
- opt '--debug', 'Turn on debug output'
20
-
21
- cmds upload: 'atlas-upload %{args} %{app} %{path}'
22
-
23
- def setup
24
- ENV['ATLAS_TOKEN'] = token
25
- end
26
-
27
- def install
28
- script :install
29
- end
30
-
31
- def deploy
32
- paths.each { |path| upload(path) }
33
- end
34
-
35
- private
36
-
37
- def upload(path)
38
- shell :upload, path: path
39
- # shell ['atlas-upload', args, app, path].compact.join(' ')
40
- end
41
-
42
- ARGS = %i(address exclude include metadata vcs debug)
43
-
44
- def args
45
- super || opts_for(ARGS, prefix: '-')
46
- end
47
- end
48
- end
49
- end