Created
January 9, 2021 10:04
-
-
Save vickyRathee/06df1416d8bc5f2543c56e4d3b912e96 to your computer and use it in GitHub Desktop.
AWS CodeBuild buildspec.yml to build and test dot net 5 based application runtime.
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
# Based on https://github.com/PrakashTrove/AWS-CodeBuild-NetCore/blob/master/buildspec.yml | |
# AWS CodeBuild spec to build an Elastic Beanstalk artifact for AWS CodePipeline to deploy | |
version: 0.2 | |
phases: | |
install: | |
runtime-versions: | |
dotnet: 5.0 | |
#dotnet: latest - Latest resolve to 3.1, check this issue https://github.com/aws/aws-codebuild-docker-images/issues/414 | |
pre_build: | |
commands: | |
- echo Restore started on `date` | |
- dotnet restore test-api/test-api.csproj | |
build: | |
commands: | |
- echo Build started on `date` | |
- dotnet build test-api/test-api.csproj | |
- echo Test started on `date` | |
- dotnet test test-api/test-api.csproj | |
post_build: | |
commands: | |
- echo Publish started on `date` | |
# https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/dotnet-linux-platform-bundle-app.html | |
- dotnet publish -c Release -r linux-x64 -o ./ test-api/test-api.csproj | |
artifacts: | |
files: | |
- ./**/* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes you can publish a release using the Ubuntu image.