pipedream 0.4.2 → 0.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/CHANGELOG.md +16 -1
- data/README.md +3 -1
- data/lib/pipedream/aws_services/helpers.rb +2 -1
- data/lib/pipedream/aws_services.rb +2 -0
- data/lib/pipedream/core.rb +3 -3
- data/lib/pipedream/dsl/pipeline/codebuild.rb +5 -6
- 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 +9 -5
- 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/pipedream.rb +1 -0
- data/lib/template/.pipedream/pipeline.rb.tt +1 -1
- data/pipedream.gemspec +1 -0
- metadata +17 -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: 9d161dba2b616b8ab983bde8ddd172c5ccd32c13c9cab76f4ddf921fa9636dea
|
|
4
|
+
data.tar.gz: 1810aae5887e61c4506fc1b6355b6b65582adb1f0357ab25a12520f0b666ffc3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: aefb74f8043afcd93241910080741556cc7fa7ff10d413e8d224300cdb0eda9b592d1e454c8733da99d14573e177d216258555efcf256da117b0410374fb1409
|
|
7
|
+
data.tar.gz: 72c69e745910403a08585f0c672c26e39d0669b24280941c7f29dd0ba6bc53894d98cb32a208d46ef2c795fce1af87c0932df92c0f6af6c76637ff0c3ac40868
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
|
@@ -1,7 +1,22 @@
|
|
|
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.6] - 2021-12-29
|
|
7
|
+
- [#4](https://github.com/boltops-tools/pipedream/pull/4) fix activesupport require
|
|
8
|
+
- fix settings merge
|
|
9
|
+
|
|
10
|
+
## [0.4.5]
|
|
11
|
+
- add aws codepipeline get-pipeline-state command hint in output also
|
|
12
|
+
- dont autocamelize code build project name
|
|
13
|
+
- #3 fix typo
|
|
14
|
+
|
|
15
|
+
## [0.4.4]
|
|
16
|
+
- add mfa support for normal IAM user
|
|
17
|
+
|
|
18
|
+
## [0.4.3]
|
|
19
|
+
- fix pipedream renaming
|
|
5
20
|
|
|
6
21
|
## [0.4.2]
|
|
7
22
|
- fix project_name
|
data/README.md
CHANGED
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|

|
|
8
8
|
[](http://badge.fury.io/rb/pipedream)
|
|
9
9
|
|
|
10
|
+
[](https://www.boltops.com)
|
|
11
|
+
|
|
10
12
|
Pipe Dream provides a DSL to make it easy create a CodePipeline pipeline.
|
|
11
13
|
|
|
12
14
|
Pipe Dream installs `pipedream` and `pipe` executables. Both of them do the same thing, `pipe` is just shorter to type.
|
|
@@ -32,7 +34,7 @@ First, run `pipe init` to generate a starter `.pipedream` folder structure.
|
|
|
32
34
|
File | Description
|
|
33
35
|
--- | ---
|
|
34
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/)
|
|
35
|
-
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/)
|
|
36
38
|
|
|
37
39
|
## DSL
|
|
38
40
|
|
|
@@ -44,7 +44,8 @@ module Pipedream::AwsServices
|
|
|
44
44
|
#
|
|
45
45
|
def inferred_stack_name(pipeline_name)
|
|
46
46
|
items = [pipeline_name, @options[:type], Pipedream.env_extra, "pipe"]
|
|
47
|
-
|
|
47
|
+
append_env = Pipedream.settings.dig(:stack_naming, :append_env)
|
|
48
|
+
items.insert(2, Pipedream.env) if append_env
|
|
48
49
|
items.reject(&:blank?).compact.join("-")
|
|
49
50
|
end
|
|
50
51
|
|
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,17 +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
|
|
20
|
+
name = item
|
|
21
21
|
default.deep_merge(
|
|
22
22
|
name: name,
|
|
23
|
-
configuration: { project_name:
|
|
23
|
+
configuration: { project_name: item },
|
|
24
24
|
)
|
|
25
25
|
else # Hash
|
|
26
|
-
# With the hash,
|
|
27
|
-
|
|
28
|
-
# Handy shorthands
|
|
29
|
-
# The project name will allow this syntax
|
|
26
|
+
# With the hash notation, user needs to set: name and project_name
|
|
27
|
+
#
|
|
30
28
|
# codebuild(name: "action-name", project_name: "codebuild-project-names")
|
|
29
|
+
#
|
|
31
30
|
project_name = item.delete(:project_name)
|
|
32
31
|
if project_name
|
|
33
32
|
item[:configuration] = { project_name: project_name }
|
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
|
|
@@ -25,7 +25,11 @@ module Pipedream
|
|
|
25
25
|
|
|
26
26
|
all_envs = default.deep_merge(user.deep_merge(project))
|
|
27
27
|
all_envs = merge_base(all_envs)
|
|
28
|
-
|
|
28
|
+
|
|
29
|
+
env_data = all_envs[pipe_env] || {}
|
|
30
|
+
base_data = all_envs["base"] || {}
|
|
31
|
+
data = base_data.merge(env_data)
|
|
32
|
+
|
|
29
33
|
data.deep_symbolize_keys
|
|
30
34
|
end
|
|
31
35
|
memoize :data
|
|
@@ -76,7 +80,7 @@ module Pipedream
|
|
|
76
80
|
end
|
|
77
81
|
|
|
78
82
|
def cb_root
|
|
79
|
-
ENV["
|
|
83
|
+
ENV["PIPE_ROOT"] || Dir.pwd
|
|
80
84
|
end
|
|
81
85
|
end
|
|
82
86
|
end
|
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
data/lib/pipedream.rb
CHANGED
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.6
|
|
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: 2021-12-29 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
|
|
@@ -366,7 +379,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
366
379
|
- !ruby/object:Gem::Version
|
|
367
380
|
version: '0'
|
|
368
381
|
requirements: []
|
|
369
|
-
rubygems_version: 3.
|
|
382
|
+
rubygems_version: 3.2.32
|
|
370
383
|
signing_key:
|
|
371
384
|
specification_version: 4
|
|
372
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.4.1)
|
|
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
|