jets_gem_layer 1.0.2 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +18 -6
- data/lib/jets_gem_layer/task_helper.rb +5 -2
- data/lib/jets_gem_layer/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a4b51be7125e85344e0542ec777f71280613e6a42c660eba8209ba4d34d56234
|
4
|
+
data.tar.gz: a5503c800269ecae3de3555173b3c2d71e8194d1150b98824c55752b9aa5d530
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a12f3bdb0e1b7a0f4a346d753fd15f2d8a4f6ef83355bed5841c164128b4386860d82888b99ff6816689a67f815e7c1769d2b5acc9037a25ca5697ab71504016
|
7
|
+
data.tar.gz: 481d2f2352261090660f956732ab5ec707d42b81fca0edfc7161f0cbeaacd440aeda85c729d805c8c32b664946e0484d1c76e45919641b953677afbbc44200c8
|
data/README.md
CHANGED
@@ -26,13 +26,22 @@ config.pro.disable = true
|
|
26
26
|
is to add the included helper to your environment configuration.
|
27
27
|
|
28
28
|
```ruby
|
29
|
-
# config/
|
29
|
+
# config/application.rb
|
30
|
+
|
31
|
+
require 'jets_gem_layer'
|
32
|
+
|
33
|
+
module CrmBroker
|
34
|
+
class Application < Jets::Application
|
30
35
|
|
31
|
-
# JetsGemLayer.arn will resolve to the latest version of the published Layer, also looking for a correct hash in the
|
32
|
-
# layer description indicating the current Gemfile.lock and Gemfile are supported.
|
33
|
-
# If a suitable layer is not found, the gem will log an error and resolve to 'error-fetching-gem-layer-arn' which will allow your
|
34
|
-
# application to run locally but hopefully prevent an invalid deployment
|
35
|
-
config.lambda.layers = [JetsGemLayer.arn]
|
36
|
+
# JetsGemLayer.arn will resolve to the latest version of the published Layer, also looking for a correct hash in the
|
37
|
+
# layer description indicating the current Gemfile.lock and Gemfile are supported.
|
38
|
+
# If a suitable layer is not found, the gem will log an error and resolve to 'error-fetching-gem-layer-arn' which will allow your
|
39
|
+
# application to run locally but hopefully prevent an invalid deployment
|
40
|
+
config.lambda.layers = [JetsGemLayer.arn]
|
41
|
+
|
42
|
+
# ...
|
43
|
+
end
|
44
|
+
end
|
36
45
|
```
|
37
46
|
|
38
47
|
3. Add this gem to your Gemfile:
|
@@ -82,5 +91,8 @@ Within your project directory (example for development environment) or through y
|
|
82
91
|
3. `JETS_ENV=development rake gem_layer:cleanup_published`
|
83
92
|
* After a successful deploy, you may run this to cleanup the old gem layer version(s) no longer in use
|
84
93
|
|
94
|
+
**Important:** The zip command must be installed in your environment or the layer will fail to zip and upload. Perhaps we will
|
95
|
+
switch to rubyzip in the future.
|
96
|
+
|
85
97
|
## Acknowledgements
|
86
98
|
A big thank you to the authors of [Lambda Layer Cake](https://github.com/loganb/lambda-layer-cake), which served as a reference.
|
@@ -30,8 +30,8 @@ module JetsGemLayer
|
|
30
30
|
def arn
|
31
31
|
# We do not want to do any of this when running in the lambda environment
|
32
32
|
# as it is only required for deployment.
|
33
|
-
@arn ||= if ENV['LAMBDA_TASK_ROOT']
|
34
|
-
'no-op-while-running-in-lambda'
|
33
|
+
@arn ||= if ENV['LAMBDA_TASK_ROOT'] || ENV['JETS_NO_INTERNET']
|
34
|
+
'no-op-while-running-in-lambda-or-test'
|
35
35
|
else
|
36
36
|
published_arn
|
37
37
|
end
|
@@ -101,6 +101,9 @@ module JetsGemLayer
|
|
101
101
|
def build_layer
|
102
102
|
FileUtils.mkdir_p(inputs_dir)
|
103
103
|
FileUtils.cp(INPUT_FILES.existing, inputs_dir)
|
104
|
+
puts 'Running docker to build layer'
|
105
|
+
command = docker_run_cmd
|
106
|
+
puts command.join(' ')
|
104
107
|
system(*docker_run_cmd) or raise $CHILD_STATUS.to_s
|
105
108
|
zip_layer
|
106
109
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jets_gem_layer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- DocGo Engineering
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-02-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jets
|
@@ -80,7 +80,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
80
80
|
- !ruby/object:Gem::Version
|
81
81
|
version: '0'
|
82
82
|
requirements: []
|
83
|
-
rubygems_version: 3.5.
|
83
|
+
rubygems_version: 3.5.4
|
84
84
|
signing_key:
|
85
85
|
specification_version: 4
|
86
86
|
summary: Rake tasks to automate building a Lambda Layer for Ruby on Jets projects
|