diff --git a/Dockerfile b/Dockerfile index a662e7d..07671de 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,8 +18,8 @@ COPY requirements.txt . RUN apk --no-cache add ${BUILD_PACKAGES} && \ python3 -m pip --no-cache-dir install -U pip && \ python3 -m pip --no-cache-dir install virtualenv && \ - python3 -m virtualenv env && \ - source env/bin/activate && \ + python3 -m virtualenv .env && \ + source .env/bin/activate && \ python3 -m pip --no-cache-dir install -r requirements.txt && \ apk del ${BUILD_PACKAGES} COPY . . diff --git a/algo b/algo index 260c0e6..a066e3f 100755 --- a/algo +++ b/algo @@ -4,7 +4,7 @@ set -e if [ -z ${VIRTUAL_ENV+x} ] then - ACTIVATE_SCRIPT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/env/bin/activate" + ACTIVATE_SCRIPT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/.env/bin/activate" if [ -f "$ACTIVATE_SCRIPT" ] then # shellcheck source=/dev/null diff --git a/algo-showenv.sh b/algo-showenv.sh index f478285..0fe2262 100755 --- a/algo-showenv.sh +++ b/algo-showenv.sh @@ -71,7 +71,7 @@ fi if [[ -x ./.env/bin/python3 ]]; then ./.env/bin/python3 --version 2>&1 elif [[ -f ./algo ]]; then - echo "env/bin/python3 not found: has 'python3 -m virtualenv ...' been run?" + echo ".env/bin/python3 not found: has 'python3 -m virtualenv ...' been run?" fi # Just print out all command line arguments, which are expected diff --git a/tests/local-deploy.sh b/tests/local-deploy.sh index f2d073b..71458a1 100755 --- a/tests/local-deploy.sh +++ b/tests/local-deploy.sh @@ -6,7 +6,7 @@ DEPLOY_ARGS="provider=local server=10.0.8.100 ssh_user=ubuntu endpoint=10.0.8.10 if [ "${DEPLOY}" == "docker" ] then - docker run -it -v $(pwd)/config.cfg:/algo/config.cfg -v ~/.ssh:/root/.ssh -v $(pwd)/configs:/algo/configs -e "DEPLOY_ARGS=${DEPLOY_ARGS}" travis/algo /bin/sh -c "chown -R root: /root/.ssh && chmod -R 600 /root/.ssh && source env/bin/activate && ansible-playbook main.yml -e \"${DEPLOY_ARGS}\" --skip-tags apparmor" + docker run -it -v $(pwd)/config.cfg:/algo/config.cfg -v ~/.ssh:/root/.ssh -v $(pwd)/configs:/algo/configs -e "DEPLOY_ARGS=${DEPLOY_ARGS}" travis/algo /bin/sh -c "chown -R root: /root/.ssh && chmod -R 600 /root/.ssh && source .env/bin/activate && ansible-playbook main.yml -e \"${DEPLOY_ARGS}\" --skip-tags apparmor" else ansible-playbook main.yml -e "${DEPLOY_ARGS}" --skip-tags apparmor fi diff --git a/tests/update-users.sh b/tests/update-users.sh index 8c76ba1..6f561cd 100755 --- a/tests/update-users.sh +++ b/tests/update-users.sh @@ -6,7 +6,7 @@ USER_ARGS="{ 'server': '10.0.8.100', 'users': ['desktop', 'user1', 'user2'], 'lo if [ "${DEPLOY}" == "docker" ] then - docker run -it -v $(pwd)/config.cfg:/algo/config.cfg -v ~/.ssh:/root/.ssh -v $(pwd)/configs:/algo/configs -e "USER_ARGS=${USER_ARGS}" travis/algo /bin/sh -c "chown -R root: /root/.ssh && chmod -R 600 /root/.ssh && source env/bin/activate && ansible-playbook users.yml -e \"${USER_ARGS}\" -t update-users" + docker run -it -v $(pwd)/config.cfg:/algo/config.cfg -v ~/.ssh:/root/.ssh -v $(pwd)/configs:/algo/configs -e "USER_ARGS=${USER_ARGS}" travis/algo /bin/sh -c "chown -R root: /root/.ssh && chmod -R 600 /root/.ssh && source .env/bin/activate && ansible-playbook users.yml -e \"${USER_ARGS}\" -t update-users" else ansible-playbook users.yml -e "${USER_ARGS}" -t update-users fi