dpl 2.0.0.beta.2 → 2.0.3.beta.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +18 -0
- data/CONTRIBUTING.md +3 -3
- data/Gemfile +1 -1
- data/Gemfile.lock +118 -99
- data/README.md +203 -41
- data/lib/dpl/assets/dpl/README.erb.md +3 -3
- data/lib/dpl/assets/dpl/git_ssh +7 -1
- data/lib/dpl/cli.rb +1 -1
- data/lib/dpl/helper/interpolate.rb +11 -4
- data/lib/dpl/provider.rb +1 -1
- data/lib/dpl/providers/bluemixcloudfoundry.rb +1 -1
- data/lib/dpl/providers/boxfuse.rb +1 -1
- data/lib/dpl/providers/cloudfoundry.rb +3 -1
- data/lib/dpl/providers/codedeploy.rb +7 -2
- data/lib/dpl/providers/ecr.rb +127 -0
- data/lib/dpl/providers/elasticbeanstalk.rb +12 -6
- data/lib/dpl/providers/gcs.rb +1 -1
- data/lib/dpl/providers/git_push.rb +269 -0
- data/lib/dpl/providers/gleis.rb +1 -1
- data/lib/dpl/providers/lambda.rb +1 -1
- data/lib/dpl/providers/netlify.rb +2 -0
- data/lib/dpl/providers/nuget.rb +39 -0
- data/lib/dpl/providers/pages/git.rb +5 -4
- data/lib/dpl/providers/puppetforge.rb +2 -2
- data/lib/dpl/providers/releases.rb +1 -1
- data/lib/dpl/providers/rubygems.rb +2 -2
- data/lib/dpl/providers/snap.rb +1 -1
- data/lib/dpl/providers.rb +3 -0
- data/lib/dpl/string_ext.rb +21 -0
- data/lib/dpl/version.rb +1 -1
- data/lib/dpl.rb +1 -0
- metadata +9 -8
- data/NOTES.md +0 -78
- data/dpl-chef_supermarket-1.10.14.gem +0 -0
- data/dpl.gemspec +0 -22
- data/status.json +0 -227
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# Dpl [![Build Status](https://travis-ci.com/travis-ci/dpl.svg?branch=master)](https://travis-ci.com/travis-ci/dpl) [![Code Climate](https://codeclimate.com/github/travis-ci/dpl.svg)](https://codeclimate.com/github/travis-ci/dpl) [![Coverage Status](https://coveralls.io/repos/travis-ci/dpl/badge.svg?branch=master&service=github&cache=2019-08-09_17:00)](https://coveralls.io/github/travis-ci/dpl?branch=master) [![Gem Version](https://img.shields.io/gem/v/dpl)](http://rubygems.org/gems/dpl) [![Yard Docs](http://img.shields.io/badge/yard-docs-blue.svg)](http://rubydoc.info/github/travis-ci/dpl)
|
2
2
|
|
3
3
|
This version of the README documents dpl v2, the next major version of dpl.
|
4
|
-
The
|
4
|
+
The README for dpl v1, the version that is currently used in production on
|
5
5
|
Travis CI can be found [here](https://github.com/travis-ci/dpl/blob/v1/README.md).
|
6
6
|
|
7
7
|
Dpl is command line tool for deploying code, html, packages, or build artifacts
|
@@ -29,7 +29,7 @@ please do not hesitate to get in touch, and we'll help you [add it](#contributin
|
|
29
29
|
|
30
30
|
## Requirements
|
31
31
|
|
32
|
-
Dpl requires Ruby 2.
|
32
|
+
Dpl requires Ruby 2.3 or later.
|
33
33
|
|
34
34
|
Depending on the deployment target dpl might require additional runtimes (e.g.
|
35
35
|
Go, Node.js, or Python) to be installed. It also might require sudo access in
|
@@ -98,6 +98,7 @@ Dpl supports the following providers:
|
|
98
98
|
* [Anynines](#anynines)
|
99
99
|
* [AWS CloudFormation](#aws-cloudformation)
|
100
100
|
* [AWS Code Deploy](#aws-code-deploy)
|
101
|
+
* [AWS ECR](#aws-ecr)
|
101
102
|
* [AWS Elastic Beanstalk](#aws-elastic-beanstalk)
|
102
103
|
* [AWS Lambda](#aws-lambda)
|
103
104
|
* [AWS OpsWorks](#aws-opsworks)
|
@@ -116,8 +117,9 @@ Dpl supports the following providers:
|
|
116
117
|
* [Engineyard](#engineyard)
|
117
118
|
* [Firebase](#firebase)
|
118
119
|
* [Flynn](#flynn)
|
120
|
+
* [Git (push)](#git-push)
|
119
121
|
* [GitHub Pages](#github-pages)
|
120
|
-
* [GitHub Pages (API)](#github-pages-api
|
122
|
+
* [GitHub Pages (API)](#github-pages-api)
|
121
123
|
* [GitHub Releases](#github-releases)
|
122
124
|
* [Gleis](#gleis)
|
123
125
|
* [Google App Engine](#google-app-engine)
|
@@ -129,6 +131,7 @@ Dpl supports the following providers:
|
|
129
131
|
* [Launchpad](#launchpad)
|
130
132
|
* [Netlify](#netlify)
|
131
133
|
* [npm](#npm)
|
134
|
+
* [nuget](#nuget)
|
132
135
|
* [OpenShift](#openshift)
|
133
136
|
* [Packagecloud](#packagecloud)
|
134
137
|
* [Puppet Forge](#puppet-forge)
|
@@ -243,7 +246,7 @@ Options can be given via env vars if prefixed with `[AWS_|CLOUDFORMATION_]`. E.g
|
|
243
246
|
|
244
247
|
### AWS Code Deploy
|
245
248
|
|
246
|
-
|
249
|
+
|
247
250
|
|
248
251
|
```
|
249
252
|
Usage: dpl codedeploy [options]
|
@@ -297,6 +300,49 @@ The following variable are availabe for interpolation on `description`:
|
|
297
300
|
`application`, `bucket`, `bundle_type`, `commit_id`, `deployment_group`, `endpoint`, `file_exists_behavior`, `git_author_email`, `git_author_name`, `git_branch`, `git_commit_author`, `git_commit_msg`, `git_sha`, `git_tag`, `key`, `region`, `repository`, `revision_type`, `build_number`
|
298
301
|
|
299
302
|
|
303
|
+
### AWS ECR
|
304
|
+
|
305
|
+
Support for deployments to AWS ECR is in **alpha**. Please see [Maturity Levels](https://github.com/travis-ci/dpl/#maturity-levels) for details.
|
306
|
+
|
307
|
+
```
|
308
|
+
Usage: dpl ecr [options]
|
309
|
+
|
310
|
+
Summary:
|
311
|
+
|
312
|
+
AWS ECR deployment provider
|
313
|
+
|
314
|
+
Description:
|
315
|
+
|
316
|
+
tbd
|
317
|
+
|
318
|
+
Options:
|
319
|
+
|
320
|
+
--access_key_id ID AWS access key (type: string, required)
|
321
|
+
--secret_access_key KEY AWS secret access key (type: string, required)
|
322
|
+
--account_id ID AWS Account ID (type: string, note: Required if the repository is owned by a
|
323
|
+
different account than the IAM user)
|
324
|
+
--source SOURCE Image to push (type: string, required, note: can be the id or the name and
|
325
|
+
optional tag (e.g. mysql:5.6))
|
326
|
+
--target TARGET Comma separated list of partial repository names to push to (type: string,
|
327
|
+
required)
|
328
|
+
--region REGION Comma separated list of regions to push to (type: string, default: us-east-1)
|
329
|
+
|
330
|
+
Common Options:
|
331
|
+
|
332
|
+
--cleanup Clean up build artifacts from the Git working directory before the deployment
|
333
|
+
--run CMD Commands to execute after the deployment finished successfully (type: array
|
334
|
+
(string, can be given multiple times))
|
335
|
+
--help Get help on this command
|
336
|
+
|
337
|
+
Examples:
|
338
|
+
|
339
|
+
dpl ecr --access_key_id id --secret_access_key key --source source --target target
|
340
|
+
dpl ecr --access_key_id id --secret_access_key key --source source --target target --account_id id
|
341
|
+
```
|
342
|
+
|
343
|
+
Options can be given via env vars if prefixed with `AWS_`. E.g. the option `--access_key_id` can be
|
344
|
+
given as `AWS_ACCESS_KEY_ID=<access_key_id>`.
|
345
|
+
|
300
346
|
### AWS Elastic Beanstalk
|
301
347
|
|
302
348
|
|
@@ -310,7 +356,14 @@ Summary:
|
|
310
356
|
|
311
357
|
Description:
|
312
358
|
|
313
|
-
|
359
|
+
Deploy to AWS Elastic Beanstalk: https://aws.amazon.com/elasticbeanstalk/
|
360
|
+
|
361
|
+
This provider:
|
362
|
+
|
363
|
+
* Creates a zip file (or uses one you provide)
|
364
|
+
* Uploads it to your EB application
|
365
|
+
* Optionally deploys to a specific EB environment
|
366
|
+
* Optionally waits until the deployment finishes
|
314
367
|
|
315
368
|
Options:
|
316
369
|
|
@@ -319,15 +372,14 @@ Options:
|
|
319
372
|
--region REGION AWS Region the Elastic Beanstalk app is running in (type: string, default:
|
320
373
|
us-east-1)
|
321
374
|
--app NAME Elastic Beanstalk application name (type: string, default: repo name)
|
322
|
-
--env NAME Elastic Beanstalk environment name
|
323
|
-
required)
|
375
|
+
--env NAME Elastic Beanstalk environment name to be updated. (type: string)
|
324
376
|
--bucket NAME Bucket name to upload app to (type: string, required, alias: bucket_name)
|
325
377
|
--bucket_path PATH Location within Bucket to upload app to (type: string)
|
326
378
|
--description DESC Description for the application version (type: string)
|
327
379
|
--label LABEL Label for the application version (type: string)
|
328
|
-
--zip_file PATH The zip file that you want to deploy
|
329
|
-
|
330
|
-
--[no-]wait_until_deployed Wait until the deployment has finished
|
380
|
+
--zip_file PATH The zip file that you want to deploy. If not given, a zipfile will be created
|
381
|
+
from the current directory, honoring .ebignore and .gitignore. (type: string)
|
382
|
+
--[no-]wait_until_deployed Wait until the deployment has finished (requires: env)
|
331
383
|
--wait_until_deployed_timeout SEC How many seconds to wait for Elastic Beanstalk deployment update. (type:
|
332
384
|
integer, default: 600)
|
333
385
|
|
@@ -340,8 +392,8 @@ Common Options:
|
|
340
392
|
|
341
393
|
Examples:
|
342
394
|
|
343
|
-
dpl elasticbeanstalk --access_key_id id --secret_access_key key --
|
344
|
-
dpl elasticbeanstalk --access_key_id id --secret_access_key key --
|
395
|
+
dpl elasticbeanstalk --access_key_id id --secret_access_key key --bucket name
|
396
|
+
dpl elasticbeanstalk --access_key_id id --secret_access_key key --bucket name --region region --app name
|
345
397
|
```
|
346
398
|
|
347
399
|
Options can be given via env vars if prefixed with `[AWS_|ELASTIC_BEANSTALK_]`. E.g. the option
|
@@ -388,9 +440,10 @@ Options:
|
|
388
440
|
--environment VARS List of Environment Variables to add to the function (type: array (string, can
|
389
441
|
be given multiple times), alias: environment_variables, format: /[\w\-]+=.+/,
|
390
442
|
note: Can be encrypted for added security)
|
391
|
-
--runtime NAME Lambda runtime to use (type: string, default:
|
392
|
-
|
393
|
-
ruby2.5, note: required when creating a new
|
443
|
+
--runtime NAME Lambda runtime to use (type: string, default: nodejs10.x, known values:
|
444
|
+
nodejs12.x, nodejs10.x, python3.8, python3.7, python3.6, python2.7, ruby2.7,
|
445
|
+
ruby2.5, java11, java8, go1.x, dotnetcore2.1, note: required when creating a new
|
446
|
+
function)
|
394
447
|
--dead_letter_arn ARN ARN to an SNS or SQS resource used for the dead letter queue. (type: string)
|
395
448
|
--kms_key_arn ARN KMS key ARN to use to encrypt environment_variables. (type: string)
|
396
449
|
--tracing_mode MODE Tracing mode (type: string, default: PassThrough, known values: Active,
|
@@ -619,7 +672,7 @@ as `BINTRAY_KEY=<key>`.
|
|
619
672
|
|
620
673
|
### Bluemix Cloud Foundry
|
621
674
|
|
622
|
-
|
675
|
+
|
623
676
|
|
624
677
|
```
|
625
678
|
Usage: dpl bluemixcloudfoundry [options]
|
@@ -779,7 +832,7 @@ Examples:
|
|
779
832
|
dpl chef_supermarket --user_id id --category cat --name name --client_key key --dir dir
|
780
833
|
```
|
781
834
|
|
782
|
-
Options can be given via env vars if prefixed with `CHEF_`.
|
835
|
+
Options can be given via env vars if prefixed with `CHEF_`.
|
783
836
|
|
784
837
|
### Cloud Files
|
785
838
|
|
@@ -839,23 +892,24 @@ Description:
|
|
839
892
|
|
840
893
|
Options:
|
841
894
|
|
842
|
-
--username USER
|
843
|
-
--password PASS
|
844
|
-
--organization ORG
|
845
|
-
--space SPACE
|
846
|
-
--api URL
|
847
|
-
--app_name APP
|
848
|
-
--buildpack PACK
|
849
|
-
--manifest FILE
|
850
|
-
--[no-]skip_ssl_validation
|
851
|
-
--
|
895
|
+
--username USER Cloud Foundry username (type: string, required)
|
896
|
+
--password PASS Cloud Foundry password (type: string, required)
|
897
|
+
--organization ORG Cloud Foundry organization (type: string, required)
|
898
|
+
--space SPACE Cloud Foundry space (type: string, required)
|
899
|
+
--api URL Cloud Foundry api URL (type: string, default: https://api.run.pivotal.io)
|
900
|
+
--app_name APP Application name (type: string)
|
901
|
+
--buildpack PACK Buildpack name or Git URL (type: string)
|
902
|
+
--manifest FILE Path to the manifest (type: string)
|
903
|
+
--[no-]skip_ssl_validation Skip SSL validation
|
904
|
+
--deployment_strategy STRATEGY Deployment strategy, either rolling or null (type: string)
|
905
|
+
--[no-]v3 Use the v3 API version to push the application
|
852
906
|
|
853
907
|
Common Options:
|
854
908
|
|
855
|
-
--cleanup
|
856
|
-
--run CMD
|
857
|
-
|
858
|
-
--help
|
909
|
+
--cleanup Clean up build artifacts from the Git working directory before the deployment
|
910
|
+
--run CMD Commands to execute after the deployment finished successfully (type: array
|
911
|
+
(string, can be given multiple times))
|
912
|
+
--help Get help on this command
|
859
913
|
|
860
914
|
Examples:
|
861
915
|
|
@@ -947,7 +1001,7 @@ Examples:
|
|
947
1001
|
dpl convox --app app --rack rack --password pass --host host --install_url url
|
948
1002
|
```
|
949
1003
|
|
950
|
-
Options can be given via env vars if prefixed with `CONVOX_`.
|
1004
|
+
Options can be given via env vars if prefixed with `CONVOX_`.
|
951
1005
|
|
952
1006
|
### Datica
|
953
1007
|
|
@@ -983,7 +1037,7 @@ Examples:
|
|
983
1037
|
dpl datica --target target --path path --cleanup --run cmd
|
984
1038
|
```
|
985
1039
|
|
986
|
-
Options can be given via env vars if prefixed with `[CATALYZE_|DATICA_]`.
|
1040
|
+
Options can be given via env vars if prefixed with `[CATALYZE_|DATICA_]`.
|
987
1041
|
|
988
1042
|
### Engineyard
|
989
1043
|
|
@@ -1106,6 +1160,73 @@ Examples:
|
|
1106
1160
|
|
1107
1161
|
|
1108
1162
|
|
1163
|
+
### Git (push)
|
1164
|
+
|
1165
|
+
Support for deployments to Git (push) is in **development**. Please see [Maturity Levels](https://github.com/travis-ci/dpl/#maturity-levels) for details.
|
1166
|
+
|
1167
|
+
```
|
1168
|
+
Usage: dpl git_push [options]
|
1169
|
+
|
1170
|
+
Summary:
|
1171
|
+
|
1172
|
+
Git (push) deployment provider
|
1173
|
+
|
1174
|
+
Description:
|
1175
|
+
|
1176
|
+
Experimental, generic provider for updating a Git remote branch with
|
1177
|
+
changes produced by the build, and optionally opening a pull request.
|
1178
|
+
|
1179
|
+
Options:
|
1180
|
+
|
1181
|
+
Either token, or deploy_key and name and email are required.
|
1182
|
+
|
1183
|
+
--repo SLUG Repo slug (type: string, default: repo slug)
|
1184
|
+
--token TOKEN GitHub token with repo permission (type: string, alias: github_token)
|
1185
|
+
--deploy_key PATH Path to a file containing a private deploy key with write access to the
|
1186
|
+
repository (type: string, see:
|
1187
|
+
https://developer.github.com/v3/guides/managing-deploy-keys/#deploy-keys)
|
1188
|
+
--branch BRANCH Target branch to push to (type: string, required)
|
1189
|
+
--base_branch BRANCH Base branch to branch off initially, and (optionally) create a pull request for
|
1190
|
+
(type: string, default: master)
|
1191
|
+
--name NAME Committer name (type: string, note: defaults to the GitHub name or login
|
1192
|
+
associated with the GitHub token)
|
1193
|
+
--email EMAIL Committer email (type: string, note: defaults to the GitHub email associated
|
1194
|
+
with the GitHub token)
|
1195
|
+
--commit_message MSG type: string, default: Update %{base_branch}
|
1196
|
+
--[no-]allow_empty_commit Allow an empty commit to be created
|
1197
|
+
--[no-]force Whether to push --force (default: false)
|
1198
|
+
--local_dir DIR Local directory to push (type: string, default: .)
|
1199
|
+
--[no-]pull_request Whether to create a pull request for the given branch
|
1200
|
+
--[no-]allow_same_branch Whether to allow pushing to the same branch as the current branch (default:
|
1201
|
+
false, note: setting this to true risks creating infinite build loops, use
|
1202
|
+
conditional builds or other mechanisms to prevent build from infinitely
|
1203
|
+
triggering more builds)
|
1204
|
+
--host HOST type: string, default: github.com
|
1205
|
+
--[no-]enterprise Whether to use a GitHub Enterprise API style URL
|
1206
|
+
|
1207
|
+
Common Options:
|
1208
|
+
|
1209
|
+
--cleanup Clean up build artifacts from the Git working directory before the deployment
|
1210
|
+
--run CMD Commands to execute after the deployment finished successfully (type: array
|
1211
|
+
(string, can be given multiple times))
|
1212
|
+
--help Get help on this command
|
1213
|
+
|
1214
|
+
Examples:
|
1215
|
+
|
1216
|
+
dpl git_push --branch branch --token token
|
1217
|
+
dpl git_push --branch branch --deploy_key path --name name --email email
|
1218
|
+
dpl git_push --branch branch
|
1219
|
+
dpl git_push --branch branch --token token --repo slug --base_branch branch --commit_message msg
|
1220
|
+
```
|
1221
|
+
|
1222
|
+
Options can be given via env vars if prefixed with `[GITHUB_|GIT_]`. E.g. the option `--token` can
|
1223
|
+
be given as `GITHUB_TOKEN=<token>` or `GIT_TOKEN=<token>`.
|
1224
|
+
|
1225
|
+
The following variable are availabe for interpolation on `commit_message`:
|
1226
|
+
|
1227
|
+
`base_branch`, `branch`, `deploy_key`, `email`, `git_author_email`, `git_author_name`, `git_branch`, `git_commit_author`, `git_commit_msg`, `git_sha`, `git_tag`, `host`, `local_dir`, `name`, `repo`
|
1228
|
+
|
1229
|
+
|
1109
1230
|
### GitHub Pages
|
1110
1231
|
|
1111
1232
|
|
@@ -1126,7 +1247,7 @@ Options:
|
|
1126
1247
|
Either token, or deploy_key are required.
|
1127
1248
|
|
1128
1249
|
--repo SLUG Repo slug (type: string, default: repo slug)
|
1129
|
-
--token TOKEN GitHub
|
1250
|
+
--token TOKEN GitHub token with repo permission (type: string, alias: github_token)
|
1130
1251
|
--deploy_key PATH Path to a file containing a private deploy key with write access to the
|
1131
1252
|
repository (type: string, see:
|
1132
1253
|
https://developer.github.com/v3/guides/managing-deploy-keys/#deploy-keys)
|
@@ -1143,7 +1264,7 @@ Options:
|
|
1143
1264
|
name)
|
1144
1265
|
--email EMAIL Committer email (type: string, note: defaults to the current git commit author
|
1145
1266
|
email)
|
1146
|
-
--[no-]committer_from_gh Use the token's owner name and email for the commit (requires:
|
1267
|
+
--[no-]committer_from_gh Use the token's owner name and email for the commit (requires: token)
|
1147
1268
|
--[no-]deployment_file Enable creation of a deployment-info file
|
1148
1269
|
--url URL type: string, alias: github_url, default: github.com
|
1149
1270
|
|
@@ -1246,7 +1367,7 @@ Options:
|
|
1246
1367
|
--[no-]file_glob Interpret files as globs (default: true)
|
1247
1368
|
--[no-]overwrite Overwrite files with the same name
|
1248
1369
|
--[no-]prerelease Identify the release as a prerelease
|
1249
|
-
--release_number NUM Release number (
|
1370
|
+
--release_number NUM Release number (override automatic release detection) (type: string)
|
1250
1371
|
--release_notes STR Content for the release notes (type: string, alias: body)
|
1251
1372
|
--release_notes_file PATH Path to a file containing the release notes (type: string, note: will be ignored
|
1252
1373
|
if --release_notes is given)
|
@@ -1695,6 +1816,47 @@ Examples:
|
|
1695
1816
|
Options can be given via env vars if prefixed with `NPM_`. E.g. the option `--api_token` can be
|
1696
1817
|
given as `NPM_API_TOKEN=<api_token>`.
|
1697
1818
|
|
1819
|
+
### nuget
|
1820
|
+
|
1821
|
+
Support for deployments to nuget is in **alpha**. Please see [Maturity Levels](https://github.com/travis-ci/dpl/#maturity-levels) for details.
|
1822
|
+
|
1823
|
+
```
|
1824
|
+
Usage: dpl nuget [options]
|
1825
|
+
|
1826
|
+
Summary:
|
1827
|
+
|
1828
|
+
nuget deployment provider
|
1829
|
+
|
1830
|
+
Description:
|
1831
|
+
|
1832
|
+
tbd
|
1833
|
+
|
1834
|
+
Options:
|
1835
|
+
|
1836
|
+
--api_key KEY NuGet registry API key (type: string, required, note: can be retrieved from your
|
1837
|
+
NuGet registry provider, see:
|
1838
|
+
https://docs.npmjs.com/creating-and-viewing-authentication-tokens)
|
1839
|
+
--registry URL NuGet registry url (type: string, required)
|
1840
|
+
--src SRC The nupkg file(s) to publish (type: string, default: *.nupkg)
|
1841
|
+
--[no-]no_symbols Do not push symbols, even if present
|
1842
|
+
--[no-]skip_duplicate Do not overwrite existing packages
|
1843
|
+
|
1844
|
+
Common Options:
|
1845
|
+
|
1846
|
+
--cleanup Clean up build artifacts from the Git working directory before the deployment
|
1847
|
+
--run CMD Commands to execute after the deployment finished successfully (type: array
|
1848
|
+
(string, can be given multiple times))
|
1849
|
+
--help Get help on this command
|
1850
|
+
|
1851
|
+
Examples:
|
1852
|
+
|
1853
|
+
dpl nuget --api_key key --registry url
|
1854
|
+
dpl nuget --api_key key --registry url --src src --no_symbols --skip_duplicate
|
1855
|
+
```
|
1856
|
+
|
1857
|
+
Options can be given via env vars if prefixed with `[DOTNET_|NUGET_]`. E.g. the option `--api_key`
|
1858
|
+
can be given as `NUGET_API_KEY=<api_key>` or `DOTNET_API_KEY=<api_key>`.
|
1859
|
+
|
1698
1860
|
### OpenShift
|
1699
1861
|
|
1700
1862
|
|
@@ -2004,7 +2166,7 @@ Examples:
|
|
2004
2166
|
|
2005
2167
|
### Snap
|
2006
2168
|
|
2007
|
-
|
2169
|
+
|
2008
2170
|
|
2009
2171
|
```
|
2010
2172
|
Usage: dpl snap [options]
|
@@ -2210,7 +2372,7 @@ Hopefully helpful resources are:
|
|
2210
2372
|
|
2211
2373
|
All provider specific classes live in [dpl/providers](lib/dpl/providers).
|
2212
2374
|
These represent the CLI commands that are executed when the command line
|
2213
|
-
|
2375
|
+
executable `dpl` is run with a given provider name as the first argument.
|
2214
2376
|
|
2215
2377
|
Each provider is a subclass of `Dpl::Provider`, which is defined in
|
2216
2378
|
[dpl/provider.rb](lib/dpl/provider.rb). The provider base class itself
|
@@ -2277,7 +2439,7 @@ When a provider class is instantiated and run it will go through a number
|
|
2277
2439
|
of stages that make up the deployment process.
|
2278
2440
|
|
2279
2441
|
These are documented in [dpl/provider.rb](/lib/dpl/provider.rb).
|
2280
|
-
If you are adding a new deployment provider please familiarize
|
2442
|
+
If you are adding a new deployment provider please familiarize yourself with
|
2281
2443
|
this lifecycle.
|
2282
2444
|
|
2283
2445
|
Feel free to pick and interpret these stages according to the needs and
|
@@ -2484,7 +2646,7 @@ test.
|
|
2484
2646
|
### Testing Dpl Branches or Forks on Travis CI
|
2485
2647
|
|
2486
2648
|
It is possible to test a new deployment provider or new functionality of dpl on
|
2487
|
-
Travis CI. In order to do so, add proper
|
2649
|
+
Travis CI. In order to do so, add proper configuration on the `edge` key to
|
2488
2650
|
your `.travis.yml` like so:
|
2489
2651
|
|
2490
2652
|
```yaml
|
@@ -2579,4 +2741,4 @@ This tool would not exist without your help.
|
|
2579
2741
|
|
2580
2742
|
A huge thank you goes out to all of our current and past [contributors](https://github.com/travis-ci/dpl/graphs/contributors):
|
2581
2743
|
|
2582
|
-
5c077yP, A.J. May, A92hm, Aakriti Gupta, Aaron Hill, Aaron1011, Abdón Rodríguez Davila, Adam King, Adam Mcgrath, adinata, Adrian Moreno, Ahmad Nassri, Ahmed Refaey, Ainun Nazieb, Albertin Loic, Alexander Springer, Alexey Kotlyarov, Ali Hajimirza, Amos Wenger, Anders Olsen Sandvik, Andrey Lushchick, Andy Vanbutsele, Angelo Livanos, Anne-Julia Seitz, Antoine Savignac, Anton Babenko, Anton Ilin, Arnold Daniels, Ashen Gunaratne, awesomescot, Axel Fontaine, Baptiste Courtois, Ben Hale, Benjamin Guttmann, Bob, Bob Zoller, Brad Gignac, Brandon Burton, Brandon LeBlanc, Brian Hou, Cameron White, capotej, Carla, carlad, Chad Engler, Chathan Driehuys, Chris Patterson, Christian Elsen, Christian Rackerseder, Clay Reimann, cleem, Cryptophobia, Damien Mathieu, Dan Buch, Dan Powell, Daniel X Moore, David F. Severski, Denis Cornehl, Dennis Koot, dependabot[bot], Devin J. Pohly, Dominic Jodoin, Dwayne Forde, emdantrim, Eric Peterson, Erik Dalén, Esteban Santiesteban, Étienne Michon, eyalbe4, Fabio Napoleoni, Felix Rieseberg, fgogolli, Filip Š, Flamur Gogolli, Gabriel Saldana, George Brighton, Gil, Gil Megidish, Gil Tselenchuk, Hao Luo, Hauke Stange, Henrik Hodne, Hiro Asari, IMANAKA, Kouta, Ivan Evtuhovich, Ivan Kusalic, Ivan Pozdeev, Jacob Burkhart, Jake Hewitt, Jakub Holy, James Adam, James Awesome, James Parker, Janderson, Jannis Leidel, Jeffrey Yasskin, Jeremy Frasier, JMSwag, Joe Damato, Joep van Delft, Johannes Würbach, johanneswuerbach, Johnny Dobbins, Jon Benson, Jon Rowe, Jon-Erik Schneiderhan, Jonatan Männchen, Jonathan Stites, Jonathan Sundqvist, jorgecasar, Josh Kalderimis, joshua-anderson, Jouni Kaplas, Julia S.Simon, Julio Capote, jung_b@localhost, Karim Fateem, Ke Zhu, konrad-c, Konstantin Haase, Kouta Imanaka, Kristofer Svardstal, Kyle Fazzari, Kyle VanderBeek, Loïc Mahieu, Lorenz Leutgeb, Lorne Currie, Louis Lagrange, Louis St-Amour, Luke Yeager, Maciej Skierkowski, Marc, María de Antón, mariadeanton, Mariana Lenetis and Zachary Gershman, Marius Gripsgard, Mark Pundsack, marscher, Marwan Rabbâa, Mathias Meyer, Mathias Rangel Wulff, Mathias San Miguel, Matt Hernandez, Matt Knox, Matt Travi, Matthew Knox, Maxime Brugidou, mayeut, Meir Gottlieb, Michael Bleigh, Michael Dunn, Michael Friis, Michel Boudreau, Mike Bryant, Nat Welch, Nicholas Bruning, Nick Mohoric, Nico Lindemann, Nigel Ramsay, Nikhil, Ole Michaelis, Olle Jonsson, Omer Katz, Patrique Legault, Paul Beaudoin, Paul Nikitochkin, Peter, Peter Georgantas, Peter Newman, Philipp Hansch, Piotr Sarnacki, Radek Lisowski, Radosław Lisowski, Rail Aliiev, Randall A. Gordon, Robert Gogolok, Rokas Brazdžionis, Romuald Bulyshko, root, ryanj, Ryn Daniels, Samir Talwar, Samuel Wright, Sandor Zeestraten, Sascha Zarhuber, SAULEAU Sven, Scot Spinner, Sebastien Estienne, Sergei Chertkov, shunyi, Simon, Solly, Sorin Sbarnea, Soulou, Stefan Kolb, Steffen Kötte, step76, Steven Berlanga, Sven Fuchs, Sviatoslav Sydorenko, testfairy, Tim Ysewyn, Troels Thomsen, Tyler Cross, Uriah Levy, Vincent Jacques, Vojtech Vondra, Vojtěch Vondra, Wael M. Nasreddine, Wen Kokke, Wim Looman, Xavier Krantz, yeonhoyoon, Zane Williamson
|
2744
|
+
5c077yP, A.J. May, A92hm, Aakriti Gupta, Aaron Hill, Aaron1011, Abdón Rodríguez Davila, Adam King, Adam Mcgrath, adinata, Adrian Moreno, Ahmad Nassri, Ahmed Refaey, Ainun Nazieb, Albertin Loic, Alex Jurkiewicz, Alexander Springer, Alexey Kotlyarov, Ali Hajimirza, Amos Wenger, Anders Olsen Sandvik, Andrew Nichols, Andrey Lushchick, Andy Vanbutsele, Angelo Livanos, Anne-Julia Seitz, Antoine Savignac, Anton Babenko, Anton Ilin, Arnold Daniels, Ashen Gunaratne, awesomescot, Axel Fontaine, Baptiste Courtois, Ben Hale, Benjamin Guttmann, Bob, Bob Zoller, Brad Gignac, Brandon Burton, Brandon LeBlanc, Brian Hou, Cameron White, capotej, Carla, carlad, Chad Engler, Chathan Driehuys, Chris Patterson, Christian Elsen, Christian Rackerseder, Clay Reimann, cleem, Cryptophobia, Damien Mathieu, Dan Buch, Dan Powell, Daniel X Moore, David F. Severski, Denis Cornehl, Dennis Koot, dependabot[bot], Devin J. Pohly, Dominic Jodoin, Dwayne Forde, emdantrim, Eric Peterson, Erik Dalén, Esteban Santiesteban, Étienne Michon, Eugene, Eugene Shubin, eyalbe4, Fabio Napoleoni, Felix Rieseberg, fgogolli, Filip Š, Flamur Gogolli, Gabriel Saldana, George Brighton, Gil, Gil Megidish, Gil Tselenchuk, Hao Luo, Hauke Stange, Henrik Hodne, Hiro Asari, IMANAKA, Kouta, Ivan Evtuhovich, Ivan Kusalic, Ivan Pozdeev, Jacob Burkhart, Jake Hewitt, Jakub Holy, James Adam, James Awesome, James Parker, Janderson, Jannis Leidel, Jeffrey Yasskin, Jeremy Frasier, JMSwag, Joe Damato, Joep van Delft, Johannes Würbach, johanneswuerbach, Johnny Dobbins, Jon Benson, Jon Rowe, Jon-Erik Schneiderhan, Jonatan Männchen, Jonathan Stites, Jonathan Sundqvist, jorgecasar, Josh Kalderimis, joshua-anderson, Jouni Kaplas, Julia S.Simon, Julio Capote, jung_b@localhost, Karim Fateem, Ke Zhu, konrad-c, Konstantin Haase, Kouta Imanaka, Kristofer Svardstal, Kyle Fazzari, Kyle VanderBeek, Loïc Mahieu, Lorenz Leutgeb, Lorne Currie, Louis Lagrange, Louis St-Amour, Luke Yeager, Maciej Skierkowski, Mahdi Nami Damirchi, Marc, María de Antón, mariadeanton, Mariana Lenetis and Zachary Gershman, Marius Gripsgard, Mark Pundsack, marscher, Marwan Rabbâa, Mathias Meyer, Mathias Rangel Wulff, Mathias San Miguel, Matt Hernandez, Matt Knox, Matt Travi, Matthew Knox, Maxime Brugidou, mayeut, Meir Gottlieb, Michael Bleigh, Michael Dunn, Michael Friis, Michel Boudreau, Mike Bryant, Nat Welch, Nicholas Bruning, Nick Mohoric, Nico Lindemann, Nigel Ramsay, Nikhil, Ole Michaelis, Olle Jonsson, Omer Katz, Patrique Legault, Paul Beaudoin, Paul Nikitochkin, Peter, Peter Georgantas, Peter Newman, Philipp Hansch, Piotr Sarnacki, Radek Lisowski, Radosław Lisowski, Rail Aliiev, Randall A. Gordon, Robert, Robert Gogolok, Rokas Brazdžionis, Romuald Bulyshko, root, ryanj, Ryn Daniels, Samir Talwar, Samuel Wright, Sandor Zeestraten, Sascha Zarhuber, SAULEAU Sven, Scot Spinner, Sebastien Estienne, Sergei Chertkov, shunyi, Simon, Solly, Sorin Sbarnea, Soulou, Stefan Kolb, Steffen Kötte, step76, Steven Berlanga, Sven Fuchs, Sviatoslav Sydorenko, testfairy, Tim Ysewyn, Troels Thomsen, Tyler Cross, Uriah Levy, Vincent Jacques, Vojtech Vondra, Vojtěch Vondra, Wael M. Nasreddine, Wen Kokke, Wim Looman, Xavier Krantz, yeonhoyoon, Zane Williamson
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# Dpl [![Build Status](https://travis-ci.com/travis-ci/dpl.svg?branch=master)](https://travis-ci.com/travis-ci/dpl) [![Code Climate](https://codeclimate.com/github/travis-ci/dpl.svg)](https://codeclimate.com/github/travis-ci/dpl) [![Coverage Status](https://coveralls.io/repos/travis-ci/dpl/badge.svg?branch=master&service=github&cache=2019-08-09_17:00)](https://coveralls.io/github/travis-ci/dpl?branch=master) [![Gem Version](https://img.shields.io/gem/v/dpl)](http://rubygems.org/gems/dpl) [![Yard Docs](http://img.shields.io/badge/yard-docs-blue.svg)](http://rubydoc.info/github/travis-ci/dpl)
|
2
2
|
|
3
3
|
This version of the README documents dpl v2, the next major version of dpl.
|
4
|
-
The
|
4
|
+
The README for dpl v1, the version that is currently used in production on
|
5
5
|
Travis CI can be found [here](https://github.com/travis-ci/dpl/blob/v1/README.md).
|
6
6
|
|
7
7
|
Dpl is command line tool for deploying code, html, packages, or build artifacts
|
@@ -29,7 +29,7 @@ please do not hesitate to get in touch, and we'll help you [add it](#contributin
|
|
29
29
|
|
30
30
|
## Requirements
|
31
31
|
|
32
|
-
Dpl requires Ruby 2.
|
32
|
+
Dpl requires Ruby 2.3 or later.
|
33
33
|
|
34
34
|
Depending on the deployment target dpl might require additional runtimes (e.g.
|
35
35
|
Go, Node.js, or Python) to be installed. It also might require sudo access in
|
@@ -96,7 +96,7 @@ the following maturity levels, according to the given criteria:
|
|
96
96
|
Dpl supports the following providers:
|
97
97
|
|
98
98
|
<% providers.each do |key, name| -%>
|
99
|
-
* <%= "[#{name}](##{name.
|
99
|
+
* <%= "[#{name}](##{name.split(/\W+/).compact.join('-').downcase})" %>
|
100
100
|
<% end -%>
|
101
101
|
|
102
102
|
<% providers.each do |key, name|%>
|
data/lib/dpl/assets/dpl/git_ssh
CHANGED
data/lib/dpl/cli.rb
CHANGED
@@ -36,7 +36,7 @@ module Dpl
|
|
36
36
|
# Tainting is being used for automatically obfuscating values for secure
|
37
37
|
# options, so we want to untaint all incoming args here.
|
38
38
|
def untaint(args)
|
39
|
-
args.map(&:dup).each(&:
|
39
|
+
args.map(&:dup).each(&:whitelist)
|
40
40
|
end
|
41
41
|
|
42
42
|
def with_cmd_opts(args, cmds)
|
@@ -66,7 +66,7 @@ module Dpl
|
|
66
66
|
# the string to a standard length of 20 characters. N depends on the
|
67
67
|
# length of the original string.
|
68
68
|
def obfuscate(str, opts = {})
|
69
|
-
return str if opts[:secure] || !str.
|
69
|
+
return str if opts[:secure] || !str.blacklisted?
|
70
70
|
keep = (str.length / (4.0 + str.length / 5).round).round
|
71
71
|
keep = 1 if keep == 0
|
72
72
|
str[0, keep] + '*' * (20 - keep)
|
@@ -90,17 +90,24 @@ module Dpl
|
|
90
90
|
|
91
91
|
def interpolate(str)
|
92
92
|
str = str % args if args.is_a?(Array) && args.any?
|
93
|
-
|
93
|
+
@blacklist_result = false
|
94
|
+
str = str.to_s.gsub(PATTERN) do
|
95
|
+
@blacklist_result = true
|
96
|
+
normalize(lookup($1.to_sym))
|
97
|
+
end
|
98
|
+
@blacklist_result || (args.is_a?(Array) && args.any? { |arg| arg.is_a?(String) && arg.blacklisted? }) ? str.blacklist : str
|
94
99
|
end
|
95
100
|
|
96
101
|
def obfuscate(str)
|
97
102
|
secrets(str).inject(str) do |str, secret|
|
103
|
+
secret = secret.dup if secret.frozen?
|
104
|
+
secret.blacklist if str.blacklisted?
|
98
105
|
str.gsub(secret, super(secret))
|
99
106
|
end
|
100
107
|
end
|
101
108
|
|
102
109
|
def secrets(str)
|
103
|
-
return [] unless str.is_a?(String) && str.
|
110
|
+
return [] unless str.is_a?(String) && str.blacklisted?
|
104
111
|
opts = obj.class.opts.select(&:secret?)
|
105
112
|
secrets = opts.map { |opt| obj.opts[opt.name] }.compact
|
106
113
|
secrets.select { |secret| str.include?(secret) }
|
@@ -110,7 +117,7 @@ module Dpl
|
|
110
117
|
obj.is_a?(Array) ? obj.join(' ') : obj.to_s
|
111
118
|
end
|
112
119
|
|
113
|
-
def lookup(key)
|
120
|
+
def lookup(key)
|
114
121
|
if vars? && !var?(key)
|
115
122
|
UNKNOWN % key
|
116
123
|
elsif mod = modifier(key)
|
data/lib/dpl/provider.rb
CHANGED
@@ -20,7 +20,7 @@ module Dpl
|
|
20
20
|
opt '--config_file FILE', alias: :configfile, deprecated: :configfile
|
21
21
|
opt '--extra_args ARGS'
|
22
22
|
|
23
|
-
URL = 'https://files.boxfuse.com/com/boxfuse/client/boxfuse-commandline/
|
23
|
+
URL = 'https://files.boxfuse.com/com/boxfuse/client/boxfuse-commandline/1.33.0.1460/boxfuse-commandline-1.33.0.1460-linux-x64.tar.gz'
|
24
24
|
|
25
25
|
cmds install: 'curl -L %{URL} | tar xz',
|
26
26
|
deploy: 'boxfuse/boxfuse run %{deploy_opts}'
|
@@ -22,10 +22,11 @@ module Dpl
|
|
22
22
|
opt '--buildpack PACK', 'Buildpack name or Git URL'
|
23
23
|
opt '--manifest FILE', 'Path to the manifest'
|
24
24
|
opt '--skip_ssl_validation', 'Skip SSL validation'
|
25
|
+
opt '--deployment_strategy STRATEGY', 'Deployment strategy, either rolling or null'
|
25
26
|
opt '--v3', 'Use the v3 API version to push the application'
|
26
27
|
opt '--logout', default: true, internal: true
|
27
28
|
|
28
|
-
cmds install: 'test $(uname) = "Linux" && rel="linux64-binary" || rel="macosx64"; wget "https://cli.run.pivotal.io/stable?release=${rel}&source=github" -qO cf.tgz && tar -zxvf cf.tgz && rm cf.tgz',
|
29
|
+
cmds install: 'test $(uname) = "Linux" && rel="linux64-binary" || rel="macosx64"; wget "https://cli.run.pivotal.io/stable?release=${rel}&version=v7&source=github" -qO cf.tgz && tar -zxvf cf.tgz && rm cf.tgz',
|
29
30
|
api: './cf api %{api} %{skip_ssl_validation_opt}',
|
30
31
|
login: './cf login -u %{username} -p %{password} -o %{organization} -s %{space}',
|
31
32
|
push: './cf %{push_cmd} %{push_args}',
|
@@ -70,6 +71,7 @@ module Dpl
|
|
70
71
|
args = []
|
71
72
|
args << quote(app_name) if app_name?
|
72
73
|
args << "-f #{manifest}" if manifest?
|
74
|
+
args << "--strategy #{deployment_strategy}" if deployment_strategy?
|
73
75
|
args.join(' ')
|
74
76
|
end
|
75
77
|
|
@@ -5,7 +5,7 @@ module Dpl
|
|
5
5
|
class Codedeploy < Provider
|
6
6
|
register :codedeploy
|
7
7
|
|
8
|
-
status :
|
8
|
+
status :stable
|
9
9
|
|
10
10
|
full_name 'AWS Code Deploy'
|
11
11
|
|
@@ -84,7 +84,12 @@ module Dpl
|
|
84
84
|
def wait_until_deployed(id)
|
85
85
|
print :waiting_for_deploy
|
86
86
|
status = poll(id) until %w(Succeeded Failed Stopped).include?(status)
|
87
|
-
|
87
|
+
case status
|
88
|
+
when 'Succeeded'
|
89
|
+
info :finished_deploy, status
|
90
|
+
else
|
91
|
+
error :finished_deploy, status
|
92
|
+
end
|
88
93
|
end
|
89
94
|
|
90
95
|
def poll(id)
|