mirror of
https://github.com/tribufu/ServerManagers
synced 2026-06-01 09:42:39 +00:00
pipeline file cleanup
This commit is contained in:
parent
80738e7416
commit
227de2eb39
2 changed files with 42 additions and 169 deletions
|
|
@ -14,10 +14,10 @@ pool:
|
|||
|
||||
resources:
|
||||
repositories:
|
||||
- repository: GitHubRepo
|
||||
type: github
|
||||
endpoint: Bletch1971
|
||||
name: Bletch1971/ServerManagers
|
||||
- repository: MasterRepo
|
||||
type: $(Build.Repository.Provider)
|
||||
endpoint: $(RepositoryEndPoint)
|
||||
name: $(Build.Repository.Name)
|
||||
ref: refs/heads/master
|
||||
|
||||
variables:
|
||||
|
|
@ -54,27 +54,13 @@ stages:
|
|||
runOnce:
|
||||
deploy:
|
||||
steps:
|
||||
- task: PowerShell@2
|
||||
displayName: Pre Clean-up Agent Folders
|
||||
env:
|
||||
BUILD_ARTIFACTSTAGINGDIRECTORY: $(Build.ArtifactStagingDirectory)
|
||||
BUILD_BINARIESDIRECTORY: $(Build.BinariesDirectory)
|
||||
BUILD_SOURCESDIRECTORY: $(Build.SourcesDirectory)
|
||||
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
|
||||
}
|
||||
pwsh: true
|
||||
- template: azure-pipelines-clean-agent.yml@self
|
||||
parameters:
|
||||
CleanArtifactsFolder: true
|
||||
CleanBinariesFolder: true
|
||||
CleanSourcesFolder: true
|
||||
CleanPublishFolder: false
|
||||
PublishFolder: ${{parameters.PublishFolder}}
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Output Environment Variables
|
||||
|
|
@ -84,35 +70,15 @@ stages:
|
|||
script: '(gci env:*).GetEnumerator() | Sort-Object Name | Out-String'
|
||||
pwsh: true
|
||||
|
||||
- checkout: GitHubRepo
|
||||
- checkout: MasterRepo
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Post Clean-up Agent Folders
|
||||
condition: always()
|
||||
env:
|
||||
BUILD_ARTIFACTSTAGINGDIRECTORY: $(Build.ArtifactStagingDirectory)
|
||||
BUILD_BINARIESDIRECTORY: $(Build.BinariesDirectory)
|
||||
BUILD_SOURCESDIRECTORY: $(Build.SourcesDirectory)
|
||||
BUILD_PUBLISHDIRECTORY: "$(Agent.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
|
||||
- template: azure-pipelines-clean-agent.yml@self
|
||||
parameters:
|
||||
CleanArtifactsFolder: true
|
||||
CleanBinariesFolder: true
|
||||
CleanSourcesFolder: true
|
||||
CleanPublishFolder: true
|
||||
PublishFolder: ${{parameters.PublishFolder}}
|
||||
|
||||
- stage: deployRelease
|
||||
displayName: Production
|
||||
|
|
@ -130,28 +96,13 @@ stages:
|
|||
runOnce:
|
||||
deploy:
|
||||
steps:
|
||||
- task: PowerShell@2
|
||||
displayName: Pre Clean-up Agent Folders
|
||||
condition: always()
|
||||
env:
|
||||
BUILD_ARTIFACTSTAGINGDIRECTORY: $(Build.ArtifactStagingDirectory)
|
||||
BUILD_BINARIESDIRECTORY: $(Build.BinariesDirectory)
|
||||
BUILD_SOURCESDIRECTORY: $(Build.SourcesDirectory)
|
||||
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
|
||||
}
|
||||
pwsh: true
|
||||
- template: azure-pipelines-clean-agent.yml@self
|
||||
parameters:
|
||||
CleanArtifactsFolder: true
|
||||
CleanBinariesFolder: true
|
||||
CleanSourcesFolder: true
|
||||
CleanPublishFolder: false
|
||||
PublishFolder: ${{parameters.PublishFolder}}
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Output Environment Variables
|
||||
|
|
@ -161,32 +112,12 @@ stages:
|
|||
script: '(gci env:*).GetEnumerator() | Sort-Object Name | Out-String'
|
||||
pwsh: true
|
||||
|
||||
- checkout: GitHubRepo
|
||||
- checkout: MasterRepo
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Post Clean-up Agent Folders
|
||||
condition: always()
|
||||
env:
|
||||
BUILD_ARTIFACTSTAGINGDIRECTORY: $(Build.ArtifactStagingDirectory)
|
||||
BUILD_BINARIESDIRECTORY: $(Build.BinariesDirectory)
|
||||
BUILD_SOURCESDIRECTORY: $(Build.SourcesDirectory)
|
||||
BUILD_PUBLISHDIRECTORY: "$(Agent.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
|
||||
- template: azure-pipelines-clean-agent.yml@self
|
||||
parameters:
|
||||
CleanArtifactsFolder: true
|
||||
CleanBinariesFolder: true
|
||||
CleanSourcesFolder: true
|
||||
CleanPublishFolder: true
|
||||
PublishFolder: ${{parameters.PublishFolder}}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue