Skip to content

Commit

Permalink
Add azure-pipelines.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
tmarkovski committed Jul 29, 2019
1 parent cf65711 commit c791d4f
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 30 deletions.
30 changes: 0 additions & 30 deletions ServiceClients.sln

This file was deleted.

58 changes: 58 additions & 0 deletions azure-pipelines.yml
@@ -0,0 +1,58 @@
# ASP.NET
# Build and test ASP.NET projects.
# Add steps that publish symbols, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/apps/aspnet/build-aspnet-4

trigger:
branches:
include:
- master
paths:
include:
- swagger.json
pr: none

pool:
vmImage: 'windows-latest'

variables:
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'

steps:

- task: UseDotNet@2
inputs:
packageType: 'sdk'
version: '2.2.301'

- task: Npm@1
inputs:
command: 'custom'
customCommand: 'install -g autorest'

- task: CmdLine@2
inputs:
script: 'autorest --input-file=swagger.json --csharp --output-folder=csharp/Generated --namespace=Streetcred.ServiceClients --add-credentials --override-client-name=AgencyServiceClient'

- task: NuGetToolInstaller@1

- task: DotNetCoreCLI@2
inputs:
command: 'custom'
projects: 'csharp/**/*.csproj'
custom: 'pack'
arguments: '/p:PackageVersion=$(packageVersion) /p:Configuration=$(buildConfiguration) --output $(Build.ArtifactStagingDirectory)/stable'

- task: DotNetCoreCLI@2
inputs:
command: 'custom'
projects: 'csharp/**/*.csproj'
custom: 'pack'
arguments: '/p:PackageVersion=$(packageVersion)-$(Build.BuildNumber) /p:Configuration=$(buildConfiguration) --output $(Build.ArtifactStagingDirectory)/ci'

- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'packages'
publishLocation: 'Container'
5 changes: 5 additions & 0 deletions global.json
@@ -0,0 +1,5 @@
{
"sdk": {
"version": "2.2.301"
}
}

0 comments on commit c791d4f

Please sign in to comment.