From 402e45f559c0b0725746848ea1df030f6e906792 Mon Sep 17 00:00:00 2001 From: Callon Campbell Date: Sun, 27 Jan 2019 10:07:45 -0500 Subject: [PATCH 1/3] Set up CI with Azure Pipelines --- azure-pipelines.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000..d6f40c5 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,17 @@ +# 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 + +trigger: +- master + +pool: + vmImage: 'Ubuntu-16.04' + +variables: + buildConfiguration: 'Release' + +steps: +- script: dotnet build --configuration $(buildConfiguration) + displayName: 'dotnet build $(buildConfiguration)' From 7268bd9581c206894ed5323513de52b2ed8d7db6 Mon Sep 17 00:00:00 2001 From: Callon Campbell Date: Sun, 27 Jan 2019 22:28:23 -0500 Subject: [PATCH 2/3] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 66 +++++++++++++++++++++++++++++++++++++++------ 1 file changed, 58 insertions(+), 8 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index d6f40c5..99a873d 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -3,15 +3,65 @@ # Add steps that run tests, create a NuGet package, deploy, and more: # https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core -trigger: -- master +resources: +- repo: self -pool: - vmImage: 'Ubuntu-16.04' +queue: + name: Hosted VS2017 -variables: - buildConfiguration: 'Release' +#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: -- script: dotnet build --configuration $(buildConfiguration) - displayName: 'dotnet build $(buildConfiguration)' +- 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)' From e3d04b3c813d093bea4fe0a35e51fbaa5c44ea59 Mon Sep 17 00:00:00 2001 From: Callon Campbell Date: Sun, 27 Jan 2019 22:31:06 -0500 Subject: [PATCH 3/3] Added YAML file to the solution --- Plato.Core.sln | 1 + 1 file changed, 1 insertion(+) 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