Skip to content

Commit

Permalink
fix(lua) sed the luapaths so they don't reference /tmp/build (#38)
Browse files Browse the repository at this point in the history
* fix(tests) validate the luarocks command works in the package asset

* fix(paths) fix the paths to be correct
  • Loading branch information
hutchic authored Apr 1, 2019
1 parent 304f55c commit 0e92a35
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,8 @@ cp /kong/bin/kong /tmp/build/usr/local/bin/kong
sed -i.bak 's@#!/usr/bin/env resty@#!/usr/bin/env /usr/local/openresty/bin/resty@g' /tmp/build/usr/local/bin/kong && \
rm /tmp/build/usr/local/bin/kong.bak

sed -i 's/\/tmp\/build//' `find /tmp/build/usr/local/bin/ -maxdepth 1 -type f`
sed -i 's/\/tmp\/build//' `find /tmp/build/usr/local/share/lua/5.1/luarocks/ -maxdepth 1 -type f`

cp -R /tmp/build/* /output/build/
chown -R 1000:1000 /output/build/*
5 changes: 3 additions & 2 deletions test/run_tests.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
#!/bin/bash

set +e
set -e

if [[ "$RESTY_IMAGE_BASE" == "src" ]]; then
exit 0
fi

docker run -it --rm localhost:5000/kong /bin/sh -c "luarocks --version"

kubectl apply -f https://github.com/Faithlife/minikube-registry-proxy/raw/master/kube-registry-proxy.yml
curl -L https://github.com/Faithlife/minikube-registry-proxy/raw/master/docker-compose.yml | MINIKUBE_IP=$(minikube ip) docker-compose -p mkr -f - up -d

while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:5000)" != 200 ]]; do
curl -s -o /dev/null -w ''%{http_code}'' localhost:5000
echo "waiting for registry to be ready"
sleep 10;
done
Expand Down

0 comments on commit 0e92a35

Please sign in to comment.