2019-10-15 21:38:24 +03:00
|
|
|
# ASP.NET Core
|
|
|
|
# Build and test ASP.NET Core projects targeting .NET Core.
|
|
|
|
# Add steps that run tests, create a NuGet package, deploy, and more:
|
|
|
|
# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core
|
2019-10-15 20:53:51 +03:00
|
|
|
pool:
|
|
|
|
vmImage: 'ubuntu-latest'
|
|
|
|
|
|
|
|
steps:
|
2020-01-13 22:09:15 +03:00
|
|
|
# ASP.NET Core
|
|
|
|
- task: UseDotNet@2
|
|
|
|
displayName: "Install .NET Core 3.1.x"
|
|
|
|
inputs:
|
|
|
|
packageType: 'sdk'
|
|
|
|
version: '3.1.x'
|
|
|
|
|
2020-01-13 21:52:40 +03:00
|
|
|
- script: dotnet publish './src/Server/Steeltoe.Server.csproj' --output './publish' --configuration Release --framework netcoreapp3.1 --runtime linux-x64 --self-contained
|
2020-01-13 22:09:15 +03:00
|
|
|
displayName: 'dotnet publish project'
|
2019-10-15 20:53:51 +03:00
|
|
|
|
2019-10-15 21:38:24 +03:00
|
|
|
- task: CopyFiles@2
|
2020-01-13 22:09:15 +03:00
|
|
|
displayName: "Copy publish result to staging"
|
2019-10-15 21:38:24 +03:00
|
|
|
inputs:
|
|
|
|
SourceFolder: './publish'
|
|
|
|
Contents: '**'
|
|
|
|
TargetFolder: '$(Build.ArtifactStagingDirectory)'
|
|
|
|
CleanTargetFolder: true
|
|
|
|
|
2019-10-24 21:33:15 +03:00
|
|
|
- script: cp "manifest-staging.yml" "$(Build.ArtifactStagingDirectory)/manifest-staging.yml"
|
2020-01-13 22:09:15 +03:00
|
|
|
displayName: "Copy staging manifest"
|
|
|
|
|
2019-10-24 21:33:15 +03:00
|
|
|
- script: cp "manifest-prod.yml" "$(Build.ArtifactStagingDirectory)/manifest-prod.yml"
|
2020-01-13 22:09:15 +03:00
|
|
|
displayName: "Copy prod manifest"
|
2019-10-24 21:33:15 +03:00
|
|
|
|
2019-10-15 21:38:24 +03:00
|
|
|
- task: PublishBuildArtifacts@1
|
2020-01-13 22:09:15 +03:00
|
|
|
displayName: "Upload Artifacts"
|
2019-10-15 21:38:24 +03:00
|
|
|
inputs:
|
|
|
|
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
|
|
|
|
ArtifactName: 'drop'
|
|
|
|
publishLocation: 'Container'
|