Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: ruby2.7 support in AWS SAM CLI #1806

Merged
merged 2 commits into from
Feb 20, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions samcli/lib/build/workflow_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ def get_workflow_config(runtime, code_dir, project_dir):
"nodejs10.x": BasicWorkflowSelector(NODEJS_NPM_CONFIG),
"nodejs12.x": BasicWorkflowSelector(NODEJS_NPM_CONFIG),
"ruby2.5": BasicWorkflowSelector(RUBY_BUNDLER_CONFIG),
"ruby2.7": BasicWorkflowSelector(RUBY_BUNDLER_CONFIG),
"dotnetcore2.0": BasicWorkflowSelector(DOTNET_CLIPACKAGE_CONFIG),
"dotnetcore2.1": BasicWorkflowSelector(DOTNET_CLIPACKAGE_CONFIG),
"go1.x": BasicWorkflowSelector(GO_MOD_CONFIG),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Resources:
Properties:
CodeUri: hello_world/
Handler: app.lambda_handler
Runtime: ruby2.5
Runtime: {{ cookiecutter.runtime }}
Events:
HelloWorld:
Type: Api # More info about API Event Source: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#api
Expand Down
6 changes: 4 additions & 2 deletions samcli/local/common/runtime_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
],
"ruby": [
{
"runtimes": ["ruby2.5"],
"runtimes": ["ruby2.5", "ruby2.7"],
"dependency_manager": "bundler",
"init_location": os.path.join(_templates, "cookiecutter-aws-sam-hello-ruby"),
"build": True,
Expand Down Expand Up @@ -74,6 +74,7 @@
"python3.6": ["pip"],
"python2.7": ["pip"],
"ruby2.5": ["bundler"],
"ruby2.7": ["bundler"],
"nodejs12.x": ["npm"],
"nodejs10.x": ["npm"],
"dotnetcore2.1": ["cli-package"],
Expand All @@ -100,7 +101,7 @@
# latest of each runtime version
"nodejs12.x",
"python3.8",
"ruby2.5",
"ruby2.7",
"go1.x",
"java11",
"dotnetcore2.1",
Expand All @@ -111,6 +112,7 @@
"python3.6",
"python2.7",
# older ruby runtimes
"ruby2.5",
# older java runtimes
"java8",
# older dotnetcore runtimes
Expand Down
1 change: 1 addition & 0 deletions samcli/local/docker/lambda_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class Runtime(Enum):
python37 = "python3.7"
python38 = "python3.8"
ruby25 = "ruby2.5"
ruby27 = "ruby2.7"
java8 = "java8"
java11 = "java11"
go1x = "go1.x"
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/buildcmd/test_build_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,12 +237,12 @@ class TestBuildCommand_RubyFunctions(BuildIntegBase):
FUNCTION_LOGICAL_ID = "Function"

@pytest.mark.flaky(reruns=3)
@parameterized.expand([("ruby2.5")])
@parameterized.expand([("ruby2.5"), ("ruby2.7")])
def test_building_ruby_in_container(self, runtime):
self._test_with_default_gemfile(runtime, "use_container")

@pytest.mark.flaky(reruns=3)
@parameterized.expand([("ruby2.5")])
@parameterized.expand([("ruby2.5"), ("ruby2.7")])
def test_building_ruby_in_process(self, runtime):
self._test_with_default_gemfile(runtime, False)

Expand Down