diff --git a/azure-pipelines-1.yml b/azure-pipelines-1.yml index e11ae40..e4e2b64 100644 --- a/azure-pipelines-1.yml +++ b/azure-pipelines-1.yml @@ -1,19 +1,47 @@ -# Starter pipeline -# Start with a minimal pipeline that you can customize to build and deploy your code. -# Add steps that build, run tests, deploy, and more: -# https://aka.ms/yaml +#Demo Project Application trigger: - Master - pool: - vmImage: ubuntu-latest + name: Default +variables: + buildConfiguration: 'Debug' steps: -- script: echo Hello, world! - displayName: 'Run a one-line script' +- task: DotNetCoreInstaller@1 + inputs: + packageType: 'sdk' + version: '7.0.102' + +- task: DotNetCoreCLI@2 + inputs: + command: 'test' + projects: '**/*Tests/*.csproj' + arguments: '--configuration $(buildConfiguration)' +- task: DotNetCoreCLI@2 + displayName: dotnet restore + inputs: + command: 'restore' + feedsToUse: 'select' + feedRestore: 'projectName/feedName' + projects: '**/*.csproj' + includeNuGetOrg: true +- task: DotNetCoreCLI@2 + displayName: Build + inputs: + command: build + projects: '**/*.csproj' + arguments: '--configuration $(buildConfiguration)' + +- task: DotNetCoreCLI@2 + displayName: Publish + inputs: + command: publish + publishWebProjects: false + projects: '**/*.csproj' + arguments: '--configuration $(buildConfiguration) --output $(build.artifactstagingdirectory)' -- script: | - echo Add other tasks to build, test, and deploy your project. - echo See https://aka.ms/yaml - displayName: 'Run a multi-line script' +- task: PublishBuildArtifacts@1 + displayName: 'Publish Artifact' + inputs: + PathtoPublish: '$(build.artifactstagingdirectory)'