Commit 2f67d1ef authored by Nicolas Wavrant's avatar Nicolas Wavrant

slaprunner: using recipe to deploy the slapos git and write the .project

parent 8e8ef7b7
...@@ -143,7 +143,7 @@ location = ${buildout:parts-directory}/${:_buildout_section_name_} ...@@ -143,7 +143,7 @@ location = ${buildout:parts-directory}/${:_buildout_section_name_}
[slapos-cfg-template] [slapos-cfg-template]
recipe = hexagonit.recipe.download recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/template/${:filename} url = ${:_profile_base_location_}/template/${:filename}
md5sum = 28ceadbeaa3b687f7ba39d87cd6772f3 #md5sum = 28ceadbeaa3b687f7ba39d87cd6772f3
location = ${buildout:parts-directory}/${:_buildout_section_name_} location = ${buildout:parts-directory}/${:_buildout_section_name_}
filename = slapos.cfg.in filename = slapos.cfg.in
download-only = true download-only = true
......
...@@ -26,6 +26,7 @@ parts = ...@@ -26,6 +26,7 @@ parts =
environ environ
slapos-cfg slapos-cfg
slaprunner-wrapper slaprunner-wrapper
slapos-repo-config
eggs-directory = ${buildout:eggs-directory} eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory} develop-eggs-directory = ${buildout:develop-eggs-directory}
...@@ -53,7 +54,7 @@ test = $${:etc}/test/ ...@@ -53,7 +54,7 @@ test = $${:etc}/test/
nginx-data = $${directory:srv}/nginx nginx-data = $${directory:srv}/nginx
ca-dir = $${:srv}/ssl ca-dir = $${:srv}/ssl
shellinabox = $${:var}/shellinabox shellinabox = $${:var}/shellinabox
project = $${:srv}/runner/project/
[runnerdirectory] [runnerdirectory]
recipe = slapos.cookbook:mkdirectory recipe = slapos.cookbook:mkdirectory
...@@ -113,9 +114,6 @@ debug = $${slap-parameter:debug} ...@@ -113,9 +114,6 @@ debug = $${slap-parameter:debug}
access-url = https://[$${:ipv6}]:$${:runner_port} access-url = https://[$${:ipv6}]:$${:runner_port}
supd-temp-var = $${directory:etc}/supervisord.conf supd-temp-var = $${directory:etc}/supervisord.conf
prox-db-var = $${slaprunner:working-directory}/proxy.db prox-db-var = $${slaprunner:working-directory}/proxy.db
default_repo = $${slap-parameter:default_repo}
default_sr = $${slap-parameter:default_sr}
auto_deploy = $${slap-parameter:auto_deploy}
[test-runner] [test-runner]
<= slaprunner <= slaprunner
...@@ -413,9 +411,10 @@ instance-amount = 10 ...@@ -413,9 +411,10 @@ instance-amount = 10
debug = false debug = false
cloud9-frontend-domain = cloud9-frontend-domain =
frontend-domain = frontend-domain =
default_repo = http://git.erp5.org/repos/slapos.git slapos-repository = http://git.erp5.org/repos/slapos.git
default_sr = slapos-software =
auto_deploy = 1 slapos-reference = master
auto-deploy = true
[slapos-cfg] [slapos-cfg]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
...@@ -446,9 +445,7 @@ context = ...@@ -446,9 +445,7 @@ context =
key cloud9_url slaprunner:cloud9-url key cloud9_url slaprunner:cloud9-url
key run_dir slaprunner:run_dir key run_dir slaprunner:run_dir
key log_dir slaprunner:log_dir key log_dir slaprunner:log_dir
key default_repo slaprunner:default_repo key auto_deploy slap-parameter:auto-deploy
key default_sr slaprunner:default_sr
key auto_deploy slaprunner:auto_deploy
[shellinabox] [shellinabox]
recipe = slapos.cookbook:shellinabox recipe = slapos.cookbook:shellinabox
...@@ -489,3 +486,18 @@ log-file = $${slaprunner:log_dir}/slaprunner.log ...@@ -489,3 +486,18 @@ log-file = $${slaprunner:log_dir}/slaprunner.log
wrapper-path = $${slaprunner:wrapper} wrapper-path = $${slaprunner:wrapper}
environment = PATH=$${slaprunner:git-binary}:$${environ:PATH} environment = PATH=$${slaprunner:git-binary}:$${environ:PATH}
GIT_SSH=$${slaprunner:ssh_client} GIT_SSH=$${slaprunner:ssh_client}
[slapos-repo]
recipe = slapos.recipe.build:gitclone
repository = $${slap-parameter:slapos-repository}
git-executable = ${git:location}/bin/git
develop = true
location = $${directory:project}/slapos
[slapos-repo-config]
recipe = plone.recipe.command
stop-on-error = true
reference = $${slap-parameter:slapos-reference}
location = $${slapos-repo:location}
environment = export PATH=${git:location}/bin:$PATH;
command = $${:environment} (cd $${:location} && git checkout $${:reference} && SR=$${slap-parameter:slapos-software} && if [ -n "$SR" ]; then echo workspace/$${slap-parameter:slapos-software} > $${directory:etc}/.project; fi)
...@@ -22,8 +22,6 @@ ipv6_address = {{ ipv6 }} ...@@ -22,8 +22,6 @@ ipv6_address = {{ ipv6 }}
etc_dir = {{ etc_dir }} etc_dir = {{ etc_dir }}
run_dir = {{ run_dir }} run_dir = {{ run_dir }}
log_dir = {{ log_dir }} log_dir = {{ log_dir }}
default_repo = {{ default_repo }}
default_sr = {{ default_sr }}
auto_deploy = {{ auto_deploy }} auto_deploy = {{ auto_deploy }}
[slapproxy] [slapproxy]
......
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