Skip to content

Commit 2b0a7c7

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

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
@@ -238,6 +238,10 @@ pod:
238238
export GITHUB_TOKEN=$(echo $GITHUB_TOKEN | xargs)
239239
export DOCKER_HOST=tcp://$NODENAME:2375
240240
241+
{{ if .Annotations.leewayfromgit }}
242+
scripts/install-leeway-from-git.sh
243+
{{ end }}
244+
241245
echo "Job is running on node $NODENAME" | werft log slice "Node information"
242246
243247
( \

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)