Skip to content

Commit c756e14

Browse files
committed
Optionally consume Leeway from git
1 parent 184fec8 commit c756e14

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

.werft/build.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,10 @@ pod:
246246
echo "done" \
247247
) | werft log slice "chowning /workspace and $GOCACHE"
248248
249+
{{ if .Annotations.leewayfromgit }}
250+
scripts/install-leeway-from-git.sh
251+
{{ end }}
252+
249253
( \
250254
mkdir -p /workspace/.ssh && \
251255
cp /mnt/secrets/harvester-vm-ssh-keys/id_rsa /workspace/.ssh/id_rsa_harvester_vm && \

scripts/install-leeway-from-git.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
3+
# This script clones the leeway repo, builds leeway, and replaces the "leeway" binary in this workspace with the newly build binary.
4+
5+
set -Eeuo pipefail
6+
7+
BIN=$(whereis leeway | sed "s/leeway: //")
8+
9+
DIR=$(mktemp -d)
10+
echo "Cloning Leeway into $DIR"
11+
cd "$DIR"
12+
git clone https://github.com/meysholdt/leeway.git
13+
14+
cd leeway
15+
go build
16+
echo ""
17+
echo "Replacing $BIN with the newly build binary".
18+
sudo cp leeway "$BIN"

0 commit comments

Comments
 (0)