File tree Expand file tree Collapse file tree 5 files changed +22
-10
lines changed Expand file tree Collapse file tree 5 files changed +22
-10
lines changed Original file line number Diff line number Diff line change @@ -14,23 +14,15 @@ RUN yum -y update && yum -y upgrade
14
14
# UC3 ruby code pulls a common gem from github for use in Lambda code.
15
15
RUN yum -y install mysql-devel gcc make git
16
16
17
- RUN gem update bundler && \
18
- git clone https://github.com/cdluc3/uc3-ssm.git && \
19
- cd uc3-ssm && \
20
- # pull a particular branch in order to build it
21
- git checkout main && \
22
- gem build uc3-ssm.gemspec && \
23
- gem install uc3-ssm*.gem && \
24
- cd ..
17
+ RUN gem update bundler
25
18
26
19
# Start with a Gemfile containing only MySQL
27
20
COPY * ./
28
21
29
22
RUN bundle config --local build.mysql2 --with-mysql2-config=/usr/lib64/mysql/mysql_config && \
30
23
bundle config --local silence_root_warning true && \
31
24
bundle config set path 'vendor/bundle' && \
32
- bundle install && \
33
- gem install uc3-ssm/uc3-ssm*.gem --install-dir vendor/bundle/ruby/3.2.0
25
+ bundle install
34
26
35
27
# This structure assumes the following:
36
28
# lambda_function.rb contains a module name LambdaFunctions which contains a class Handler
Original file line number Diff line number Diff line change 1
1
# frozen_string_literal: true
2
2
3
+ # Docs say that the LambdaLayer gems are found mounted as /opt/ruby/gems but an inspection
4
+ # of the $LOAD_PATH shows that only /opt/ruby/lib is available. So we add what we want here
5
+ # and indicate exactly which folders contain the *.rb files
6
+ my_gem_path = Dir [ '/var/task/vendor/bundle/ruby/**/bundler/gems/**/lib/' ]
7
+ $LOAD_PATH. unshift ( *my_gem_path )
8
+
3
9
require 'json'
4
10
require 'uc3-ssm'
5
11
require 'mysql2'
Original file line number Diff line number Diff line change 4
4
# docker build -t x .
5
5
# docker run --rm -it --entrypoint 'bundle' -e SSM_ROOT_PATH=... x exec ruby test.rb
6
6
7
+ # Docs say that the LambdaLayer gems are found mounted as /opt/ruby/gems but an inspection
8
+ # of the $LOAD_PATH shows that only /opt/ruby/lib is available. So we add what we want here
9
+ # and indicate exactly which folders contain the *.rb files
10
+ my_gem_path = Dir [ '/var/task/vendor/bundle/ruby/3.2.0/bundler/gems/**/lib/' ]
11
+ $LOAD_PATH. unshift ( *my_gem_path )
12
+
7
13
require 'json'
8
14
require 'yaml'
9
15
require 'uc3-ssm'
Original file line number Diff line number Diff line change 311
311
description : Byte count file size limit for direct upload through the Merritt UI
312
312
upload-limit-message :
313
313
description : Human readable byte count file size limit for direct upload through the Merritt UI
314
+ port :
315
+ description : Microservice port
314
316
integ-tests :
315
317
skip : true
316
318
for-stage : &inttest
Original file line number Diff line number Diff line change 1
1
# frozen_string_literal: true
2
2
3
+ # Docs say that the LambdaLayer gems are found mounted as /opt/ruby/gems but an inspection
4
+ # of the $LOAD_PATH shows that only /opt/ruby/lib is available. So we add what we want here
5
+ # and indicate exactly which folders contain the *.rb files
6
+ my_gem_path = Dir [ '/var/task/vendor/bundle/ruby/**/bundler/gems/**/lib/' ]
7
+ $LOAD_PATH. unshift ( *my_gem_path )
8
+
3
9
require 'time'
4
10
require 'json'
5
11
require 'yaml'
You can’t perform that action at this time.
0 commit comments