diff --git a/Plato.Core.sln b/Plato.Core.sln index 84cd85f..621cdb2 100644 --- a/Plato.Core.sln +++ b/Plato.Core.sln @@ -5,6 +5,7 @@ VisualStudioVersion = 15.0.28307.271 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "01. Solution Items", "01. Solution Items", "{83BAC6DB-AF54-4978-A70F-D84761E606E1}" ProjectSection(SolutionItems) = preProject + azure-pipelines.yml = azure-pipelines.yml src\Plato.Core.licenseheader = src\Plato.Core.licenseheader README.md = README.md EndProjectSection diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000..99a873d --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,67 @@ +# 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 + +resources: +- repo: self + +queue: + name: Hosted VS2017 + +#Your build pipeline references an undefined variable named ‘Parameters.RestoreBuildProjects’. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab. See https://go.microsoft.com/fwlink/?linkid=865972 + +#Your build pipeline references an undefined variable named ‘Parameters.RestoreBuildProjects’. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab. See https://go.microsoft.com/fwlink/?linkid=865972 + +#Your build pipeline references the ‘BuildConfiguration’ variable, which you’ve selected to be settable at queue time. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it settable at queue time. See https://go.microsoft.com/fwlink/?linkid=865971 + +#Your build pipeline references an undefined variable named ‘Parameters.TestProjects’. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab. See https://go.microsoft.com/fwlink/?linkid=865972 + +#Your build pipeline references the ‘BuildConfiguration’ variable, which you’ve selected to be settable at queue time. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it settable at queue time. See https://go.microsoft.com/fwlink/?linkid=865971 + +steps: +- task: DotNetCoreCLI@2 + displayName: Restore + inputs: + command: restore + + projects: '$(Parameters.RestoreBuildProjects)' + +- task: DotNetCoreCLI@2 + displayName: Build + inputs: + projects: '$(Parameters.RestoreBuildProjects)' + + arguments: '--configuration $(BuildConfiguration)' + +- task: DotNetCoreCLI@2 + displayName: Test + inputs: + command: test + + projects: '$(Parameters.TestProjects)' + + arguments: '--configuration $(BuildConfiguration)' + +- task: DotNetCoreCLI@2 + displayName: 'dotnet pack' + inputs: + command: pack + + packagesToPack: '**/*.csproj;-/**/Plato.TestHarness.csproj;' + + nobuild: true + + versioningScheme: byBuildNumber + +- task: NuGetCommand@2 + displayName: 'NuGet push' + inputs: + command: push + + publishVstsFeed: '47095bf3-920e-4460-bed7-fa65840f203e' #Internal feed + +- task: PublishBuildArtifacts@1 + displayName: 'Publish Artifact' + inputs: + PathtoPublish: '$(build.artifactstagingdirectory)'