lambda-layer-cake 0.1.4 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/build_env/build_ruby.rb +2 -1
- data/lib/lambda_layer_cake/rake_helper.rb +23 -3
- data/lib/lambda_layer_cake/version.rb +1 -1
- metadata +6 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad779537dd417dd3ddb16ca96ece7692dbf38aedff64ee95ae37a712b0fd5d33
|
4
|
+
data.tar.gz: 3330511939df7a90a960711dc55bddd7e3f13ee187d0020febcba01ca7293f98
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a38a3e6ea2694cb6de54d490d940529c498bfb2f6b3f5974f6c3f89487aedec0e7e2d8855a1cf16b19ae4f9f9fb5e53d45027a833c8d4b2930a96b4895922523
|
7
|
+
data.tar.gz: 99b148c4bc9f65e3c911a42a1b4be725bd3aa5fb2c2abe18918a9c5413ac6a431012899f4084c5b70a9b53ba9d9c873328da6426f923b8dbd541710013c4098d
|
data/build_env/build_ruby.rb
CHANGED
@@ -18,6 +18,7 @@ def main
|
|
18
18
|
if(File.exist?('system-packages.txt'))
|
19
19
|
STDERR.puts("Installing System Packages")
|
20
20
|
build_deps = File.read("system-packages.txt").split
|
21
|
+
STDERR.puts("Packages: #{build_deps.join(',')}")
|
21
22
|
unless(system("yum", "install", "-y", *(build_deps)))
|
22
23
|
STDERR.puts("Could not install build dependency pacakges")
|
23
24
|
exit 2
|
@@ -67,7 +68,7 @@ def main
|
|
67
68
|
FileUtils.cp(libs.to_a, '/tmp/outputs/lib')
|
68
69
|
|
69
70
|
#This directory is not needed at runtime
|
70
|
-
STDERR.puts("Removing extra files")
|
71
|
+
STDERR.puts("Removing extra files (skipping)")
|
71
72
|
FileUtils.rm_rf("/tmp/build/bundle/ruby/2.5.0/cache")
|
72
73
|
|
73
74
|
STDERR.puts("Moving Bundle into place")
|
@@ -26,7 +26,7 @@ module LambdaLayerCake
|
|
26
26
|
-v #{inputs_dir}:/tmp/inputs
|
27
27
|
-v #{outputs_dir}:/tmp/outputs
|
28
28
|
-v #{File.expand_path(__dir__ + "/../../build_env")}:/var/task
|
29
|
-
lambci/lambda
|
29
|
+
lambci/lambda:#{docker_tag} ruby build_ruby.rb}
|
30
30
|
STDERR.puts("Excuting cmd: #{cmd.join(' ')}")
|
31
31
|
system(*cmd) or raise
|
32
32
|
end
|
@@ -55,7 +55,7 @@ module LambdaLayerCake
|
|
55
55
|
desc "Build the current layer version and symlink it to the versioned zip"
|
56
56
|
file ".layer_cake/layer.zip": ".layer_cake/layer-#{input_hash}.zip" do
|
57
57
|
FileUtils.ln_s("layer-#{input_hash}.zip",".layer_cake/layer.zip", force: true)
|
58
|
-
end
|
58
|
+
end
|
59
59
|
end
|
60
60
|
|
61
61
|
def app_task_definitions!
|
@@ -81,7 +81,13 @@ module LambdaLayerCake
|
|
81
81
|
desc "Output the version hash for the current input files (Gemfile, Gemfile.lock, system-packages.txt)"
|
82
82
|
task :version do
|
83
83
|
$stdout.write input_hash
|
84
|
-
end
|
84
|
+
end
|
85
|
+
|
86
|
+
desc "Reports the ruby version of the lambda environment"
|
87
|
+
task :ruby_version do
|
88
|
+
$stdout.write ruby_version
|
89
|
+
end
|
90
|
+
|
85
91
|
end
|
86
92
|
|
87
93
|
def clean_task_definitions!
|
@@ -118,5 +124,19 @@ module LambdaLayerCake
|
|
118
124
|
)
|
119
125
|
)
|
120
126
|
end
|
127
|
+
|
128
|
+
def docker_tag
|
129
|
+
"build-ruby#{/^\d+\.\d+/.match(RUBY_VERSION)[0]}"
|
130
|
+
end
|
131
|
+
|
132
|
+
def ruby_version
|
133
|
+
cmd = %W{docker run --rm
|
134
|
+
-v #{inputs_dir}:/tmp/inputs
|
135
|
+
-v #{outputs_dir}:/tmp/outputs
|
136
|
+
-v #{File.expand_path(__dir__ + "/../../build_env")}:/var/task
|
137
|
+
lambci/lambda:#{docker_tag} ruby -e }.push '$stdout.write RUBY_VERSION'
|
138
|
+
STDERR.puts("Excuting cmd: #{cmd.join(' ')}")
|
139
|
+
system(*cmd) or raise
|
140
|
+
end
|
121
141
|
end
|
122
142
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lambda-layer-cake
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Logan Bowers
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-07-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -73,7 +73,7 @@ homepage: http://github.com/loganb/lambda-layer-cake
|
|
73
73
|
licenses:
|
74
74
|
- MIT
|
75
75
|
metadata: {}
|
76
|
-
post_install_message:
|
76
|
+
post_install_message:
|
77
77
|
rdoc_options: []
|
78
78
|
require_paths:
|
79
79
|
- lib
|
@@ -88,9 +88,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '0'
|
90
90
|
requirements: []
|
91
|
-
|
92
|
-
|
93
|
-
signing_key:
|
91
|
+
rubygems_version: 3.1.2
|
92
|
+
signing_key:
|
94
93
|
specification_version: 4
|
95
94
|
summary: A set of Rake tasks to bundle Rails apps for use on AWS Lambda
|
96
95
|
test_files: []
|