Commit 25ea4c7c authored by Nicolas Wavrant's avatar Nicolas Wavrant

stack-flask : now automaticaly download a given git repository

and start on it
parent 6458cb40
...@@ -12,6 +12,8 @@ parts = ...@@ -12,6 +12,8 @@ parts =
symlinks symlinks
base-server base-server
base-module base-module
copy-git-project
git-change-origin
eggs-directory = ${buildout:eggs-directory} eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory} develop-eggs-directory = ${buildout:develop-eggs-directory}
...@@ -158,6 +160,21 @@ download-only = true ...@@ -158,6 +160,21 @@ download-only = true
destination = $${directory:www} destination = $${directory:www}
mode = 0644 mode = 0644
[copy-git-project]
recipe = slapos.recipe.build:gitclone
repository = ${git-user:location}
location = $${directory:www}
git-executable = ${git-user:git-executable}
[git-change-origin]
recipe = collective.recipe.cmd
on_install = true
on_update = false
cmds =
cd $${directory:www}
${git-user:git-executable} remote set-url origin ${git-user:repository}
# check promises # check promises
[nginx-promise] [nginx-promise]
recipe = slapos.cookbook:check_port_listening recipe = slapos.cookbook:check_port_listening
......
...@@ -6,12 +6,14 @@ extends = ...@@ -6,12 +6,14 @@ extends =
../../component/nginx/buildout.cfg ../../component/nginx/buildout.cfg
../../component/dash/buildout.cfg ../../component/dash/buildout.cfg
../../component/curl/buildout.cfg ../../component/curl/buildout.cfg
../../component/git/buildout.cfg
parts = parts =
slapos-cookbook slapos-cookbook
slapos-toolbox slapos-toolbox
eggs eggs
template template
git-user
nginx nginx
nginx_template_launcher nginx_template_launcher
template_nginx_conf template_nginx_conf
...@@ -29,7 +31,7 @@ mode = 0644 ...@@ -29,7 +31,7 @@ mode = 0644
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-flask.cfg url = ${:_profile_base_location_}/instance-flask.cfg
output = ${buildout:directory}/template-flask.cfg output = ${buildout:directory}/template-flask.cfg
md5sum = 9d38d13f46024625bb46a9e3c912dc17 #md5sum = 4ecf02b09c8e8a3440bd9eb9e846314f
mode = 0644 mode = 0644
[template_nginx_conf] [template_nginx_conf]
...@@ -66,6 +68,12 @@ download-only = true ...@@ -66,6 +68,12 @@ download-only = true
filename = server.py filename = server.py
mode = 0644 mode = 0644
[git-user]
recipe = slapos.recipe.build:gitclone
repository = ${code:git-repo}
git-executable = ${git:location}/bin/git
location = ${buildout:parts-directory}/${:_buildout_section_name_}
[slapos-toolbox] [slapos-toolbox]
recipe = zc.recipe.egg recipe = zc.recipe.egg
eggs = slapos.toolbox eggs = slapos.toolbox
......
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