Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Lukas Niegsch
slapos
Commits
f4f186a6
Commit
f4f186a6
authored
Aug 09, 2013
by
Vivien Alger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New promise recipe for checking page content with phantomjs
parent
fa32bcc7
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
0 deletions
+34
-0
setup.py
setup.py
+1
-0
slapos/recipe/check_page_content/__init__.py
slapos/recipe/check_page_content/__init__.py
+23
-0
slapos/recipe/check_page_content/template/check_page_content_phantomjs.in
...eck_page_content/template/check_page_content_phantomjs.in
+10
-0
No files found.
setup.py
View file @
f4f186a6
...
...
@@ -84,6 +84,7 @@ setup(name=name,
'certificate_authority = slapos.recipe.certificate_authority:Recipe'
,
'certificate_authority.request = slapos.recipe.certificate_authority:Request'
,
'check_page_content = slapos.recipe.check_page_content:Recipe'
,
'check_page_content_phantomjs'
=
'slapos.recipe.check_page_content:PhantomJSRecipe'
,
'check_port_listening = slapos.recipe.check_port_listening:Recipe'
,
'check_url_available = slapos.recipe.check_url_available:Recipe'
,
'cloud9 = slapos.recipe.cloud9:Recipe'
,
...
...
slapos/recipe/check_page_content/__init__.py
View file @
f4f186a6
...
...
@@ -49,3 +49,26 @@ class Recipe(GenericBaseRecipe):
)
return
[
promise
]
class
PhantomJSRecipe
(
GenericBaseRecipe
):
"""
Create script for checking page content at url with js script
"""
def
install
(
self
):
config
=
{
'script-path'
:
self
.
options
[
'script-path'
].
strip
(),
'dash-path'
:
self
.
options
[
'dash-path'
].
strip
(),
'phantomjs-path'
:
self
.
options
[
'phantomjs-path'
].
strip
(),
'phantomjs-options'
:
self
.
options
.
get
(
'phantomjs-options'
,
''
)
}
promise
=
self
.
createExecutable
(
self
.
options
[
'path'
].
strip
(),
self
.
substituteTemplate
(
self
.
getTemplateFilename
(
'check_page_content_phantomjs.in'
),
config
)
)
return
[
promise
]
\ No newline at end of file
slapos/recipe/check_page_content/template/check_page_content_phantomjs.in
0 → 100644
View file @
f4f186a6
#!%(dash-path)s
# BEWARE: This file is operated by slapgrid
# BEWARE: It will be overwritten automatically
%(phantomjs-path)s %(phantomjs-options)s %(script-path)s
if [ $? != 0 ]; then
echo "PhantomJS script returned non zero output" >&2
exit 1
fi
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment