Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
pelican-gitreceive
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ansible
pelican-gitreceive
Commits
3dfe2b07
Commit
3dfe2b07
authored
8 years ago
by
nimrod
Browse files
Options
Downloads
Plain Diff
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
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
.pre-commit-config.yaml
+4
-0
4 additions, 0 deletions
.pre-commit-config.yaml
tasks/main.yml
+13
-2
13 additions, 2 deletions
tasks/main.yml
templates/receiver.sh
+2
-0
2 additions, 0 deletions
templates/receiver.sh
tests/test_pelican-gitreceive.py
+1
-0
1 addition, 0 deletions
tests/test_pelican-gitreceive.py
with
20 additions
and
2 deletions
.pre-commit-config.yaml
+
4
−
0
View file @
3dfe2b07
...
@@ -16,6 +16,10 @@
...
@@ -16,6 +16,10 @@
files
:
tests/playbook.yml
files
:
tests/playbook.yml
args
:
args
:
-
tests/playbook.yml
-
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
-
repo
:
https://github.com/willthames/ansible-lint
sha
:
959ab0f525e9abb19cf75f34381015cf33695f61
sha
:
959ab0f525e9abb19cf75f34381015cf33695f61
hooks
:
hooks
:
...
...
This diff is collapsed.
Click to expand it.
tasks/main.yml
+
13
−
2
View file @
3dfe2b07
...
@@ -11,18 +11,29 @@
...
@@ -11,18 +11,29 @@
-
name
:
APT install prerequisites
-
name
:
APT install prerequisites
when
:
ansible_pkg_mgr == 'apt'
when
:
ansible_pkg_mgr == 'apt'
apt
:
apt
:
name
:
python-dev
name
:
[
python-dev
,
libssl-dev
,
libffi-dev
,
build-essential
]
state
:
present
state
:
present
update_cache
:
yes
update_cache
:
yes
cache_valid_time
:
3600
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
-
name
:
pip install
become
:
True
become_user
:
git
with_items
:
with_items
:
-
pelican
-
pelican
-
f
abric
-
F
abric
pip
:
pip
:
name
:
'
{{
item
}}'
name
:
'
{{
item
}}'
state
:
present
state
:
present
virtualenv
:
/var/lib/pelican-gitreceive
-
name
:
Create directory structure
-
name
:
Create directory structure
file
:
file
:
...
...
This diff is collapsed.
Click to expand it.
templates/receiver.sh
+
2
−
0
View file @
3dfe2b07
...
@@ -31,6 +31,8 @@ then
...
@@ -31,6 +31,8 @@ then
echo
'----> Fetching submodules ...'
echo
'----> Fetching submodules ...'
fetch_submodules
fetch_submodules
fi
fi
echo
'----> Activating virtualenv ...'
.
/var/lib/pelican-gitreceive/bin/activate
echo
'----> Building blog ...'
echo
'----> Building blog ...'
fab build
fab build
echo
'----> Copying blog ...'
echo
'----> Copying blog ...'
...
...
This diff is collapsed.
Click to expand it.
tests/test_pelican-gitreceive.py
+
1
−
0
View file @
3dfe2b07
...
@@ -9,6 +9,7 @@ def test_git_push(Command, Sudo):
...
@@ -9,6 +9,7 @@ def test_git_push(Command, Sudo):
push
=
Command
(
'
git -C /root/blog push test
'
)
push
=
Command
(
'
git -C /root/blog push test
'
)
assert
push
.
rc
==
0
assert
push
.
rc
==
0
for
message
in
[
'
----> Unpacking ...
'
,
'
----> Fetching submodules ...
'
,
for
message
in
[
'
----> Unpacking ...
'
,
'
----> Fetching submodules ...
'
,
'
----> Activating virtualenv ...
'
,
'
----> Building blog ...
'
,
'
Copying blog ...
'
,
'
----> Building blog ...
'
,
'
Copying blog ...
'
,
'
----> Cleanup ...
'
,
'
----> OK.
'
]:
'
----> Cleanup ...
'
,
'
----> OK.
'
]:
assert
message
in
push
.
stderr
assert
message
in
push
.
stderr
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment