Commit 1700ef84 authored by Nolan's avatar Nolan

Add stamps/deps for upload-* targets.

parent 7e224c67
......@@ -53,56 +53,76 @@ $(BOUNDERY_SSHCONF): $(BOUNDERY)
@vagrant ssh-config boundery.me | grep -v User > $@
vagrant ssh boundery.me -c 'sudo cp -r .ssh /root/'
upload-central: $(BOUNDERY) $(BOUNDERY_SSHCONF)
UPLOAD_CENTRAL=build/stamp/upload-central
upload-central: $(UPLOAD_CENTRAL)
$(UPLOAD_CENTRAL): $(BOUNDERY) $(BOUNDERY_SSHCONF)
@test $(CENTRAL_SRC) || ( echo 'set CENTRAL_SRC' && false )
vagrant ssh boundery.me -c '[ -f /usr/local/share/ca-certificates/pebble.minica.crt ]'
vagrant upload $(CENTRAL_SRC)/setupserver /tmp/setupserver boundery.me
vagrant ssh boundery.me -c 'echo fakepasswd | sudo /tmp/setupserver'
SERVER=boundery.me SSH_CONF=`readlink -f $(BOUNDERY_SSHCONF)` make -C $(CENTRAL_SRC) deploy
@echo Waiting for boundery.me containers to start...
@vagrant ssh boundery.me -c 'while ! pidof -q nginx; do sleep 1; done'
@vagrant ssh boundery.me -c 'while ! ss -tln | grep -q :443; do sleep 1; done'
@touch $@
#XXX Change client/image uploads to use make deploy just like upload-central.
upload-linux: $(BOUNDERY) $(BOUNDERY_SSHCONF)
UPLOAD_LINUX=build/stamp/upload-linux
upload-linux: $(UPLOAD_LINUX)
$(UPLOAD_LINUX): $(BOUNDERY) $(BOUNDERY_SSHCONF)
@test $(CLIENT_SRC) || ( echo 'set CLIENT_SRC' && false )
vagrant ssh boundery.me -c '[ -f /usr/local/share/ca-certificates/pebble.minica.crt ]'
make -C $(CLIENT_SRC) linux
vagrant ssh boundery.me -c 'sudo mkdir -p /root/data/sslnginx/html/clients'
scp -F $(BOUNDERY_SSHCONF) $(CLIENT_SRC)/linux/*.tar.gz \
root@boundery.me:/root/data/sslnginx/html/clients/
@touch $@
upload-windows: $(BOUNDERY) $(BOUNDERY_SSHCONF)
UPLOAD_WINDOWS=build/stamp/upload-windows
upload-windows: $(UPLOAD_WINDOWS)
$(UPLOAD_WINDOWS): $(BOUNDERY) $(BOUNDERY_SSHCONF)
@test $(CLIENT_SRC) || ( echo 'set CLIENT_SRC' && false )
vagrant ssh boundery.me -c '[ -f /usr/local/share/ca-certificates/pebble.minica.crt ]'
make -C $(CLIENT_SRC) windows
vagrant ssh boundery.me -c 'sudo mkdir -p /root/data/sslnginx/html/clients'
scp -F $(BOUNDERY_SSHCONF) $(CLIENT_SRC)/windows/*.msi \
root@boundery.me:/root/data/sslnginx/html/clients/
@touch $@
upload-macos: $(BOUNDERY) $(BOUNDERY_SSHCONF)
UPLOAD_MACOS=build/stamp/upload-macos
upload-macos: $(UPLOAD_MACOS)
$(UPLOAD_MACOS): $(BOUNDERY) $(BOUNDERY_SSHCONF)
@test $(CLIENT_SRC) || ( echo 'set CLIENT_SRC' && false )
vagrant ssh boundery.me -c '[ -f /usr/local/share/ca-certificates/pebble.minica.crt ]'
make -C $(CLIENT_SRC) macos
vagrant ssh boundery.me -c 'sudo mkdir -p /root/data/sslnginx/html/clients'
scp -F $(BOUNDERY_SSHCONF) $(CLIENT_SRC)/macOS/*.dmg \
root@boundery.me:/root/data/sslnginx/html/clients/
@touch $@
upload-pczip: $(BOUNDERY) $(BOUNDERY_SSHCONF)
UPLOAD_PCZIP=build/stamp/upload-pczip
upload-pczip: $(UPLOAD_PCZIP)
$(UPLOAD_PCZIP): $(BOUNDERY) $(BOUNDERY_SSHCONF)
@test $(OS_SRC) || ( echo 'set OS_SRC' && false )
vagrant ssh boundery.me -c '[ -f /usr/local/share/ca-certificates/pebble.minica.crt ]'
make -C $(OS_SRC) pc_zip
vagrant ssh boundery.me -c 'sudo mkdir -p /root/data/sslnginx/html/images'
scp -F $(BOUNDERY_SSHCONF) $(OS_SRC)/build/amd64/images/pc.zip \
root@boundery.me:/root/data/sslnginx/html/images/
@touch $@
upload-rpi3zip: $(BOUNDERY) $(BOUNDERY_SSHCONF)
UPLOAD_RPI3ZIP=build/stamp/upload-rpi3zip
upload-rpi3zip: $(UPLOAD_RPI3ZIP)
$(UPLOAD_RPI3ZIP): $(BOUNDERY) $(BOUNDERY_SSHCONF)
@test $(OS_SRC) || ( echo 'set OS_SRC' && false )
vagrant ssh boundery.me -c '[ -f /usr/local/share/ca-certificates/pebble.minica.crt ]'
make -C $(OS_SRC) rpi3_zip
vagrant ssh boundery.me -c 'sudo mkdir -p /root/data/sslnginx/html/images'
scp -F $(BOUNDERY_SSHCONF) $(OS_SRC)/build/arm64/images/rpi3.zip \
root@boundery.me:/root/data/sslnginx/html/images/
@touch $@
#XXX Make this depend on a stamp that pczip/linux/central are uploaded...
test-linux-pczip: $(CLIENT) $(BOUNDERY) build/server_data.vdi
test-linux-pczip: $(CLIENT) $(BOUNDERY) build/server_data.vdi $(UPLOAD_CENTRAL) $(UPLOAD_PCZIP) $(UPLOAD_LINUX)
vagrant halt -f server
vagrant provision --provision-with install client
@mdel -ibuild/server.img@@1M ::/pairingkey 2>/dev/null || true
......
......@@ -58,6 +58,11 @@ Vagrant.configure("2") do |config|
boundery.vm.hostname = "boundery"
boundery.vm.network "private_network", auto_config: false,
virtualbox__intnet: "boundery_inet"
config.trigger.after :destroy do |trigger|
trigger.run = {inline: "bash -c 'rm -f build/stamp/upload-*'"}
end
boundery.vm.provision "shell", inline: <<-SHELL
set -e
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment