61 lines
No EOL
1.9 KiB
YAML
61 lines
No EOL
1.9 KiB
YAML
# Copyright 2021 Google LLC
|
|
#
|
|
# Licensed under the the Apache License v2.0 with LLVM Exceptions (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# https://llvm.org/LICENSE.txt
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
|
|
apiVersion: batch/v1beta1
|
|
kind: CronJob
|
|
metadata:
|
|
name: collect-stats
|
|
namespace: buildkite
|
|
spec:
|
|
schedule: "0 * * * *"
|
|
concurrencyPolicy: Forbid
|
|
successfulJobsHistoryLimit: 24
|
|
failedJobsHistoryLimit: 3
|
|
jobTemplate:
|
|
spec:
|
|
template:
|
|
spec:
|
|
containers:
|
|
- name: collect-buildkite-stats
|
|
image: gcr.io/llvm-premerge-checks/stats:latest
|
|
args: ["/root/llvm-premerge-checks/scripts/metrics/load_buildkite.sh"]
|
|
env:
|
|
- name: BUILDKITE_AGENT_TOKEN
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: buildkite-agent-token
|
|
key: token
|
|
- name: POD_NAME
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: metadata.name
|
|
- name: CONDUIT_TOKEN
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: conduit-api-token
|
|
key: token
|
|
- name: BUILDKITE_API_TOKEN
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: buildkite-api-token
|
|
key: token
|
|
- name: DB_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: db-stats
|
|
key: password
|
|
restartPolicy: Never
|
|
nodeSelector:
|
|
cloud.google.com/gke-nodepool: service |