Skip to content

Commit

Permalink
fix(tests): install kubectl
Browse files Browse the repository at this point in the history
Signed-off-by: Kate Goldenring <kate.goldenring@fermyon.com>
  • Loading branch information
kate-goldenring committed Mar 12, 2024
1 parent deaddeb commit 5d73327
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
- uses: azure/setup-kubectl@v3
- name: "Install dependencies"
run: |
sudo apt-get update
sudo apt-get install -y protobuf-compiler libseccomp-dev
- name: Extract containerd-shim-spin-linux-${{ env.ARCH }}
run: |
mkdir -p ./bin
Expand Down
7 changes: 7 additions & 0 deletions scripts/workloads.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

set -euo pipefail

# Check if kubectl is installed
if ! command -v kubectl &> /dev/null; then
echo "kubectl is not installed. Installing..."
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl;
fi

# apply the workloads
echo ">>> apply workloads"
kubectl apply -f tests/workloads
Expand Down

0 comments on commit 5d73327

Please sign in to comment.