Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Periodic indexing for Chromium (pass 2) #382

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions .buildkite/chromium.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
#!/usr/bin/env bash
set -eux

ZONE="us-central-1"
ZONE="us-central1-c"
PROJECT="sourcegraph-ci"
INSTANCE="scip-clang-runner"

# From https://stackoverflow.com/a/65683139/2682729
function wait_vm() {
function wait_vm_start() {
local counter=0
local maxRetry=20
local maxRetry=10
while true ; do
if (( counter == maxRetry )) ; then
echo "Reach the retry upper limit $counter"
exit 1
fi

if gcloud compute ssh --quiet --zone "$ZONE" --project "$PROJECT" "$INSTANCE" --tunnel-through-iap --command="true" 2> /dev/null ; then
if gcloud compute ssh --quiet --zone "$ZONE" --project "$PROJECT" "$INSTANCE" --tunnel-through-iap --command="true" ; then
echo "The machine is up!"
exit 0
else
echo "Maybe later? Retry: $counter/$maxRetry"
((counter++))
# Don't use post-increment: https://stackoverflow.com/a/22428973/2682729
((++counter))
sleep 5
fi
done
Expand Down
4 changes: 3 additions & 1 deletion .buildkite/chromium.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
$schema: "http://json.schemastore.org/buildkite"
steps:
- label: "Start VM"
- label: "Index Chromium"
agents:
queue: bazel
command: |
./.buildkite/chromium.sh
notify:
- slack: "#code-intel-indexing-alerts"