diff --git a/examples/lambda/analysis/.pipe.yaml b/examples/lambda/analysis/.pipe.yaml index 9be0554a0c..6d6c10e48f 100644 --- a/examples/lambda/analysis/.pipe.yaml +++ b/examples/lambda/analysis/.pipe.yaml @@ -4,9 +4,6 @@ apiVersion: pipecd.dev/v1beta1 kind: LambdaApp spec: - input: - # Lambda code sourced from the same Git repository. - path: lambdas/helloworld pipeline: stages: # Deploy workloads of the new version. diff --git a/examples/lambda/analysis/function.yaml b/examples/lambda/analysis/function.yaml new file mode 100644 index 0000000000..0c29d74fd6 --- /dev/null +++ b/examples/lambda/analysis/function.yaml @@ -0,0 +1,7 @@ +apiVersion: pipecd.dev/v1beta1 +kind: LambdaFunction +spec: + name: SimpleFunction + image: ecr.ap-northeast-1.amazonaws.com/lambda-test:v0.0.1 + tags: + app: simple diff --git a/examples/lambda/canary/.pipe.yaml b/examples/lambda/canary/.pipe.yaml index 510d33da02..f7153d37f1 100644 --- a/examples/lambda/canary/.pipe.yaml +++ b/examples/lambda/canary/.pipe.yaml @@ -4,9 +4,6 @@ apiVersion: pipecd.dev/v1beta1 kind: LambdaApp spec: - input: - # Lambda code sourced from the same Git repository. - path: lambdas/helloworld pipeline: stages: # Deploy workloads of the new version. diff --git a/examples/lambda/canary/function.yaml b/examples/lambda/canary/function.yaml new file mode 100644 index 0000000000..0c29d74fd6 --- /dev/null +++ b/examples/lambda/canary/function.yaml @@ -0,0 +1,7 @@ +apiVersion: pipecd.dev/v1beta1 +kind: LambdaFunction +spec: + name: SimpleFunction + image: ecr.ap-northeast-1.amazonaws.com/lambda-test:v0.0.1 + tags: + app: simple diff --git a/examples/lambda/remote-git/.pipe.yaml b/examples/lambda/remote-git/.pipe.yaml deleted file mode 100644 index 962ecf57dc..0000000000 --- a/examples/lambda/remote-git/.pipe.yaml +++ /dev/null @@ -1,10 +0,0 @@ -# Quick sync by rolling out the new version and switching all traffic to it. -# https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html -apiVersion: pipecd.dev/v1beta1 -kind: LambdaApp -spec: - input: - # Lambda code sourced from another Git repository. - git: git@github.com:org/source-repo.git - path: lambdas/helloworld - ref: v1.0.0 diff --git a/examples/lambda/simple/function.yaml b/examples/lambda/simple/function.yaml index 2481c5c17b..0c29d74fd6 100644 --- a/examples/lambda/simple/function.yaml +++ b/examples/lambda/simple/function.yaml @@ -3,7 +3,5 @@ kind: LambdaFunction spec: name: SimpleFunction image: ecr.ap-northeast-1.amazonaws.com/lambda-test:v0.0.1 - runtime: nodejs12.x - handler: app.lambdaHandler tags: app: simple diff --git a/pkg/app/piped/cloudprovider/lambda/function.go b/pkg/app/piped/cloudprovider/lambda/function.go index 5b57afe234..4f5469c1bc 100644 --- a/pkg/app/piped/cloudprovider/lambda/function.go +++ b/pkg/app/piped/cloudprovider/lambda/function.go @@ -51,8 +51,6 @@ type FunctionManifestSpec struct { Name string `json:"name"` ImageURI string `json:"image"` Tags map[string]string `json:"tags,omitempty"` - Runtime string `json:"runtime"` - Handler string `json:"handler"` } func (fmp FunctionManifestSpec) validate() error { @@ -62,12 +60,6 @@ func (fmp FunctionManifestSpec) validate() error { if len(fmp.ImageURI) == 0 { return fmt.Errorf("image uri is missing") } - if len(fmp.Runtime) == 0 { - return fmt.Errorf("runtime is missing") - } - if len(fmp.Handler) == 0 { - return fmt.Errorf("handler is missing") - } return nil } diff --git a/pkg/app/piped/cloudprovider/lambda/function_test.go b/pkg/app/piped/cloudprovider/lambda/function_test.go index b434c3b1a9..8f75127adc 100644 --- a/pkg/app/piped/cloudprovider/lambda/function_test.go +++ b/pkg/app/piped/cloudprovider/lambda/function_test.go @@ -34,8 +34,6 @@ func TestparseFunctionManifest(t *testing.T) { "kind": "LambdaFunction", "spec": { "name": "SimpleFunction", - "runtime": "nodejs12.x", - "handler": "SampleFunction", "image": "ecr.region.amazonaws.com/lambda-simple-function:v0.0.1" } }`, @@ -45,8 +43,6 @@ func TestparseFunctionManifest(t *testing.T) { Spec: FunctionManifestSpec{ Name: "SimpleFunction", ImageURI: "ecr.region.amazonaws.com/lambda-simple-function:v0.0.1", - Runtime: "nodejs12.x", - Handler: "SampleFunction", }, }, wantErr: false,