Last active
July 7, 2020 18:18
-
-
Save rfpedrosa/ec1e8274e50c67ecbc615db26e3b91fb to your computer and use it in GitHub Desktop.
AWS CodePipeline - buildspec.yml final file
This file contains hidden or 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: latest | |
| pre_build: | |
| commands: | |
| - echo Restore started on `date` | |
| - dotnet restore Api.csproj | |
| build: | |
| commands: | |
| - echo Build started on `date` | |
| - dotnet build 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 --self-contained false Api.csproj | |
| artifacts: | |
| files: | |
| - '**/*' | |
| base-directory: ./bin/Release/netcoreapp3.1/linux-x64/publish/ | |
| discard-paths: no |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment