Configured Azure Pipelines CI/CD
This commit is contained in:
+19
-10
@@ -1,17 +1,26 @@
|
|||||||
# ASP.NET Core
|
# 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:
|
trigger:
|
||||||
- master
|
- master
|
||||||
|
|
||||||
pool:
|
pool:
|
||||||
vmImage: 'ubuntu-latest'
|
vmImage: 'windows-latest'
|
||||||
|
|
||||||
variables:
|
|
||||||
buildConfiguration: 'Release'
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- script: dotnet build --configuration $(buildConfiguration)
|
- task: DownloadSecureFile@1
|
||||||
displayName: 'dotnet build $(buildConfiguration)'
|
displayName: 'Downloading Web Deploy config'
|
||||||
|
name: wdConfig
|
||||||
|
inputs:
|
||||||
|
secureFile: "WebDeploy.pubxml"
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
echo Copying $(wdConfig.secureFilePath)" file to $(Build.Repository.LocalPath)\MyWebsite\MyWebsite\Properties\PublishProfiles
|
||||||
|
mkdir $(Build.Repository.LocalPath)\MyWebsite\MyWebsite\Properties\PublishProfiles
|
||||||
|
copy $(wdConfig.secureFilePath) $(Build.Repository.LocalPath)\MyWebsite\MyWebsite\Properties\PublishProfiles\WebDeploy.pubxml
|
||||||
|
displayName: "Moving config to directory"
|
||||||
|
|
||||||
|
- task: DotNetCoreCLI@2
|
||||||
|
displayName: 'Deployment via Web Deploy'
|
||||||
|
inputs:
|
||||||
|
command: 'custom'
|
||||||
|
custom: 'msbuild'
|
||||||
|
arguments: '$(Build.Repository.LocalPath)\MyWebsite\MyWebsite.sln -restore:true /p:DeployOnBuild=true /p:PublishProfile=WebDeploy /p:Configuration=Release /p:Platform="Any CPU" /p:Password=$(webDeployPassword)'
|
||||||
Reference in New Issue
Block a user