-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add custom working directory to custom builder (#4112)
* feat: Add custom working directory to custom builder * apply black * remove the test cases that depend on the new lambda builders version.
- Loading branch information
Showing
12 changed files
with
565 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
...stom_build_with_custom_root_project_path_custom_makefile_path_and_custom_working_dir.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
AWSTemplateFormatVersion : '2010-09-09' | ||
Transform: AWS::Serverless-2016-10-31 | ||
|
||
Parameteres: | ||
Runtime: | ||
Type: String | ||
CodeUri: | ||
Type: String | ||
Handler: | ||
Type: String | ||
|
||
Resources: | ||
|
||
Function: | ||
Type: AWS::Serverless::Function | ||
Properties: | ||
Handler: !Ref Handler | ||
Runtime: !Ref Runtime | ||
CodeUri: !Ref CodeUri | ||
Timeout: 600 | ||
Metadata: | ||
ContextPath: "./custom_root_dir_custom_makefile_and_custom_working_dir/custom_makefile" | ||
ProjectRootDirectory: "./custom_root_dir_custom_makefile_and_custom_working_dir" | ||
WorkingDirectory: "./custom_root_dir_custom_makefile_and_custom_working_dir/working_dir" |
22 changes: 22 additions & 0 deletions
22
tests/integration/testdata/buildcmd/custom_build_with_custom_working_dir.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
AWSTemplateFormatVersion : '2010-09-09' | ||
Transform: AWS::Serverless-2016-10-31 | ||
|
||
Parameteres: | ||
Runtime: | ||
Type: String | ||
CodeUri: | ||
Type: String | ||
Handler: | ||
Type: String | ||
|
||
Resources: | ||
|
||
Function: | ||
Type: AWS::Serverless::Function | ||
Properties: | ||
Handler: !Ref Handler | ||
Runtime: !Ref Runtime | ||
CodeUri: !Ref CodeUri | ||
Timeout: 600 | ||
Metadata: | ||
WorkingDirectory: "./custom_working_dir_src_code/working_dir" |
5 changes: 5 additions & 0 deletions
5
.../buildcmd/custom_root_dir_custom_makefile_and_custom_working_dir/custom_makefile/Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
build-Function: | ||
cp *.py $(ARTIFACTS_DIR) | ||
cp requirements.txt $(ARTIFACTS_DIR) | ||
python -m pip install -r requirements.txt -t $(ARTIFACTS_DIR) | ||
rm -rf $(ARTIFACTS_DIR)/bin |
Empty file.
4 changes: 4 additions & 0 deletions
4
...tdata/buildcmd/custom_root_dir_custom_makefile_and_custom_working_dir/working_dir/main.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import requests | ||
|
||
def handler(event, context): | ||
return requests.__version__ |
1 change: 1 addition & 0 deletions
1
...ldcmd/custom_root_dir_custom_makefile_and_custom_working_dir/working_dir/requirements.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
requests==2.23.0 |
5 changes: 5 additions & 0 deletions
5
tests/integration/testdata/buildcmd/custom_working_dir_src_code/Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
build-Function: | ||
cp *.py $(ARTIFACTS_DIR) | ||
cp requirements.txt $(ARTIFACTS_DIR) | ||
python -m pip install -r requirements.txt -t $(ARTIFACTS_DIR) | ||
rm -rf $(ARTIFACTS_DIR)/bin |
Empty file.
4 changes: 4 additions & 0 deletions
4
tests/integration/testdata/buildcmd/custom_working_dir_src_code/working_dir/main.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import requests | ||
|
||
def handler(event, context): | ||
return requests.__version__ |
1 change: 1 addition & 0 deletions
1
tests/integration/testdata/buildcmd/custom_working_dir_src_code/working_dir/requirements.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
requests==2.23.0 |
Oops, something went wrong.