mirror of
https://github.com/digital-asset/daml.git
synced 2024-08-16 08:10:52 +03:00
run fix_bazel_cache on cron (#15575)
This commit is contained in:
parent
fb436b5e5b
commit
7853cbe2f2
@ -28,6 +28,8 @@ trigger: none
|
||||
# always: true
|
||||
|
||||
jobs:
|
||||
- template: ci/fix-bazel-cache.yml
|
||||
|
||||
- job: docs
|
||||
timeoutInMinutes: 120
|
||||
pool:
|
||||
|
32
ci/build.yml
32
ci/build.yml
@ -3,37 +3,7 @@
|
||||
|
||||
jobs:
|
||||
|
||||
- job: fix_bazel_cache
|
||||
timeoutInMinutes: 120
|
||||
condition: eq(variables['System.PullRequest.IsFork'], 'False')
|
||||
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
|
||||
- template: fix-bazel-cache.yml
|
||||
|
||||
- job: git_sha
|
||||
pool:
|
||||
|
33
ci/fix-bazel-cache.yml
Normal file
33
ci/fix-bazel-cache.yml
Normal file
@ -0,0 +1,33 @@
|
||||
# Copyright (c) 2022 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
jobs:
|
||||
- job: fix_bazel_cache
|
||||
timeoutInMinutes: 120
|
||||
condition: eq(variables['System.PullRequest.IsFork'], 'False')
|
||||
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
|
||||
./bazel-bin/ci/cron/cron bazel-cache --age 120 --delete --cache-suffix '**'
|
||||
env:
|
||||
GCRED: $(GOOGLE_APPLICATION_CREDENTIALS_CONTENT)
|
||||
- template: tell-slack-failed.yml
|
Loading…
Reference in New Issue
Block a user