dpl 1.8.18.travis.1527.4 → 1.8.18.travis.1529.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/README.md +61 -29
- data/lib/dpl/provider.rb +1 -0
- data/lib/dpl/provider/catalyze.rb +49 -0
- data/spec/provider/catalyze_spec.rb +39 -0
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
N2Y2ZjZhZjY0Yjk4YWQwYTJlNjZjMjQ5ZjYxYWU3MDllNDg1YmI1NQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZjBlY2YyMjllNmQ0YWExOGQzODA0YzVlNzZmYmI5MjVlZWY2MGVlNw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MTM1YTIzYWQ5ZTg0MjE1Nzc3YTY1NDAzN2MxNDk1MjUxZjZiNDVjZThkOTkw
|
10
|
+
ZTY3ZDc3NDk3OTdjZDMxZDI1MDE0Mzc0MjRmNmY1MWRkMzA5NTc0MDA1M2Fh
|
11
|
+
NTEwYjVjYzU0ZjRjODZhZmQyODQwZjk2ZWYzYjY1YTJjNzUzMTY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NTE5ZDc3MzU2MjBkNGZkNjUzZTY3ZDJiZmRkODg3NzNkOGZjYzM2NzRhOGRk
|
14
|
+
ZTg1ODhkNjBkNTRkMDMwN2NmMDgwZmZhM2I1NTg3YTg4NTM5YzJlYTg5N2Nk
|
15
|
+
ZDgwMTcxZTVjZTk2NWNiZmJiMjQxNDg2ZjRmYjJlNGYyZGM3MWE=
|
data/README.md
CHANGED
@@ -11,17 +11,18 @@ Dpl supports the following providers:
|
|
11
11
|
* [AppFog](#appfog)
|
12
12
|
* [Atlas by HashiCorp](#atlas)
|
13
13
|
* [AWS CodeDeploy](#aws-codedeploy)
|
14
|
+
* [AWS Elastic Beanstalk](#elastic-beanstalk)
|
14
15
|
* [AWS OpsWorks](#opsworks)
|
15
16
|
* [Azure Web Apps](#azure-web-apps)
|
16
17
|
* [Bintray](#bintray)
|
17
18
|
* [BitBalloon](#bitballoon)
|
18
19
|
* [Boxfuse](#boxfuse)
|
20
|
+
* [Catalyze](#catalyze)
|
19
21
|
* [Chef Supermarket](#chef-supermarket)
|
20
22
|
* [Cloud 66](#cloud-66)
|
21
23
|
* [Cloud Foundry](#cloud-foundry)
|
22
24
|
* [Deis](#deis)
|
23
25
|
* [Divshot.io](#divshotio)
|
24
|
-
* [Elastic Beanstalk](#elastic-beanstalk)
|
25
26
|
* [Engine Yard](#engine-yard)
|
26
27
|
* [Firebase](#firebase)
|
27
28
|
* [Github Releases](#github-releases)
|
@@ -343,6 +344,30 @@ It is possible to set file-specific `Cache-Control` and `Expires` headers using
|
|
343
344
|
dpl --provider=s3 --access-key-id=<access-key-id> --secret-access-key=<secret-access-key> --bucket=<bucket> --detect-encoding --cache_control=max-age=99999 --expires="2012-12-21 00:00:00 -0000"
|
344
345
|
dpl --provider=s3 --access-key-id=<access-key-id> --secret-access-key=<secret-access-key> --bucket=<bucket> --region=us-west-2 --local-dir= BUILD --upload-dir=BUILDS
|
345
346
|
|
347
|
+
### Elastic Beanstalk:
|
348
|
+
|
349
|
+
#### Options:
|
350
|
+
|
351
|
+
* **access-key-id**: AWS Access Key ID. Can be obtained from [here](https://console.aws.amazon.com/iam/home?#security_credential).
|
352
|
+
* **secret-access-key**: AWS Secret Key. Can be obtained from [here](https://console.aws.amazon.com/iam/home?#security_credential).
|
353
|
+
* **region**: AWS Region the Elastic Beanstalk app is running in. Defaults to 'us-east-1'. Please be aware that this must match the region of the elastic beanstalk app.
|
354
|
+
* **app**: Elastic Beanstalk application name.
|
355
|
+
* **env**: Elastic Beanstalk environment name which will be updated.
|
356
|
+
* **zip_file**: The zip file that you want to deploy. _**Note:**_ you also need to use the `skip_cleanup` or the zip file you are trying to upload will be removed during cleanup.
|
357
|
+
* **bucket_name**: Bucket name to upload app to.
|
358
|
+
* **bucket_path**: Location within Bucket to upload app to.
|
359
|
+
* **only_create_app_version**: only create the app version, don't actually deploy it.
|
360
|
+
|
361
|
+
#### Environment variables:
|
362
|
+
|
363
|
+
* **ELASTIC_BEANSTALK_ENV**: Elastic Beanstalk environment name which will be updated. Is only used if `env` option is omitted.
|
364
|
+
* **ELASTIC_BEANSTALK_LABEL**: Label name of the new version.
|
365
|
+
* **ELASTIC_BEANSTALK_DESCRIPTION**: Description of the new version. Defaults to the last commit message.
|
366
|
+
|
367
|
+
#### Examples:
|
368
|
+
|
369
|
+
dpl --provider=elasticbeanstalk --access-key-id=<access-key-id> --secret-access-key="<secret-access-key>" --app="example-app-name" --env="example-app-environment" --region="us-west-2"
|
370
|
+
|
346
371
|
### OpsWorks:
|
347
372
|
|
348
373
|
#### Options:
|
@@ -557,30 +582,6 @@ For accounts using two factor authentication, you have to use an oauth token as
|
|
557
582
|
dpl --provider=gcs --access-key-id=<access-key-id> --secret-access-key=<secret-access-key> --bucket=<bucket> --detect-encoding --cache_control=max-age=99999
|
558
583
|
dpl --provider=gcs --access-key-id=<access-key-id> --secret-access-key=<secret-access-key> --bucket=<bucket> --local-dir=BUILD --upload-dir=BUILDS
|
559
584
|
|
560
|
-
### Elastic Beanstalk:
|
561
|
-
|
562
|
-
#### Options:
|
563
|
-
|
564
|
-
* **access-key-id**: AWS Access Key ID. Can be obtained from [here](https://console.aws.amazon.com/iam/home?#security_credential).
|
565
|
-
* **secret-access-key**: AWS Secret Key. Can be obtained from [here](https://console.aws.amazon.com/iam/home?#security_credential).
|
566
|
-
* **region**: AWS Region the Elastic Beanstalk app is running in. Defaults to 'us-east-1'. Please be aware that this must match the region of the elastic beanstalk app.
|
567
|
-
* **app**: Elastic Beanstalk application name.
|
568
|
-
* **env**: Elastic Beanstalk environment name which will be updated.
|
569
|
-
* **zip_file**: The zip file that you want to deploy. _**Note:**_ you also need to use the `skip_cleanup` or the zip file you are trying to upload will be removed during cleanup.
|
570
|
-
* **bucket_name**: Bucket name to upload app to.
|
571
|
-
* **bucket_path**: Location within Bucket to upload app to.
|
572
|
-
* **only_create_app_version**: only create the app version, don't actually deploy it.
|
573
|
-
|
574
|
-
#### Environment variables:
|
575
|
-
|
576
|
-
* **ELASTIC_BEANSTALK_ENV**: Elastic Beanstalk environment name which will be updated. Is only used if `env` option is omitted.
|
577
|
-
* **ELASTIC_BEANSTALK_LABEL**: Label name of the new version.
|
578
|
-
* **ELASTIC_BEANSTALK_DESCRIPTION**: Description of the new version. Defaults to the last commit message.
|
579
|
-
|
580
|
-
#### Examples:
|
581
|
-
|
582
|
-
dpl --provider=elasticbeanstalk --access-key-id=<access-key-id> --secret-access-key="<secret-access-key>" --app="example-app-name" --env="example-app-environment" --region="us-west-2"
|
583
|
-
|
584
585
|
### BitBalloon:
|
585
586
|
|
586
587
|
#### Options:
|
@@ -622,6 +623,37 @@ For accounts using two factor authentication, you have to use an oauth token as
|
|
622
623
|
dpl --provider=packagecloud --username=packageuser --token=t0k3n --repository=myrepo --dist=ubuntu/precise
|
623
624
|
dpl --provider=packagecloud --username=packageuser --token=t0k3n --repository=myrepo --local-dir="${TRAVIS_BUILD_DIR}/pkgs" --dist=ubuntu/precise
|
624
625
|
|
626
|
+
### Catalyze:
|
627
|
+
|
628
|
+
#### Options:
|
629
|
+
|
630
|
+
* **target**: Required. The git remote repository to deploy to.
|
631
|
+
* **path**: Optional. If using the skip_cleanup option to deploy from current file state, you can optionally specify the pathspec for the files to deploy. If not specified then all files are deployed.
|
632
|
+
|
633
|
+
#### Examples:
|
634
|
+
|
635
|
+
dpl --provider=catalyze --target=ssh://git@git.catalyzeapps.com:2222/app1234.git
|
636
|
+
dpl --provider=catalyze --target=ssh://git@git.catalyzeapps.com:2222/app1234.git --skip_cleanup=true
|
637
|
+
dpl --provider=catalyze --target=ssh://git@git.catalyzeapps.com:2222/app1234.git --skip_cleanup=true --path=build
|
638
|
+
|
639
|
+
|
640
|
+
#### Setup:
|
641
|
+
|
642
|
+
1. Get the deployment target for Catalyze:
|
643
|
+
a. Make sure your catalyze environment is [associated](https://resources.catalyze.io/paas/paas-cli-reference/#associate).
|
644
|
+
b. Get the git remote by running ```git remote -v``` from within the associated repo.
|
645
|
+
2. Setup a deployment key to Catalyze for Travis CI:
|
646
|
+
a. Install the travis-ci cli.
|
647
|
+
b. Get the public SSH key for your travis project and save it to a file by running ```travis pubkey > travis.pub```
|
648
|
+
c. Add the key as a deploy key using the catalyze cli within the associated repo. For example: ```catalyze deploy-keys add travisci ./travis.pub code-1```
|
649
|
+
3. Setup Catalyze as a known host for Travis CI:
|
650
|
+
a. List your known hosts by running ```cat ~/.ssh/known_hosts```
|
651
|
+
b. Find and copy the line from known_hosts that includes the git remote found in step #1. It'll look something like "[git.catalyzeapps.com]:2222 ecdsa-sha2-nistp256 BBBB12abZmKlLXNo..."
|
652
|
+
c. Update your `before_deploy` step in `.travis.yml` to update the `known_hosts` file:
|
653
|
+
```
|
654
|
+
before_deploy: echo "[git.catalyzeapps.com]:2222 ecdsa-sha2-nistp256 BBBB12abZmKlLXNo..." >> ~/.ssh/known_hosts
|
655
|
+
```
|
656
|
+
|
625
657
|
### Chef Supermarket:
|
626
658
|
|
627
659
|
#### Options:
|
@@ -818,7 +850,7 @@ In order to use this provider, please make sure you have the [App Engine Admin A
|
|
818
850
|
#### Examples:
|
819
851
|
|
820
852
|
dpl --provider=firebase --token=<token> --project=<project>
|
821
|
-
|
853
|
+
|
822
854
|
|
823
855
|
|
824
856
|
### Surge.sh
|
@@ -826,9 +858,9 @@ In order to use this provider, please make sure you have the [App Engine Admin A
|
|
826
858
|
#### Options:
|
827
859
|
|
828
860
|
* **project** Path to project folder relative to repo root. Defaults to repo root if not set.
|
829
|
-
* **domain** Domain to publish to. Can be omitted if domain is set in the `CNAME` file in the project folder.
|
861
|
+
* **domain** Domain to publish to. Can be omitted if domain is set in the `CNAME` file in the project folder.
|
862
|
+
|
830
863
|
|
831
|
-
|
832
864
|
#### Environment variables:
|
833
865
|
|
834
866
|
* **SURGE_LOGIN**: Set it to the email address you use with Surge
|
@@ -836,4 +868,4 @@ In order to use this provider, please make sure you have the [App Engine Admin A
|
|
836
868
|
|
837
869
|
#### Example:
|
838
870
|
dpl --provider=surge --project=<project-path> --domain=<domain-name>
|
839
|
-
|
871
|
+
|
data/lib/dpl/provider.rb
CHANGED
@@ -13,6 +13,7 @@ module DPL
|
|
13
13
|
autoload :Bintray, 'dpl/provider/bintray'
|
14
14
|
autoload :BitBalloon, 'dpl/provider/bitballoon'
|
15
15
|
autoload :Boxfuse, 'dpl/provider/boxfuse'
|
16
|
+
autoload :Catalyze, 'dpl/provider/catalyze'
|
16
17
|
autoload :ChefSupermarket, 'dpl/provider/chef_supermarket'
|
17
18
|
autoload :Cloud66, 'dpl/provider/cloud66'
|
18
19
|
autoload :CloudFiles, 'dpl/provider/cloud_files'
|
@@ -0,0 +1,49 @@
|
|
1
|
+
module DPL
|
2
|
+
class Provider
|
3
|
+
class Catalyze < Provider
|
4
|
+
def config
|
5
|
+
{
|
6
|
+
# the git repository to deploy to
|
7
|
+
"target" => options[:target] || context.env['CATALYZE_TARGET'],
|
8
|
+
# the pathspec for files to add to git for deployment e.g. your build directory. defaults to all files.
|
9
|
+
"path" => options[:path] || context.env['CATALYZE_PATH'] || '.'
|
10
|
+
}
|
11
|
+
end
|
12
|
+
|
13
|
+
def needs_key?
|
14
|
+
false
|
15
|
+
end
|
16
|
+
|
17
|
+
def check_app
|
18
|
+
end
|
19
|
+
|
20
|
+
def check_auth
|
21
|
+
error "Missing Catalyze target" unless config['target']
|
22
|
+
end
|
23
|
+
|
24
|
+
def push_app
|
25
|
+
log "Deploying to Catalyze '#{config['target']}'"
|
26
|
+
|
27
|
+
if options[:skip_cleanup]
|
28
|
+
# create commit message
|
29
|
+
build_num = context.env["TRAVIS_BUILD_NUMBER"]
|
30
|
+
commit = context.env["TRAVIS_COMMIT"]
|
31
|
+
repo_slug = context.env["TRAVIS_REPO_SLUG"]
|
32
|
+
branch = context.env["TRAVIS_BRANCH"]
|
33
|
+
if build_num && commit && repo_slug && branch
|
34
|
+
commit_message = "Build ##{build_num} (#{commit}) of #{repo_slug}@#{branch}"
|
35
|
+
else
|
36
|
+
commit_message = "Local build"
|
37
|
+
end
|
38
|
+
|
39
|
+
log "Using build files for deployment"
|
40
|
+
context.shell "git checkout HEAD"
|
41
|
+
context.shell "git add #{config["path"]} --all --force"
|
42
|
+
context.shell "git commit -m \"#{commit_message}\" --quiet"
|
43
|
+
end
|
44
|
+
|
45
|
+
context.shell "git push --force #{config['target']} HEAD:master"
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'dpl/provider/catalyze'
|
3
|
+
|
4
|
+
describe DPL::Provider::Catalyze do
|
5
|
+
subject :provider do
|
6
|
+
described_class.new(DummyContext.new, :target => 'test-target', :path => 'test-path')
|
7
|
+
end
|
8
|
+
|
9
|
+
describe "#check_auth" do
|
10
|
+
it 'should require a target' do
|
11
|
+
provider.options.update(:target => nil)
|
12
|
+
expect{ provider.check_auth }.to raise_error("Missing Catalyze target")
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
describe "#push_app" do
|
17
|
+
it 'should push the current branch to the target' do
|
18
|
+
expect(provider.context).to receive(:shell).with("git push --force test-target HEAD:master")
|
19
|
+
provider.push_app
|
20
|
+
end
|
21
|
+
it 'should add and commit local build files if skip_cleanup is true' do
|
22
|
+
provider.options.update(:skip_cleanup => true)
|
23
|
+
expect(provider.context).to receive(:shell).with("git checkout HEAD")
|
24
|
+
expect(provider.context).to receive(:shell).with("git add test-path --all --force")
|
25
|
+
expect(provider.context).to receive(:shell).with("git commit -m \"Local build\" --quiet")
|
26
|
+
expect(provider.context).to receive(:shell).with("git push --force test-target HEAD:master")
|
27
|
+
provider.push_app
|
28
|
+
end
|
29
|
+
it 'should use a path of "." if the path is not specified' do
|
30
|
+
provider.options.update(:path => nil)
|
31
|
+
provider.options.update(:skip_cleanup => true)
|
32
|
+
expect(provider.context).to receive(:shell).with("git checkout HEAD")
|
33
|
+
expect(provider.context).to receive(:shell).with("git add . --all --force")
|
34
|
+
expect(provider.context).to receive(:shell).with("git commit -m \"Local build\" --quiet")
|
35
|
+
expect(provider.context).to receive(:shell).with("git push --force test-target HEAD:master")
|
36
|
+
provider.push_app
|
37
|
+
end
|
38
|
+
end
|
39
|
+
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: 1.8.18.travis.
|
4
|
+
version: 1.8.18.travis.1529.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Konstantin Haase
|
@@ -108,6 +108,7 @@ files:
|
|
108
108
|
- lib/dpl/provider/bintray.rb
|
109
109
|
- lib/dpl/provider/bitballoon.rb
|
110
110
|
- lib/dpl/provider/boxfuse.rb
|
111
|
+
- lib/dpl/provider/catalyze.rb
|
111
112
|
- lib/dpl/provider/chef_supermarket.rb
|
112
113
|
- lib/dpl/provider/cloud66.rb
|
113
114
|
- lib/dpl/provider/cloud_files.rb
|
@@ -156,6 +157,7 @@ files:
|
|
156
157
|
- spec/provider/bintray_spec.rb
|
157
158
|
- spec/provider/bitballoon_spec.rb
|
158
159
|
- spec/provider/boxfuse_spec.rb
|
160
|
+
- spec/provider/catalyze_spec.rb
|
159
161
|
- spec/provider/chef_supermarket_spec.rb
|
160
162
|
- spec/provider/cloud66_spec.rb
|
161
163
|
- spec/provider/cloud_files_spec.rb
|