diff options
| author | Billy O'Neal <bion@microsoft.com> | 2020-05-06 10:31:14 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-06 10:31:14 -0700 |
| commit | 66d4f9d411954b4d30042d423651915ae74f67c1 (patch) | |
| tree | 7275b0f8f0c06dbd3a8a44cdb104bc6fc6cdba1b /scripts/azure-pipelines | |
| parent | 4fc008c7f79bcdc672621a794b1be9a080e42b5a (diff) | |
| download | vcpkg-66d4f9d411954b4d30042d423651915ae74f67c1.tar.gz vcpkg-66d4f9d411954b4d30042d423651915ae74f67c1.zip | |
[vcpkg] Add tombstone deletion scripts. (#11189)
Diffstat (limited to 'scripts/azure-pipelines')
| -rw-r--r-- | scripts/azure-pipelines/clean-tombstones.yml | 40 | ||||
| -rw-r--r-- | scripts/azure-pipelines/osx/azure-pipelines.yml | 32 | ||||
| -rwxr-xr-x | scripts/azure-pipelines/osx/initialize-environment.sh | 32 |
3 files changed, 76 insertions, 28 deletions
diff --git a/scripts/azure-pipelines/clean-tombstones.yml b/scripts/azure-pipelines/clean-tombstones.yml new file mode 100644 index 000000000..3acf736e1 --- /dev/null +++ b/scripts/azure-pipelines/clean-tombstones.yml @@ -0,0 +1,40 @@ +# Copyright (c) Microsoft Corporation.
+# SPDX-License-Identifier: MIT
+#
+variables:
+ windows-pool: 'PrWin-2020-04-28'
+ linux-pool: 'PrLin-2020-04-30'
+
+jobs:
+ - job: windows
+ displayName: 'Clean Windows Tombstones'
+ pool: $(windows-pool)
+ steps:
+ - task: PowerShell@2
+ displayName: 'Initialize Environment'
+ inputs:
+ filePath: 'scripts/azure-pipelines/windows/initialize-environment.ps1'
+ - script: rmdir /s /q archives\fail
+ displayName: 'Delete archives\fail'
+ - job: linux
+ displayName: 'Clean Linux Tombstones'
+ pool: $(linux-pool)
+ steps:
+ - task: Bash@3
+ displayName: 'Initialize Environment'
+ inputs:
+ filePath: scripts/azure-pipelines/linux/initialize-environment.sh
+ - bash: rm -rf archives/fail
+ displayName: 'Delete archives/fail'
+ - job: osx
+ displayName: 'Clean MacOS Tombstones'
+ pool:
+ name: vcpkgAgentPool
+ demands: Agent.OS -equals Darwin
+ steps:
+ - task: Bash@3
+ displayName: 'Initialize Environment'
+ inputs:
+ filePath: 'scripts/azure-pipelines/osx/initialize-environment.sh'
+ - bash: rm -rf archives/fail
+ displayName: 'Delete archives/fail'
diff --git a/scripts/azure-pipelines/osx/azure-pipelines.yml b/scripts/azure-pipelines/osx/azure-pipelines.yml index 0fe47a107..912339dfd 100644 --- a/scripts/azure-pipelines/osx/azure-pipelines.yml +++ b/scripts/azure-pipelines/osx/azure-pipelines.yml @@ -13,34 +13,10 @@ jobs: df -h
displayName: 'Report on Disk Space Before Environment'
condition: always()
- - bash: |
- rm -rf installed || true
- mkdir -p ~/Data/installed || true
- ln -s ~/Data/installed
- rm -rf ~/Data/installed/* || true
-
- rm -rf buildtrees || true
- mkdir -p ~/Data/buildtrees || true
- ln -s ~/Data/buildtrees
- rm -rf ~/Data/buildtrees/* || true
-
- rm -rf packages || true
- mkdir -p ~/Data/packages || true
- ln -s ~/Data/packages
- rm -rf ~/Data/packages/* || true
-
- rm archives || rm -rf archives || true
- ln -s ~/Data/archives
-
- rm -rf downloads || true
- mkdir -p ~/Data/downloads || true
- ln -s ~/Data/downloads
-
- if [ -d downloads/ ]; then
- #delete downloaded files that have not been used in 7 days
- find downloads/ -maxdepth 1 -type f ! -atime 7 -exec rm -f {} \;
- fi
- displayName: 'Setup Environment'
+ - task: Bash@3
+ displayName: 'Initialize Environment'
+ inputs:
+ filePath: 'scripts/azure-pipelines/osx/initialize-environment.sh'
- bash: |
brew list autoconf || brew install autoconf
brew list automake || brew install automake
diff --git a/scripts/azure-pipelines/osx/initialize-environment.sh b/scripts/azure-pipelines/osx/initialize-environment.sh new file mode 100755 index 000000000..5eeba4255 --- /dev/null +++ b/scripts/azure-pipelines/osx/initialize-environment.sh @@ -0,0 +1,32 @@ +#!/bin/bash +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: MIT + +# Sets up the environment for MacOS runs of vcpkg CI + +rm -rf installed || true +mkdir -p ~/Data/installed || true +ln -s ~/Data/installed +rm -rf ~/Data/installed/* || true + +rm -rf buildtrees || true +mkdir -p ~/Data/buildtrees || true +ln -s ~/Data/buildtrees +rm -rf ~/Data/buildtrees/* || true + +rm -rf packages || true +mkdir -p ~/Data/packages || true +ln -s ~/Data/packages +rm -rf ~/Data/packages/* || true + +rm archives || rm -rf archives || true +ln -s ~/Data/archives + +rm -rf downloads || true +mkdir -p ~/Data/downloads || true +ln -s ~/Data/downloads + +if [ -d downloads/ ]; then +#delete downloaded files that have not been used in 7 days +find downloads/ -maxdepth 1 -type f ! -atime 7 -exec rm -f {} \; +fi |
