Commit 0773763f authored by Vivien Alger's avatar Vivien Alger

davstorage: First set of promises

parent b81115fa
......@@ -14,6 +14,7 @@ extends =
../../component/python-2.7/buildout.cfg
../../component/gzip/buildout.cfg
../../component/postfix/buildout.cfg
../../component/phantomjs/buildout.cfg
find-links +=
http://www.nexedi.org/static/packages/source/slapos.buildout/
......@@ -51,6 +52,9 @@ parts =
sendmail-script-template
postfix-conf-template
postfix-master-conf-template
test-ajaxplorer-js-template
test-sendmail-php-template
postfix-promise-template
lxml-python
eggs
instance-recipe-egg
......@@ -87,7 +91,7 @@ mode = 0644
[instance-davstorage]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-davstorage.cfg
md5sum = 19485b63b21496eb751e5ac5815487b4
md5sum = 976a4ca0d68ae88e9f0e1d6835cb2aab
output = ${buildout:directory}/template-davstorage.cfg
mode = 0644
......@@ -167,5 +171,29 @@ mode = 0644
md5sum = de33aa9ef530ef3c7661b914d2d1fbef
location = ${buildout:parts-directory}/${:_buildout_section_name_}
[test-ajaxplorer-js-template]
recipe = slapos.recipe.download
url = ${:_profile_base_location_}/templates/${:filename}
filename = test-boot.js
mode = 0644
md5sum = 5ea198171b5fe139e83969f684005aae
location = ${buildout:parts-directory}/${:_buildout_section_name_}
[test-sendmail-php-template]
recipe = slapos.recipe.download
url = ${:_profile_base_location_}/templates/${:filename}
filename = test-sendmail.php
mode = 0644
md5sum = ab19eff22b50fbab18879f7b96ae7e8e
location = ${buildout:parts-directory}/${:_buildout_section_name_}
[postfix-promise-template]
recipe = slapos.recipe.download
url = ${:_profile_base_location_}/templates/${:filename}
filename = test-postfix.sh.in
mode = 0644
md5sum = d725575994cd871e6c6c419603605fe5
location = ${buildout:parts-directory}/${:_buildout_section_name_}
[lxml-python]
python = python2.7
......@@ -15,6 +15,9 @@ parts =
postfix-users
postfix-master-conf
postfix-service
ajaxplorer-load-promise
test-sendmail-php
postfix-promise
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
......@@ -22,8 +25,8 @@ offline = true
[publish-connection-informations]
recipe = slapos.cookbook:publish
webdav_access = https://$${request-frontend:connection-domain}
url = https://$${request-frontend-ajaxupload:connection-domain}
webdav_access = $${request-frontend:config-url}
url = $${request-frontend-ajaxupload:config-url}
webdav_user = $${davstorage:user}
webdav_password = $${davstorage:password}
......@@ -180,6 +183,7 @@ public = $${directory:spool}/public
pid = $${directory:spool}/pid
saved = $${directory:spool}/saved
trace = $${directory:spool}/trace
promise-js = $${rootdirectory:etc}/js/
[copy-app]
recipe = plone.recipe.command
......@@ -250,10 +254,45 @@ output = $${directory:postfix-conf}/master.cf
mode = 0644
md5sum = de33aa9ef530ef3c7661b914d2d1fbef
[ajaxplorer-load-js]
recipe = slapos.recipe.template
url = ${test-ajaxplorer-js-template:location}/${test-ajaxplorer-js-template:filename}
content-url = https://[$${davstorage:ip}]:$${davstorage:port_ajax}/
mode = 0644
md5sum = 5ea198171b5fe139e83969f684005aae
output = $${directory:promise-js}/test-boot.js
[ajaxplorer-load-promise]
recipe = slapos.cookbook:check_page_content_phantomjs
path = $${basedirectory:promises}/ajaxplorer-load-promise
dash-path = ${dash:location}/bin/dash
phantomjs-path = ${phantomjs:location}/phantomjs-slapos
phantomjs-options = --ignore-ssl-errors=true
script-path = $${ajaxplorer-load-js:output}
[test-sendmail-php]
recipe = slapos.recipe.template
url = ${test-sendmail-php-template:location}/${test-sendmail-php-template:filename}
php-location = ${apache-php:location}/bin/php
htdocs-location = $${directory:htdocs}
output = $${rootdirectory:bin}/test-sendmail.php
mode = 0755
md5sum = ab19eff22b50fbab18879f7b96ae7e8e
[postfix-promise]
recipe = slapos.recipe.template
url = ${postfix-promise-template:location}/${postfix-promise-template:filename}
dash-path = ${dash:location}/bin/dash
test-sendmail-php-location = $${test-sendmail-php:output}
sendmail-binary = $${sendmail-script:output}
output = $${basedirectory:promises}/postfix-promise
md5sum = d725575994cd871e6c6c419603605fe5
mode = 0755
# Request frontend
[request-frontend-ajaxupload]
<= slap-connection
recipe = slapos.cookbook:request
recipe = slapos.cookbook:requestoptional
name = Frontend Ajax
# XXX We have hardcoded SR URL here.
software-url = http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg
......@@ -265,7 +304,7 @@ return = domain
[request-frontend]
<= slap-connection
recipe = slapos.cookbook:request
recipe = slapos.cookbook:requestoptional
name = Frontend Webdav
# XXX We have hardcoded SR URL here.
software-url = http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg
......
......@@ -16,7 +16,8 @@ develop =
recipe = slapos.recipe.build:gitclone
repository = http://git.erp5.org/repos/slapos.git
git-executable = ${git:location}/bin/git
revision = 4295f66416c7c94cfef174c55e22901e8d6d1562
branch = davstorage-ajaxplorer
#revision =
[slapos.toolbox-repository]
recipe = slapos.recipe.build:gitclone
......
var page = require('webpage').create();
var url = '${:content-url}'
page.open(url,function(status){
var text = page.evaluate(function(){
return document.getElementById('start_button').textContent;
});
if(text !== 'Start wizard!'){
phantom.exit(1);
} else {
phantom.exit();
}
});
#!${:dash-path}
${:test-sendmail-php-location} > /dev/null
RETURN=$(${:sendmail-binary} -bp)
if [ "$RETURN" != "Mail queue is empty" ]; then
exit 0
else
exit 1
fi
\ No newline at end of file
#!${:php-location}
<?php
require_once("${:htdocs-location}/plugins/mailer.phpmailer-lite/lib/class.phpmailer-lite.php");
$mailer = new PHPMailerLite(true);
$mailer->SetFrom('test@couscous.com');
$mailer->AddAddress('couscous@test.com');
$mailer->Subject = 'test';
$mailer->Body = 'test';
$mailer->Send();
?>
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment