From: Felix Date: Tue, 21 Apr 2020 17:19:10 +0000 (+0200) Subject: Update test_deploy.sh, supporting different branches X-Git-Url: http://these/git/%7B%60%24%7BwebArchiveUrl%7D/%22%7B%7D/readmes/%7B%7D/%22%7Burl%7D/%7Bthis.src%28%27jpg%27%29%7D?a=commitdiff_plain;h=4e80543edbdceebbcf4a06e60ca3fc8e76d74920;p=lemmy.git Update test_deploy.sh, supporting different branches --- diff --git a/docker/dev/test_deploy.sh b/docker/dev/test_deploy.sh index 1ae91f65..fb09e4f1 100755 --- a/docker/dev/test_deploy.sh +++ b/docker/dev/test_deploy.sh @@ -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