You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
1.7 KiB

  1. parameters:
  2. ProjectName: ''
  3. jobs:
  4. - job: Restore_Build_Publish
  5. pool:
  6. vmImage: 'ubuntu-16.04'
  7. steps:
  8. - task: UseDotNet@2
  9. displayName: 'Use .NET Core 3.1 SDK'
  10. inputs:
  11. packageType: sdk
  12. version: 3.1.100
  13. installationPath: $(Agent.ToolsDirectory)/dotnet
  14. - task: DotNetCoreCLI@2
  15. displayName: 'dotnet restore'
  16. inputs:
  17. command: restore
  18. projects: '**/$(ProjectName).csproj'
  19. feedsToUse: config
  20. nugetConfigPath: src/NuGet.config
  21. - task: DotNetCoreCLI@2
  22. displayName: 'dotnet build'
  23. inputs:
  24. projects: '**/$(ProjectName).csproj'
  25. arguments: '--configuration Release'
  26. feedsToUse: config
  27. nugetConfigPath: src/NuGet.config
  28. - task: DotNetCoreCLI@2
  29. displayName: 'dotnet publish'
  30. inputs:
  31. command: publish
  32. publishWebProjects: false
  33. projects: '**/$(ProjectName).csproj'
  34. arguments: '--configuration Release --output $(Build.ArtifactStagingDirectory) /p:MicrosoftNETPlatformLibrary=Microsoft.NETCore.App'
  35. zipAfterPublish: false
  36. modifyOutputPath: true
  37. feedsToUse: config
  38. nugetConfigPath: src/NuGet.config
  39. - task: CopyFiles@2
  40. displayName: 'Copy OpenShift App Build Template'
  41. inputs:
  42. sourceFolder: '$(Build.SourcesDirectory)/build/aro'
  43. contents: 'openshift-app-build-template.yml'
  44. targetFolder: $(Build.ArtifactStagingDirectory)
  45. - task: CopyFiles@2
  46. displayName: 'Copy OpenShift Web App Deploy Template'
  47. inputs:
  48. sourceFolder: '$(Build.SourcesDirectory)/deploy/aro/openshift-templates'
  49. contents: 'openshift-webapp-deploy-template.yml'
  50. targetFolder: $(Build.ArtifactStagingDirectory)
  51. - task: PublishBuildArtifacts@1
  52. displayName: 'Publish Artifact: drop'