This repository was archived by the owner on Dec 2, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +42
-0
lines changed Expand file tree Collapse file tree 3 files changed +42
-0
lines changed Original file line number Diff line number Diff line change
1
+ language : go
2
+
3
+ services :
4
+ - docker
5
+
6
+ go_import_path : github.com/awslabs/aws-lambda-container-image-converter
7
+
8
+ go :
9
+ - 1.11.x
10
+
11
+ script :
12
+ - make install-deps build test integration-test stage-release-binaries
Original file line number Diff line number Diff line change @@ -27,6 +27,10 @@ $(LOCAL_BINARY): $(SOURCES) GITCOMMIT_SHA
27
27
test :
28
28
go test -v -timeout 30s -short -cover $(shell go list ./img2lambda/... | grep -v /vendor/)
29
29
30
+ .PHONY : integration-test
31
+ integration-test : $(LOCAL_BINARY )
32
+ ./scripts/build_example.sh
33
+
30
34
.PHONY : generate
31
35
generate : $(SOURCES )
32
36
PATH=$(LOCAL_PATH ) go generate -x $(shell go list ./img2lambda/... | grep -v '/vendor/')
@@ -86,4 +90,5 @@ GITCOMMIT_SHA: $(GITFILES)
86
90
clean :
87
91
- rm -rf ./bin
88
92
- rm -rf ./output
93
+ - rm -rf ./example/output
89
94
- rm -f GITCOMMIT_SHA
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ set -e
4
+
5
+ # Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
6
+ # SPDX-License-Identifier: MIT-0
7
+
8
+ # Normalize to working directory being build root (up one level from ./scripts)
9
+ ROOT=$( cd " $( dirname " ${BASH_SOURCE[0]} " ) /.." && pwd )
10
+ cd " ${ROOT} "
11
+
12
+ cd " ${ROOT} " /example
13
+
14
+ # Build the example and parse the layers
15
+ docker build -t lambda-php .
16
+
17
+ docker run lambda-php hello ' {"name": "World"}'
18
+
19
+ docker run lambda-php goodbye ' {"name": "World"}'
20
+
21
+ ../bin/local/img2lambda -i lambda-php:latest --dry-run
22
+
23
+ # Look for the 2 layers that contain files in opt/
24
+ ls output/layer-1.zip
25
+ ls output/layer-2.zip
You can’t perform that action at this time.
0 commit comments