azure-pipelines-development.yml edited online with Bitbucket
This commit is contained in:
@@ -1,10 +1,13 @@
|
|||||||
# ASP.NET
|
# ASP.NET Core
|
||||||
# Build and test ASP.NET projects.
|
# Build and test ASP.NET Core projects targeting .NET Core.
|
||||||
# Add steps that publish symbols, save build artifacts, deploy, and more:
|
# Add steps that run tests, create a NuGet package, deploy, and more:
|
||||||
# https://docs.microsoft.com/azure/devops/pipelines/apps/aspnet/build-aspnet-4
|
# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
- main
|
- development
|
||||||
|
|
||||||
|
pr:
|
||||||
|
- none
|
||||||
|
|
||||||
pool:
|
pool:
|
||||||
vmImage: 'windows-latest'
|
vmImage: 'windows-latest'
|
||||||
@@ -13,22 +16,49 @@ variables:
|
|||||||
solution: '**/*.sln'
|
solution: '**/*.sln'
|
||||||
buildPlatform: 'Any CPU'
|
buildPlatform: 'Any CPU'
|
||||||
buildConfiguration: 'Release'
|
buildConfiguration: 'Release'
|
||||||
|
projectName: 'Gameboard.ShogiUI.Sockets'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- task: NuGetToolInstaller@1
|
- task: NuGetToolInstaller@1
|
||||||
|
|
||||||
- task: NuGetCommand@2
|
- task: NuGetCommand@2
|
||||||
inputs:
|
inputs:
|
||||||
restoreSolution: '$(solution)'
|
command: 'restore'
|
||||||
|
restoreSolution: '**/*.sln'
|
||||||
|
feedsToUse: 'config'
|
||||||
|
|
||||||
- task: VSBuild@1
|
- task: DotNetCoreCLI@2
|
||||||
|
displayName: Publish
|
||||||
|
env :
|
||||||
|
DOTNET_CLI_TELEMETRY_OPTOUT: 1
|
||||||
inputs:
|
inputs:
|
||||||
solution: '$(solution)'
|
command: 'publish'
|
||||||
msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactStagingDirectory)"'
|
publishWebProjects: false
|
||||||
platform: '$(buildPlatform)'
|
projects: '**/*.csproj '
|
||||||
configuration: '$(buildConfiguration)'
|
zipAfterPublish: false
|
||||||
|
|
||||||
- task: VSTest@2
|
- task: FileTransform@1
|
||||||
inputs:
|
inputs:
|
||||||
platform: '$(buildPlatform)'
|
folderPath: '$(System.DefaultWorkingDirectory)'
|
||||||
configuration: '$(buildConfiguration)'
|
fileType: 'json'
|
||||||
|
targetFiles: '**/appsettings.json'
|
||||||
|
|
||||||
|
- task: CopyFilesOverSSH@0
|
||||||
|
displayName: SSH Copy to 1UB
|
||||||
|
inputs:
|
||||||
|
sshEndpoint: 'LucaServer'
|
||||||
|
sourceFolder: '$(System.DefaultWorkingDirectory)\$(projectName)\bin\Debug\net5.0\publish'
|
||||||
|
targetFolder: '/var/www/api/development/$(projectName)'
|
||||||
|
contents: '**'
|
||||||
|
failOnEmptySource: true
|
||||||
|
cleanTargetFolder: true
|
||||||
|
|
||||||
|
- task: SSH@0
|
||||||
|
displayName: Restart Kestrel
|
||||||
|
inputs:
|
||||||
|
sshEndpoint: 'LucaServer'
|
||||||
|
runOptions: 'commands'
|
||||||
|
commands: 'sudo systemctl restart kestrel-dev.gameboard.shogiui.sockets.service'
|
||||||
|
readyTimeout: '20000'
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user