]> Untitled Git - lemmy.git/commitdiff
Update test_deploy.sh, supporting different branches
authorFelix <me@nutomic.com>
Tue, 21 Apr 2020 17:19:10 +0000 (19:19 +0200)
committerFelix <me@nutomic.com>
Tue, 21 Apr 2020 17:19:10 +0000 (19:19 +0200)
docker/dev/test_deploy.sh

index 1ae91f6541899c259e598410af3f13b9884058a5..fb09e4f11588fc57c6fe7056f633e7ad049885c5 100755 (executable)
@@ -1,11 +1,16 @@
-#!/bin/sh
+#!/bin/bash
+set -e
+
+BRANCH=$1
+
+git checkout $BRANCH
+cd ../../
 
 # Rebuilding dev docker
-docker-compose build
-docker tag dev_lemmy:latest dessalines/lemmy:test
-docker push dessalines/lemmy:test
+sudo docker build . -f "docker/dev/Dockerfile" -t "dessalines/lemmy:$BRANCH"
+sudo docker push "dessalines/lemmy:$BRANCH"
 
 # Run the playbook
-pushd ../../../lemmy-ansible
-ansible-playbook -i test playbooks/site.yml --vault-password-file vault_pass
+pushd ../lemmy-ansible
+ansible-playbook -i test playbooks/site.yml
 popd