Last active
March 28, 2020 18:34
-
-
Save eddyv73/fc146093370d2abcf24915f606189b98 to your computer and use it in GitHub Desktop.
Azure DevOps Pipelines yml file for two Projects net core 3.1
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
trigger: | |
- main | |
pool: | |
vmImage: 'ubuntu-latest' | |
variables: | |
buildConfiguration: 'Release' | |
steps: | |
- task: UseDotNet@2 | |
displayName: "Restore Back" | |
inputs: | |
version: '3.1.x' | |
packageType: sdk | |
- script: dotnet restore PROJECTNAMEBACK.csproj | |
displayName: 'dotnet Restore back' | |
- task: UseDotNet@2 | |
displayName: "Restore Front" | |
inputs: | |
version: '3.1.x' | |
packageType: sdk | |
- script: dotnet restore PROJECTNAMEFRONT.csproj | |
displayName: 'dotnet Restore FRONT' | |
- task: UseDotNet@2 | |
displayName: "Build Back" | |
inputs: | |
version: '3.1.x' | |
packageType: sdk | |
- script: dotnet build --configuration $(buildConfiguration) PROJECTNAMEBACK.csproj | |
displayName: 'dotnet build $(buildConfiguration) PROJECTNAMEBACK.csproj' | |
- task: UseDotNet@2 | |
displayName: "Build Front" | |
inputs: | |
version: '3.1.x' | |
packageType: sdk | |
- script: dotnet build --configuration $(buildConfiguration) PROJECTNAMEFRONT.csproj | |
displayName: 'dotnet build $(buildConfiguration) PROJECTNAMEFRONT.csproj' | |
- task: DotNetCoreCLI@2 | |
displayName: "Publish Artifacts" | |
inputs: | |
command: 'publish' | |
publishWebProjects: true | |
arguments: '-r linux-x64 --configuration $(BuildConfiguration) --output $(Build.ArtifactStagingDirectory)' | |
zipAfterPublish: true | |
- task: PublishBuildArtifacts@1 | |
displayName: "ArtefactName" | |
inputs: | |
pathtoPublish: '$(Build.ArtifactStagingDirectory)' | |
artifactName: 'ArtefactName' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment