remove build script for csharp example

This commit is contained in:
Maciej Winnicki 2016-12-08 17:57:57 +01:00
parent dc1ba7dcd7
commit 80daa3293d
No known key found for this signature in database
GPG Key ID: 950BD3CA7EDF6008
4 changed files with 13 additions and 17 deletions

View File

@ -16,7 +16,16 @@ Make sure `serverless` is installed. [See installation guide](../../../guide/ins
## 1. Create a service
`serverless create --template aws-csharp --path myService` or `sls create --template aws-csharp --path myService`, where 'myService' is a new folder to be created with template service files. Change directories into this new folder.
## 2. build
## 2. Build using .NET CLI tools and create zip package
```
dotnet restore
dotnet publish -c release
pushd bin/Release/netcoreapp1.0/publish
zip -r ./deploy-package.zip ./*
popd
```
`./build.sh` runs the dotnet restore and package commands then creates the zip file to upload to lambda.

View File

@ -1,14 +0,0 @@
#!/bin/bash
#build handlers
dotnet restore
dotnet publish -c release
#install zip
apt-get -qq update
apt-get -qq -y install zip
#create deployment package
pushd bin/Release/netcoreapp1.0/publish
zip -r ./deploy-package.zip ./*
popd

View File

@ -25,7 +25,8 @@ docker-compose build $template
if [ ! -z "$2" ]
then
echo "Running Build command for $template"
docker-compose run -w /app $template ${@:2}
command=${@:2}
docker-compose run -w /app $template /bin/bash -c "$command"
else
echo "No Language build commands specified, skipping building"
fi

View File

@ -8,7 +8,7 @@ function integration-test {
$DIR/integration-test-template $@
}
integration-test aws-csharp ./build.sh
integration-test aws-csharp 'apt-get -qq update && apt-get -qq -y install zip && dotnet restore && dotnet publish -c release && pushd bin/Release/netcoreapp1.0/publish && zip -r ./deploy-package.zip ./* && popd'
integration-test aws-java-gradle ./gradlew build
integration-test aws-java-maven mvn package
integration-test aws-scala-sbt sbt assembly