Skip to content
Snippets Groups Projects
Commit 3dfe2b07 authored by nimrod's avatar nimrod
Browse files

Merge branch 'feature/virtualenv' into feature/tests

# Conflicts:
#	templates/receiver.sh
parents 6c6a6157 ba850340
No related branches found
No related tags found
No related merge requests found
......@@ -16,6 +16,10 @@
files: tests/playbook.yml
args:
- tests/playbook.yml
- repo: https://github.com/adarnimrod/shell-pre-commit
sha: v0.1.0
hooks:
- id: shell-lint
- repo: https://github.com/willthames/ansible-lint
sha: 959ab0f525e9abb19cf75f34381015cf33695f61
hooks:
......
......@@ -11,18 +11,29 @@
- name: APT install prerequisites
when: ansible_pkg_mgr == 'apt'
apt:
name: python-dev
name: [python-dev, libssl-dev, libffi-dev, build-essential]
state: present
update_cache: yes
cache_valid_time: 3600
- name: Create virtualenv directory
file:
path: /var/lib/pelican-gitreceive
owner: git
group: git
mode: 0o0700
state: directory
- name: pip install
become: True
become_user: git
with_items:
- pelican
- fabric
- Fabric
pip:
name: '{{ item }}'
state: present
virtualenv: /var/lib/pelican-gitreceive
- name: Create directory structure
file:
......
......@@ -31,6 +31,8 @@ then
echo '----> Fetching submodules ...'
fetch_submodules
fi
echo '----> Activating virtualenv ...'
. /var/lib/pelican-gitreceive/bin/activate
echo '----> Building blog ...'
fab build
echo '----> Copying blog ...'
......
......@@ -9,6 +9,7 @@ def test_git_push(Command, Sudo):
push = Command('git -C /root/blog push test')
assert push.rc == 0
for message in ['----> Unpacking ...', '----> Fetching submodules ...',
'----> Activating virtualenv ...',
'----> Building blog ...', 'Copying blog ...',
'----> Cleanup ...', '----> OK.']:
assert message in push.stderr
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment