Skip to content

Commit 39e51b4

Browse files
authored
chore: update spartan nightly benchmarks (#19015)
Nightly benchmarks started too quickly and the image was not available.
2 parents b805903 + 6d76f81 commit 39e51b4

File tree

2 files changed

+22
-21
lines changed

2 files changed

+22
-21
lines changed

.github/workflows/nightly-spartan-bench.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ name: Nightly Spartan Benchmarks
22

33
on:
44
schedule:
5-
# Run every night at 3:00 AM UTC (1 hour after nightly release tag at 2:00 AM)
6-
- cron: "0 3 * * *"
5+
- cron: "0 4 * * *"
76
workflow_dispatch:
87
inputs:
98
nightly_tag:

spartan/scripts/install_deps.sh

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,25 @@
11
#!/usr/bin/env bash
2-
echo "Installing dependencies..."
32
source $(git rev-parse --show-toplevel)/ci3/source
4-
echo "Source loaded"
3+
4+
log() { echo "[INFO] $(date -Is) - $*"; }
5+
err() { echo "[ERROR] $(date -Is) - $*" >&2; }
6+
die() { err "$*"; exit 1; }
7+
require_cmd() { command -v "$1" >/dev/null 2>&1 || die "Required command not found: $1"; }
8+
9+
log "Installing dependencies..."
510

611
# if kubectl is not installed, install it
712
if ! command -v kubectl &> /dev/null; then
8-
echo "Installing kubectl..."
9-
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/$(os)/$(arch)/kubectl"
13+
log "Installing kubectl..."
14+
curl -sLO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/$(os)/$(arch)/kubectl"
1015
chmod +x kubectl
1116
sudo mv kubectl /usr/local/bin/kubectl
1217
fi
1318

1419
# Install kind if it is not installed
1520
if ! command -v kind &> /dev/null; then
16-
echo "Installing kind..."
17-
curl -Lo ./kind https://github.com/kubernetes-sigs/kind/releases/download/v0.23.0/kind-$(os)-$(arch)
21+
log "Installing kind..."
22+
curl -sLo ./kind https://github.com/kubernetes-sigs/kind/releases/download/v0.23.0/kind-$(os)-$(arch)
1823
chmod +x ./kind
1924
sudo mv ./kind /usr/local/bin/kind
2025
fi
@@ -28,7 +33,7 @@ function get_helm_from_cache {
2833
elif [ -f ./usr/local/bin/helm ]; then
2934
sudo mv ./usr/local/bin/helm /usr/local/bin/helm
3035
else
31-
echo "Could not extract helm from cache"
36+
err "Could not extract helm from cache"
3237
return 1
3338
fi
3439
sudo chmod +x /usr/local/bin/helm
@@ -38,16 +43,16 @@ function get_helm_from_cache {
3843

3944
# Install helm if it is not installed
4045
if ! command -v helm &> /dev/null; then
41-
echo "Installing helm..."
46+
log "Installing helm..."
4247

4348
# Determine the helm artifact name based on OS and architecture
4449
helm_artifact="helm-$(os)-$(arch).tar.gz"
4550
helm_release_url="https://github.com/helm/helm/releases/tag/v3.19.0"
4651

4752
if get_helm_from_cache "$helm_artifact" >/dev/null; then
48-
echo "Using cached Helm binary"
53+
log "Using cached Helm binary"
4954
else
50-
echo "Downloading Helm from get.helm.sh..."
55+
log "Downloading Helm from get.helm.sh..."
5156
# Download and run the official Helm installer script
5257
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
5358
chmod +x get_helm.sh
@@ -63,9 +68,9 @@ if ! command -v helm &> /dev/null; then
6368
fi
6469

6570
if ! command -v stern &> /dev/null; then
66-
echo "Installing stern..."
71+
log "Installing stern..."
6772
# Download Stern
68-
curl -Lo stern.tar.gz https://github.com/stern/stern/releases/download/v1.31.0/stern_1.31.0_$(os)_$(arch).tar.gz
73+
curl -sLo stern.tar.gz https://github.com/stern/stern/releases/download/v1.31.0/stern_1.31.0_$(os)_$(arch).tar.gz
6974

7075
# Extract the binary
7176
tar -xzf stern.tar.gz
@@ -82,8 +87,8 @@ if ! command -v stern &> /dev/null; then
8287
fi
8388

8489
if ! command -v gcloud &> /dev/null; then
85-
echo "Installing gcloud..."
86-
curl -Lo google-cloud-cli.tar.gz https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-cli-$os-$(arch).tar.gz
90+
log "Installing gcloud..."
91+
curl -sLo google-cloud-cli.tar.gz https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-cli-$os-$(arch).tar.gz
8792
tar -xzf google-cloud-cli.tar.gz
8893
rm google-cloud-cli.tar.gz
8994

@@ -105,20 +110,17 @@ if command -v gcloud &> /dev/null; then
105110
if dpkg -l google-cloud-cli-gke-gcloud-auth-plugin 2>/dev/null | grep -q "^ii"; then
106111
: # do nothing
107112
else
108-
echo "Installing GKE auth plugin for kubectl via apt..."
113+
log "Installing GKE auth plugin for kubectl via apt..."
109114
sudo apt-get update
110115
sudo apt-get install -y google-cloud-cli-gke-gcloud-auth-plugin
111116
fi
112117
else
113-
echo "Installing GKE auth plugin for kubectl via gcloud components..."
118+
log "Installing GKE auth plugin for kubectl via gcloud components..."
114119
gcloud components install gke-gcloud-auth-plugin
115120
fi
116121
fi
117122

118123

119-
# Sanity check commands
120-
require_cmd() { command -v "$1" >/dev/null 2>&1 || die "Required command not found: $1"; }
121-
122124
require_cmd git
123125
require_cmd kubectl
124126
require_cmd terraform

0 commit comments

Comments
 (0)