Configured Azure Pipelines CI/CD
This commit is contained in:
+19
-10
@@ -1,17 +1,26 @@
|
||||
# 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-latest'
|
||||
|
||||
variables:
|
||||
buildConfiguration: 'Release'
|
||||
vmImage: 'windows-latest'
|
||||
|
||||
steps:
|
||||
- script: dotnet build --configuration $(buildConfiguration)
|
||||
displayName: 'dotnet build $(buildConfiguration)'
|
||||
- task: DownloadSecureFile@1
|
||||
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