pipedream 0.4.0 → 0.4.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/CHANGELOG.md +18 -1
- data/README.md +8 -2
- data/lib/pipedream/aws_services.rb +2 -0
- data/lib/pipedream/core.rb +3 -3
- data/lib/pipedream/dsl/pipeline/codebuild.rb +5 -20
- data/lib/pipedream/evaluate.rb +1 -1
- data/lib/pipedream/init.rb +1 -1
- data/lib/pipedream/pipeline.rb +1 -1
- data/lib/pipedream/role.rb +1 -1
- data/lib/pipedream/schedule.rb +1 -1
- data/lib/pipedream/setting.rb +3 -3
- data/lib/pipedream/sns.rb +1 -1
- data/lib/pipedream/start.rb +7 -4
- data/lib/pipedream/version.rb +1 -1
- data/lib/pipedream/webhook.rb +1 -1
- data/lib/template/.pipedream/README.md +25 -0
- data/lib/template/.pipedream/pipeline.rb.tt +1 -1
- data/pipedream.gemspec +1 -0
- metadata +18 -4
- data/Gemfile.lock +0 -112
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3d9e2922f9c6667d76a0d7028ae49000536ab914662417e72d0f0fdf6cc7aea5
|
4
|
+
data.tar.gz: 3e75a59671e7168f7d747f4a46db94f9f6756a0f0a925bd1ad1607ef8be3f733
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 28c61cb0f1dd55003854b179ffd26a153650b47558ac505e06c703624f453e3ee4bfb06ad40f4e5f0955245db3e37cb29430dd191ad416878c8fe40328077c06
|
7
|
+
data.tar.gz: fe15a95759be6b95748850ddc95f49b330303585f60c847f5d50cd6398133a482e0d75d9293b5d098e7f78a1f45b2d02eecaffc92cd2eab4662d4ed2df6e0e5c
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,24 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
|
-
This project *
|
4
|
+
This project *loosely* adheres to [Semantic Versioning](http://semver.org/), even before v1.0.
|
5
|
+
|
6
|
+
## [0.4.5]
|
7
|
+
- add aws codepipeline get-pipeline-state command hint in output also
|
8
|
+
- dont autocamelize code build project name
|
9
|
+
- #3 fix typo
|
10
|
+
|
11
|
+
## [0.4.4]
|
12
|
+
- add mfa support for normal IAM user
|
13
|
+
|
14
|
+
## [0.4.3]
|
15
|
+
- fix pipedream renaming
|
16
|
+
|
17
|
+
## [0.4.2]
|
18
|
+
- fix project_name
|
19
|
+
|
20
|
+
## [0.4.1]
|
21
|
+
- remove codebuild_prefix and codebuild_suffix helpers
|
5
22
|
|
6
23
|
## [0.4.0]
|
7
24
|
- rename to pipedream
|
data/README.md
CHANGED
@@ -1,8 +1,14 @@
|
|
1
|
-
|
1
|
+
<div align="center">
|
2
|
+
<a href="http://pipedream.run"><img src="https://raw.githubusercontent.com/tongueroo/pipedream/master/docs/img/logos/pipedream-with-text.png" /></a>
|
3
|
+
</div>
|
4
|
+
|
5
|
+
# Pipe Dream
|
2
6
|
|
3
7
|
![Build Status](https://codebuild.us-west-2.amazonaws.com/badges?uuid=eyJlbmNyeXB0ZWREYXRhIjoiWk1FM0dldzE5MUM5R3VqVGxxTmRFb1JGNnkxQjJpTDYvajYrQk91YzErNjdNc1VYVElHM3V5ZEJXcStyMmZVc210WG8vUURSV2JST0ZpSWc5Y0pYR3k0PSIsIml2UGFyYW1ldGVyU3BlYyI6IldvYXhLMU8yS2pQdVRKbEoiLCJtYXRlcmlhbFNldFNlcmlhbCI6MX0%3D&branch=master)
|
4
8
|
[![Gem Version](https://badge.fury.io/rb/pipedream.png)](http://badge.fury.io/rb/pipedream)
|
5
9
|
|
10
|
+
[![BoltOps Badge](https://img.boltops.com/boltops/badges/boltops-badge.png)](https://www.boltops.com)
|
11
|
+
|
6
12
|
Pipe Dream provides a DSL to make it easy create a CodePipeline pipeline.
|
7
13
|
|
8
14
|
Pipe Dream installs `pipedream` and `pipe` executables. Both of them do the same thing, `pipe` is just shorter to type.
|
@@ -28,7 +34,7 @@ First, run `pipe init` to generate a starter `.pipedream` folder structure.
|
|
28
34
|
File | Description
|
29
35
|
--- | ---
|
30
36
|
pipeline.rb | The CodePipeline pipeline written as a DSL. This is required. Here are the [Pipeline DSL docs](https://pipedream.run/docs/dsl/pipeline/)
|
31
|
-
schedule.rb | A CloudWatch scheduled event written as a DSL. Here are the [
|
37
|
+
schedule.rb | A CloudWatch scheduled event written as a DSL. Here are the [Schedule DSL docs](https://pipedream.run/docs/dsl/schedule/)
|
32
38
|
|
33
39
|
## DSL
|
34
40
|
|
data/lib/pipedream/core.rb
CHANGED
@@ -45,12 +45,12 @@ module Pipedream
|
|
45
45
|
end
|
46
46
|
memoize :settings
|
47
47
|
|
48
|
-
def
|
48
|
+
def check_pipedream_project!
|
49
49
|
check_path = "#{Pipedream.root}/.pipedream"
|
50
50
|
unless File.exist?(check_path)
|
51
|
-
puts "ERROR: No .pipedream folder found. Are you sure you are in a project with
|
51
|
+
puts "ERROR: No .pipedream folder found. Are you sure you are in a project with pipedream setup?".color(:red)
|
52
52
|
puts "Current directory: #{Dir.pwd}"
|
53
|
-
puts "If you want to set up
|
53
|
+
puts "If you want to set up pipedream for this prjoect, please create a settings file via: pipe init"
|
54
54
|
exit 1 unless ENV['TEST']
|
55
55
|
end
|
56
56
|
end
|
@@ -17,18 +17,16 @@ module Pipedream::Dsl::Pipeline
|
|
17
17
|
|
18
18
|
actions = projects.map do |item|
|
19
19
|
if item.is_a?(String)
|
20
|
-
name = item
|
21
|
-
project_name = adjusted_project_name(item) # add prefix and suffix
|
20
|
+
name = item
|
22
21
|
default.deep_merge(
|
23
22
|
name: name,
|
24
|
-
configuration: { project_name:
|
23
|
+
configuration: { project_name: item },
|
25
24
|
)
|
26
25
|
else # Hash
|
27
|
-
# With the hash,
|
28
|
-
|
29
|
-
# Handy shorthands
|
30
|
-
# The project name will allow this syntax
|
26
|
+
# With the hash notation, user needs to set: name and project_name
|
27
|
+
#
|
31
28
|
# codebuild(name: "action-name", project_name: "codebuild-project-names")
|
29
|
+
#
|
32
30
|
project_name = item.delete(:project_name)
|
33
31
|
if project_name
|
34
32
|
item[:configuration] = { project_name: project_name }
|
@@ -40,18 +38,5 @@ module Pipedream::Dsl::Pipeline
|
|
40
38
|
|
41
39
|
action(*actions)
|
42
40
|
end
|
43
|
-
|
44
|
-
def codebuild_prefix(v)
|
45
|
-
@codebuild_prefix = v
|
46
|
-
end
|
47
|
-
|
48
|
-
def codebuild_suffix(v)
|
49
|
-
@codebuild_suffix = v
|
50
|
-
end
|
51
|
-
|
52
|
-
private
|
53
|
-
def adjusted_project_name(name)
|
54
|
-
[@codebuild_prefix, name, @codebuild_suffix].compact.join
|
55
|
-
end
|
56
41
|
end
|
57
42
|
end
|
data/lib/pipedream/evaluate.rb
CHANGED
data/lib/pipedream/init.rb
CHANGED
data/lib/pipedream/pipeline.rb
CHANGED
data/lib/pipedream/role.rb
CHANGED
data/lib/pipedream/schedule.rb
CHANGED
data/lib/pipedream/setting.rb
CHANGED
@@ -4,14 +4,14 @@ require 'render_me_pretty'
|
|
4
4
|
module Pipedream
|
5
5
|
class Setting
|
6
6
|
extend Memoist
|
7
|
-
def initialize(
|
8
|
-
@
|
7
|
+
def initialize(check_pipedream_project=true)
|
8
|
+
@check_pipedream_project = check_pipedream_project
|
9
9
|
end
|
10
10
|
|
11
11
|
# data contains the settings.yml config. The order or precedence for settings
|
12
12
|
# is the project ufo/settings.yml and then the ~/.pipedream/settings.yml.
|
13
13
|
def data
|
14
|
-
Pipedream.
|
14
|
+
Pipedream.check_pipedream_project! if @check_pipedream_project
|
15
15
|
return {} unless File.exist?(project_settings_path)
|
16
16
|
|
17
17
|
# project based settings files
|
data/lib/pipedream/sns.rb
CHANGED
data/lib/pipedream/start.rb
CHANGED
@@ -54,9 +54,9 @@ module Pipedream
|
|
54
54
|
resource = resp.stack_resources.find do |r|
|
55
55
|
r.logical_resource_id == "CodePipeline"
|
56
56
|
end
|
57
|
-
resource.physical_resource_id #
|
57
|
+
resource.physical_resource_id # pipeline name
|
58
58
|
else
|
59
|
-
puts "ERROR: Unable to find the
|
59
|
+
puts "ERROR: Unable to find the pipeline with either full_pipeline_name: #{@full_pipeline_name} or stack name: #{@stack_name}".color(:red)
|
60
60
|
exit 1
|
61
61
|
end
|
62
62
|
end
|
@@ -66,12 +66,15 @@ module Pipedream
|
|
66
66
|
def codepipeline_info(execution_id)
|
67
67
|
region = `aws configure get region`.strip rescue "us-east-1"
|
68
68
|
url = "https://#{region}.console.aws.amazon.com/codesuite/codepipeline/pipelines/#{pipeline_name}/view"
|
69
|
-
cli = "aws codepipeline get-pipeline-execution --pipeline-execution-id #{execution_id} --pipeline-name #{pipeline_name}"
|
70
69
|
|
71
70
|
puts "Pipeline started: #{pipeline_name}"
|
72
71
|
puts "Please check the CodePipeline console for the status."
|
73
72
|
puts "CodePipeline Console: #{url}"
|
74
|
-
puts "Pipeline cli:
|
73
|
+
puts "Pipeline cli commands:"
|
74
|
+
puts
|
75
|
+
puts " aws codepipeline get-pipeline-execution --pipeline-execution-id #{execution_id} --pipeline-name #{pipeline_name}"
|
76
|
+
puts " aws codepipeline get-pipeline-state --name #{pipeline_name}"
|
77
|
+
puts
|
75
78
|
end
|
76
79
|
|
77
80
|
def pipeline_exists?(name)
|
data/lib/pipedream/version.rb
CHANGED
data/lib/pipedream/webhook.rb
CHANGED
@@ -0,0 +1,25 @@
|
|
1
|
+
# Pipedream Files
|
2
|
+
|
3
|
+
The files in folder are used by pipedream to build AWS CodePipeline pipelines. For more info, check out the [pipedream docs](https://pipedream.run). Here's a quick start.
|
4
|
+
|
5
|
+
## Install Tool
|
6
|
+
|
7
|
+
gem install pipedream
|
8
|
+
|
9
|
+
This installs both the `pipe` and `pipedream` commands. They do the same thing, the `pipe` command is just shorter to type.
|
10
|
+
|
11
|
+
## Update Project
|
12
|
+
|
13
|
+
To update the CodePipeline pipelines:
|
14
|
+
|
15
|
+
pipedream deploy demo
|
16
|
+
|
17
|
+
## Start a Execution
|
18
|
+
|
19
|
+
To start a CodePipeline execution:
|
20
|
+
|
21
|
+
pipedream start demo
|
22
|
+
|
23
|
+
To specify a branch:
|
24
|
+
|
25
|
+
pipedream start demo -b feature
|
data/pipedream.gemspec
CHANGED
@@ -23,6 +23,7 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.require_paths = ["lib"]
|
24
24
|
|
25
25
|
spec.add_dependency "activesupport"
|
26
|
+
spec.add_dependency "aws-mfa-secure"
|
26
27
|
spec.add_dependency "aws-sdk-cloudformation"
|
27
28
|
spec.add_dependency "aws-sdk-codepipeline"
|
28
29
|
spec.add_dependency "aws-sdk-s3"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pipedream
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tung Nguyen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-06-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: aws-mfa-secure
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: aws-sdk-cloudformation
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -250,7 +264,6 @@ files:
|
|
250
264
|
- ".rspec"
|
251
265
|
- CHANGELOG.md
|
252
266
|
- Gemfile
|
253
|
-
- Gemfile.lock
|
254
267
|
- Guardfile
|
255
268
|
- LICENSE.txt
|
256
269
|
- README.md
|
@@ -299,6 +312,7 @@ files:
|
|
299
312
|
- lib/pipedream/update.rb
|
300
313
|
- lib/pipedream/version.rb
|
301
314
|
- lib/pipedream/webhook.rb
|
315
|
+
- lib/template/.pipedream/README.md
|
302
316
|
- lib/template/.pipedream/pipeline.rb.tt
|
303
317
|
- lib/template/.pipedream/schedule.rb
|
304
318
|
- lib/template/.pipedream/settings.yml
|
@@ -365,7 +379,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
365
379
|
- !ruby/object:Gem::Version
|
366
380
|
version: '0'
|
367
381
|
requirements: []
|
368
|
-
rubygems_version: 3.
|
382
|
+
rubygems_version: 3.1.2
|
369
383
|
signing_key:
|
370
384
|
specification_version: 4
|
371
385
|
summary: A beautiful and powerful DSL to create and manage AWS CodePipeline pipelines
|
data/Gemfile.lock
DELETED
@@ -1,112 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
pipedream (0.3.3)
|
5
|
-
activesupport
|
6
|
-
aws-sdk-cloudformation
|
7
|
-
aws-sdk-codepipeline
|
8
|
-
aws-sdk-s3
|
9
|
-
aws-sdk-ssm
|
10
|
-
cfn_camelizer
|
11
|
-
memoist
|
12
|
-
rainbow
|
13
|
-
render_me_pretty
|
14
|
-
thor
|
15
|
-
zeitwerk
|
16
|
-
|
17
|
-
GEM
|
18
|
-
remote: https://rubygems.org/
|
19
|
-
specs:
|
20
|
-
activesupport (6.0.0)
|
21
|
-
concurrent-ruby (~> 1.0, >= 1.0.2)
|
22
|
-
i18n (>= 0.7, < 2)
|
23
|
-
minitest (~> 5.1)
|
24
|
-
tzinfo (~> 1.1)
|
25
|
-
zeitwerk (~> 2.1, >= 2.1.8)
|
26
|
-
aws-eventstream (1.0.3)
|
27
|
-
aws-partitions (1.220.0)
|
28
|
-
aws-sdk-cloudformation (1.25.0)
|
29
|
-
aws-sdk-core (~> 3, >= 3.61.1)
|
30
|
-
aws-sigv4 (~> 1.1)
|
31
|
-
aws-sdk-codepipeline (1.25.0)
|
32
|
-
aws-sdk-core (~> 3, >= 3.61.1)
|
33
|
-
aws-sigv4 (~> 1.1)
|
34
|
-
aws-sdk-core (3.68.0)
|
35
|
-
aws-eventstream (~> 1.0, >= 1.0.2)
|
36
|
-
aws-partitions (~> 1.0)
|
37
|
-
aws-sigv4 (~> 1.1)
|
38
|
-
jmespath (~> 1.0)
|
39
|
-
aws-sdk-kms (1.24.0)
|
40
|
-
aws-sdk-core (~> 3, >= 3.61.1)
|
41
|
-
aws-sigv4 (~> 1.1)
|
42
|
-
aws-sdk-s3 (1.48.0)
|
43
|
-
aws-sdk-core (~> 3, >= 3.61.1)
|
44
|
-
aws-sdk-kms (~> 1)
|
45
|
-
aws-sigv4 (~> 1.1)
|
46
|
-
aws-sdk-ssm (1.56.0)
|
47
|
-
aws-sdk-core (~> 3, >= 3.61.1)
|
48
|
-
aws-sigv4 (~> 1.1)
|
49
|
-
aws-sigv4 (1.1.0)
|
50
|
-
aws-eventstream (~> 1.0, >= 1.0.2)
|
51
|
-
byebug (11.0.1)
|
52
|
-
cfn_camelizer (0.4.0)
|
53
|
-
activesupport
|
54
|
-
memoist
|
55
|
-
rainbow
|
56
|
-
cli_markdown (0.1.0)
|
57
|
-
codeclimate-test-reporter (1.0.9)
|
58
|
-
simplecov (<= 0.13)
|
59
|
-
concurrent-ruby (1.1.5)
|
60
|
-
diff-lcs (1.3)
|
61
|
-
docile (1.1.5)
|
62
|
-
i18n (1.6.0)
|
63
|
-
concurrent-ruby (~> 1.0)
|
64
|
-
jmespath (1.4.0)
|
65
|
-
json (2.2.0)
|
66
|
-
memoist (0.16.0)
|
67
|
-
minitest (5.12.2)
|
68
|
-
rainbow (3.0.0)
|
69
|
-
rake (13.0.0)
|
70
|
-
render_me_pretty (0.8.3)
|
71
|
-
activesupport
|
72
|
-
rainbow
|
73
|
-
tilt
|
74
|
-
rspec (3.8.0)
|
75
|
-
rspec-core (~> 3.8.0)
|
76
|
-
rspec-expectations (~> 3.8.0)
|
77
|
-
rspec-mocks (~> 3.8.0)
|
78
|
-
rspec-core (3.8.2)
|
79
|
-
rspec-support (~> 3.8.0)
|
80
|
-
rspec-expectations (3.8.4)
|
81
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
82
|
-
rspec-support (~> 3.8.0)
|
83
|
-
rspec-mocks (3.8.1)
|
84
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
85
|
-
rspec-support (~> 3.8.0)
|
86
|
-
rspec-support (3.8.2)
|
87
|
-
simplecov (0.13.0)
|
88
|
-
docile (~> 1.1.0)
|
89
|
-
json (>= 1.8, < 3)
|
90
|
-
simplecov-html (~> 0.10.0)
|
91
|
-
simplecov-html (0.10.2)
|
92
|
-
thor (0.20.3)
|
93
|
-
thread_safe (0.3.6)
|
94
|
-
tilt (2.0.10)
|
95
|
-
tzinfo (1.2.5)
|
96
|
-
thread_safe (~> 0.1)
|
97
|
-
zeitwerk (2.1.10)
|
98
|
-
|
99
|
-
PLATFORMS
|
100
|
-
ruby
|
101
|
-
|
102
|
-
DEPENDENCIES
|
103
|
-
bundler
|
104
|
-
byebug
|
105
|
-
cli_markdown
|
106
|
-
codeclimate-test-reporter
|
107
|
-
pipedream!
|
108
|
-
rake
|
109
|
-
rspec
|
110
|
-
|
111
|
-
BUNDLED WITH
|
112
|
-
2.0.2
|