mirror of
https://github.com/digital-asset/daml.git
synced 2024-08-17 00:30:25 +03:00
more frequent Windows cache cleanup (#9743)
We'd like this to run more than once an hour, and Azure doesn't support that as a cron. CHANGELOG_BEGIN CHANGELOG_END
This commit is contained in:
parent
10177d239e
commit
83d60f0561
@ -48,37 +48,6 @@ jobs:
|
||||
AWS_SECRET_ACCESS_KEY: $(AWS_SECRET_ACCESS_KEY)
|
||||
- template: ci/tell-slack-failed.yml
|
||||
|
||||
- job: fix_bazel_cache
|
||||
timeoutInMinutes: 120
|
||||
pool:
|
||||
name: 'ubuntu_20_04'
|
||||
demands: assignment -equals default
|
||||
steps:
|
||||
- checkout: self
|
||||
- bash: ci/dev-env-install.sh
|
||||
displayName: 'Build/Install the Developer Environment'
|
||||
- template: ci/bash-lib.yml
|
||||
parameters:
|
||||
var_name: bash-lib
|
||||
- bash: |
|
||||
set -euo pipefail
|
||||
eval "$(dev-env/bin/dade assist)"
|
||||
|
||||
bazel build //ci/cron:cron
|
||||
|
||||
key=$(mktemp)
|
||||
cleanup="rm -rf $key ~/.config/gcloud"
|
||||
trap "$cleanup" EXIT
|
||||
echo "$GCRED" > $key
|
||||
gcloud auth activate-service-account --key-file=$key
|
||||
export BOTO_CONFIG=/dev/null
|
||||
# 90 minutes should provide enough overlap for an hourly
|
||||
# cronjob.
|
||||
./bazel-bin/ci/cron/cron bazel-cache --age 90 --delete
|
||||
env:
|
||||
GCRED: $(GOOGLE_APPLICATION_CREDENTIALS_CONTENT)
|
||||
- template: ci/tell-slack-failed.yml
|
||||
|
||||
- job: docker_image
|
||||
timeoutInMinutes: 60
|
||||
pool:
|
||||
|
32
ci/build.yml
32
ci/build.yml
@ -2,6 +2,38 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
jobs:
|
||||
|
||||
- job: fix_bazel_cache
|
||||
timeoutInMinutes: 120
|
||||
pool:
|
||||
name: 'ubuntu_20_04'
|
||||
demands: assignment -equals default
|
||||
steps:
|
||||
- checkout: self
|
||||
- bash: ci/dev-env-install.sh
|
||||
displayName: 'Build/Install the Developer Environment'
|
||||
- template: bash-lib.yml
|
||||
parameters:
|
||||
var_name: bash-lib
|
||||
- bash: |
|
||||
set -euo pipefail
|
||||
eval "$(dev-env/bin/dade assist)"
|
||||
|
||||
bazel build //ci/cron:cron
|
||||
|
||||
key=$(mktemp)
|
||||
cleanup="rm -rf $key ~/.config/gcloud"
|
||||
trap "$cleanup" EXIT
|
||||
echo "$GCRED" > $key
|
||||
gcloud auth activate-service-account --key-file=$key
|
||||
export BOTO_CONFIG=/dev/null
|
||||
# 90 minutes should provide enough overlap for an hourly
|
||||
# cronjob.
|
||||
./bazel-bin/ci/cron/cron bazel-cache --age 90 --delete
|
||||
env:
|
||||
GCRED: $(GOOGLE_APPLICATION_CREDENTIALS_CONTENT)
|
||||
- template: tell-slack-failed.yml
|
||||
|
||||
- job: git_sha
|
||||
pool:
|
||||
name: 'ubuntu_20_04'
|
||||
|
@ -91,8 +91,9 @@ handleInvalid (Delete delete) (time, path, r) = do
|
||||
putStrLn $ "Found invalid AC at " <> show path <> " created at " <> show time <> ": " <> show r
|
||||
when delete $ do
|
||||
putStrLn $ "Deleting AC " <> show path
|
||||
Conduit.runProcess_ $
|
||||
exit <- Conduit.runProcess $
|
||||
Conduit.proc "gsutil" ["rm", "gs://daml-bazel-cache/" <> T.unpack path]
|
||||
putStrLn $ "Exit code: " <> show exit
|
||||
|
||||
-- | Filter to lines that parse and are for entries that are not older
|
||||
-- than the supplied age.
|
||||
|
Loading…
Reference in New Issue
Block a user