mirror of
https://github.com/tribufu/ServerManagers
synced 2026-06-01 09:42:39 +00:00
pipeline file changes
This commit is contained in:
parent
7881199ec1
commit
d2eeb557ca
2 changed files with 70 additions and 15 deletions
|
|
@ -24,7 +24,7 @@ stages:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- task: PowerShell@2
|
- task: PowerShell@2
|
||||||
displayName: Clean-up Agent Folders
|
displayName: Pre Clean-up Agent Folders
|
||||||
env:
|
env:
|
||||||
BUILD_ARTIFACTSTAGINGDIRECTORY: $(Build.ArtifactStagingDirectory)
|
BUILD_ARTIFACTSTAGINGDIRECTORY: $(Build.ArtifactStagingDirectory)
|
||||||
BUILD_BINARIESDIRECTORY: $(Build.BinariesDirectory)
|
BUILD_BINARIESDIRECTORY: $(Build.BinariesDirectory)
|
||||||
|
|
@ -254,7 +254,7 @@ stages:
|
||||||
ArtifactName: '${{parameters.PublishFolder}}'
|
ArtifactName: '${{parameters.PublishFolder}}'
|
||||||
|
|
||||||
- task: PowerShell@2
|
- task: PowerShell@2
|
||||||
displayName: Clean-up Agent Folders
|
displayName: Post Clean-up Agent Folders
|
||||||
condition: always()
|
condition: always()
|
||||||
env:
|
env:
|
||||||
BUILD_ARTIFACTSTAGINGDIRECTORY: $(Build.ArtifactStagingDirectory)
|
BUILD_ARTIFACTSTAGINGDIRECTORY: $(Build.ArtifactStagingDirectory)
|
||||||
|
|
|
||||||
|
|
@ -54,18 +54,45 @@ stages:
|
||||||
runOnce:
|
runOnce:
|
||||||
deploy:
|
deploy:
|
||||||
steps:
|
steps:
|
||||||
|
- task: PowerShell@2
|
||||||
|
displayName: Pre Clean-up Agent Folders
|
||||||
|
env:
|
||||||
|
BUILD_ARTIFACTSTAGINGDIRECTORY: $(Build.ArtifactStagingDirectory)
|
||||||
|
BUILD_BINARIESDIRECTORY: $(Build.BinariesDirectory)
|
||||||
|
BUILD_SOURCESDIRECTORY: $(Build.SourcesDirectory)
|
||||||
|
BUILD_PUBLISHDIRECTORY: "$(Build.BuildDirectory)/${{parameters.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
|
||||||
|
|
||||||
- checkout: GitHubRepo
|
- checkout: GitHubRepo
|
||||||
|
|
||||||
- task: PowerShell@2
|
- task: PowerShell@2
|
||||||
displayName: Output Environment Variables
|
displayName: Output Environment Variables
|
||||||
condition: contains(variables['system.debug'], 'true')
|
#condition: contains(variables['system.debug'], 'true')
|
||||||
inputs:
|
inputs:
|
||||||
targetType: inline
|
targetType: inline
|
||||||
script: '(gci env:*).GetEnumerator() | Sort-Object Name | Out-String'
|
script: '(gci env:*).GetEnumerator() | Sort-Object Name | Out-String'
|
||||||
pwsh: true
|
pwsh: true
|
||||||
|
|
||||||
- task: PowerShell@2
|
- task: PowerShell@2
|
||||||
displayName: Clean-up Agent Folders
|
displayName: Post Clean-up Agent Folders
|
||||||
condition: always()
|
condition: always()
|
||||||
env:
|
env:
|
||||||
BUILD_ARTIFACTSTAGINGDIRECTORY: $(Build.ArtifactStagingDirectory)
|
BUILD_ARTIFACTSTAGINGDIRECTORY: $(Build.ArtifactStagingDirectory)
|
||||||
|
|
@ -108,18 +135,46 @@ stages:
|
||||||
runOnce:
|
runOnce:
|
||||||
deploy:
|
deploy:
|
||||||
steps:
|
steps:
|
||||||
- checkout: GitHubRepo
|
|
||||||
|
|
||||||
- task: PowerShell@2
|
- task: PowerShell@2
|
||||||
displayName: Output Environment Variables
|
displayName: Pre Clean-up Agent Folders
|
||||||
condition: contains(variables['system.debug'], 'true')
|
condition: always()
|
||||||
inputs:
|
env:
|
||||||
targetType: inline
|
BUILD_ARTIFACTSTAGINGDIRECTORY: $(Build.ArtifactStagingDirectory)
|
||||||
script: '(gci env:*).GetEnumerator() | Sort-Object Name | Out-String'
|
BUILD_BINARIESDIRECTORY: $(Build.BinariesDirectory)
|
||||||
pwsh: true
|
BUILD_SOURCESDIRECTORY: $(Build.SourcesDirectory)
|
||||||
|
BUILD_PUBLISHDIRECTORY: "$(Build.BuildDirectory)/$(PublishFolder)"
|
||||||
- task: PowerShell@2
|
inputs:
|
||||||
displayName: Clean-up Agent Folders
|
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
|
||||||
|
|
||||||
|
- 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: Post Clean-up Agent Folders
|
||||||
condition: always()
|
condition: always()
|
||||||
env:
|
env:
|
||||||
BUILD_ARTIFACTSTAGINGDIRECTORY: $(Build.ArtifactStagingDirectory)
|
BUILD_ARTIFACTSTAGINGDIRECTORY: $(Build.ArtifactStagingDirectory)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue