mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 17:31:43 +00:00
buildchecker: run history upload on a cron (#31823)
This commit is contained in:
parent
1dbafd58d1
commit
313c2498cb
25
.github/workflows/buildchecker-history.yml
vendored
Normal file
25
.github/workflows/buildchecker-history.yml
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
# See dev/buildchecker/README.md
|
||||
name: buildchecker
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 1 * * *'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
run:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
# secrets for this workflow are configured in the 'autobuildsherrif' environment.
|
||||
# 'autobuildsherrif' was the original name of the 'buildchecker' tool - GitHub does
|
||||
# not provide a simple way to do a rename, so we leave it as is for now.
|
||||
environment: autobuildsherrif
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-go@v2
|
||||
with: { go-version: '1.17' }
|
||||
|
||||
- run: ./dev/buildchecker/run-day-history.sh
|
||||
env:
|
||||
BUILDKITE_TOKEN: ${{ secrets.AUTOBUILDSHERRIF_BUILDKITE_TOKEN }}
|
||||
HONEYCOMB_TOKEN: ${{ secrets.AUTOBUILDSHERRIF_HONEYCOMB_TOKEN }}
|
||||
18
dev/buildchecker/run-day-history.sh
Normal file
18
dev/buildchecker/run-day-history.sh
Normal file
@ -0,0 +1,18 @@
|
||||
#! /usr/bin/env bash
|
||||
|
||||
# Make this script independent of where it's called
|
||||
cd "$(dirname "${BASH_SOURCE[0]}")"/../..
|
||||
|
||||
set -eu
|
||||
|
||||
created_from=$(date -d "yesterday" '+%Y-%m-%d')
|
||||
created_to=$(date '+%Y-%m-%d')
|
||||
|
||||
echo "--- Running 'buildchecker history' from $created_from to $created_to"
|
||||
go run ./dev/buildchecker/ \
|
||||
-buildkite.token="$BUILDKITE_TOKEN" \
|
||||
-created.from="$created_from" \
|
||||
-created.to="$created_to" \
|
||||
-honeycomb.dataset="buildkite-history" \
|
||||
-honeycomb.token="$HONEYCOMB_TOKEN" \
|
||||
history
|
||||
Loading…
Reference in New Issue
Block a user