From 5c88110f428ab1e4f6d88d6a24c30605355efcf5 Mon Sep 17 00:00:00 2001 From: Kaushalsingh4 <86924652+Kaushalsingh4@users.noreply.github.com> Date: Tue, 19 Jul 2022 21:06:51 +0530 Subject: [PATCH 1/2] Set up CI with Azure Pipelines [skip ci] --- azure-pipelines.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000000..27a798ad83 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,19 @@ +# 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 + +trigger: +- master + +pool: + vmImage: ubuntu-latest + +steps: +- script: echo Hello, world! + displayName: 'Run a one-line script' + +- script: | + echo Add other tasks to build, test, and deploy your project. + echo See https://aka.ms/yaml + displayName: 'Run a multi-line script' From 7bba20e6c39fd94e151eb1336d422fa02a29e91d Mon Sep 17 00:00:00 2001 From: Kaushalsingh4 <86924652+Kaushalsingh4@users.noreply.github.com> Date: Tue, 19 Jul 2022 21:10:05 +0530 Subject: [PATCH 2/2] Update azure-pipelines.yml --- azure-pipelines.yml | 44 +++++++++++++++++++++++++++++++++----------- 1 file changed, 33 insertions(+), 11 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 27a798ad83..4b46983843 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,19 +1,41 @@ -# 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 +# ASP.NET Core (.NET Framework) +# Build and test ASP.NET Core projects targeting the full .NET Framework. +# Add steps that publish symbols, save build artifacts, and more: +# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core trigger: - master pool: - vmImage: ubuntu-latest + vmImage: 'windows-latest' + +variables: + solution: '**/*.sln' + buildPlatform: 'Any CPU' + buildConfiguration: 'Release' steps: -- script: echo Hello, world! - displayName: 'Run a one-line script' +- task: NuGetToolInstaller@1 + +- task: NuGetCommand@2 + inputs: + restoreSolution: '$(solution)' + +- task: VSBuild@1 + inputs: + solution: '$(solution)' + msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:DesktopBuildPackageLocation="$(build.artifactStagingDirectory)\WebApp.zip" /p:DeployIisAppPath="Default Web Site"' + platform: '$(buildPlatform)' + configuration: '$(buildConfiguration)' + +- task: CopyFiles@2 + inputs: + SourceFolder: 'AzureResourceGroup1' + Contents: 'WenSiteCDN*.json' + TargetFolder: '$(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 + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)' + ArtifactName: 'drop' + publishLocation: 'Container'