mirror of
https://github.com/tribufu/ServerManagers
synced 2026-06-01 09:42:39 +00:00
Update azure-pipelines.yml for Azure Pipelines
This commit is contained in:
parent
2677ffc63b
commit
7881199ec1
1 changed files with 72 additions and 0 deletions
|
|
@ -56,6 +56,42 @@ stages:
|
||||||
steps:
|
steps:
|
||||||
- checkout: GitHubRepo
|
- checkout: GitHubRepo
|
||||||
|
|
||||||
|
- task: PowerShell@2
|
||||||
|
displayName: Output Environment Variables
|
||||||
|
condition: contains(variables['system.debug'], 'true')
|
||||||
|
inputs:
|
||||||
|
targetType: inline
|
||||||
|
script: '(gci env:*).GetEnumerator() | Sort-Object Name | Out-String'
|
||||||
|
pwsh: true
|
||||||
|
|
||||||
|
- task: PowerShell@2
|
||||||
|
displayName: Clean-up Agent Folders
|
||||||
|
condition: always()
|
||||||
|
env:
|
||||||
|
BUILD_ARTIFACTSTAGINGDIRECTORY: $(Build.ArtifactStagingDirectory)
|
||||||
|
BUILD_BINARIESDIRECTORY: $(Build.BinariesDirectory)
|
||||||
|
BUILD_SOURCESDIRECTORY: $(Build.SourcesDirectory)
|
||||||
|
BUILD_PUBLISHDIRECTORY: "$(Build.BuildDirectory)/$(PublishFolder)"
|
||||||
|
inputs:
|
||||||
|
targetType: inline
|
||||||
|
script: |
|
||||||
|
if (Test-Path $env:BUILD_ARTIFACTSTAGINGDIRECTORY) {
|
||||||
|
Remove-Item -Path "$env:BUILD_ARTIFACTSTAGINGDIRECTORY\*" -Filter '*.*' -Recurse -Force -ErrorAction SilentlyContinue
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Test-Path $env:BUILD_BINARIESDIRECTORY) {
|
||||||
|
Remove-Item -Path "$env:BUILD_BINARIESDIRECTORY\*" -Filter '*.*' -Recurse -Force -ErrorAction SilentlyContinue
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Test-Path $env:BUILD_SOURCESDIRECTORY) {
|
||||||
|
Remove-Item -Path "$env:BUILD_SOURCESDIRECTORY\*" -Filter '*.*' -Recurse -Force -ErrorAction SilentlyContinue
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Test-Path $env:BUILD_PUBLISHDIRECTORY) {
|
||||||
|
Remove-Item -Path "$env:BUILD_PUBLISHDIRECTORY" -Filter '*.*' -Recurse -Force -ErrorAction SilentlyContinue
|
||||||
|
}
|
||||||
|
pwsh: true
|
||||||
|
|
||||||
- stage: deployRelease
|
- stage: deployRelease
|
||||||
displayName: Production
|
displayName: Production
|
||||||
lockBehavior: runLatest
|
lockBehavior: runLatest
|
||||||
|
|
@ -73,3 +109,39 @@ stages:
|
||||||
deploy:
|
deploy:
|
||||||
steps:
|
steps:
|
||||||
- checkout: GitHubRepo
|
- checkout: GitHubRepo
|
||||||
|
|
||||||
|
- task: PowerShell@2
|
||||||
|
displayName: Output Environment Variables
|
||||||
|
condition: contains(variables['system.debug'], 'true')
|
||||||
|
inputs:
|
||||||
|
targetType: inline
|
||||||
|
script: '(gci env:*).GetEnumerator() | Sort-Object Name | Out-String'
|
||||||
|
pwsh: true
|
||||||
|
|
||||||
|
- task: PowerShell@2
|
||||||
|
displayName: Clean-up Agent Folders
|
||||||
|
condition: always()
|
||||||
|
env:
|
||||||
|
BUILD_ARTIFACTSTAGINGDIRECTORY: $(Build.ArtifactStagingDirectory)
|
||||||
|
BUILD_BINARIESDIRECTORY: $(Build.BinariesDirectory)
|
||||||
|
BUILD_SOURCESDIRECTORY: $(Build.SourcesDirectory)
|
||||||
|
BUILD_PUBLISHDIRECTORY: "$(Build.BuildDirectory)/$(PublishFolder)"
|
||||||
|
inputs:
|
||||||
|
targetType: inline
|
||||||
|
script: |
|
||||||
|
if (Test-Path $env:BUILD_ARTIFACTSTAGINGDIRECTORY) {
|
||||||
|
Remove-Item -Path "$env:BUILD_ARTIFACTSTAGINGDIRECTORY\*" -Filter '*.*' -Recurse -Force -ErrorAction SilentlyContinue
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Test-Path $env:BUILD_BINARIESDIRECTORY) {
|
||||||
|
Remove-Item -Path "$env:BUILD_BINARIESDIRECTORY\*" -Filter '*.*' -Recurse -Force -ErrorAction SilentlyContinue
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Test-Path $env:BUILD_SOURCESDIRECTORY) {
|
||||||
|
Remove-Item -Path "$env:BUILD_SOURCESDIRECTORY\*" -Filter '*.*' -Recurse -Force -ErrorAction SilentlyContinue
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Test-Path $env:BUILD_PUBLISHDIRECTORY) {
|
||||||
|
Remove-Item -Path "$env:BUILD_PUBLISHDIRECTORY" -Filter '*.*' -Recurse -Force -ErrorAction SilentlyContinue
|
||||||
|
}
|
||||||
|
pwsh: true
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue