From 02ac8472d115d7a92723a7d0409f72bbe5e862e9 Mon Sep 17 00:00:00 2001 From: Benjamin Blanc <benjamin.blanc@tiolive.com> Date: Tue, 11 Jun 2013 11:15:52 +0200 Subject: [PATCH] Change code in order to use local erp5 code --- slapos/recipe/erp5testnode/__init__.py | 1 + software/erp5testnode/instance-default.cfg | 2 +- software/erp5testnode/software.cfg | 30 +++++++++++----------- stack/erp5/buildout.cfg | 4 ++- 4 files changed, 20 insertions(+), 17 deletions(-) diff --git a/slapos/recipe/erp5testnode/__init__.py b/slapos/recipe/erp5testnode/__init__.py index d39a87a6e..8b08e3cf0 100644 --- a/slapos/recipe/erp5testnode/__init__.py +++ b/slapos/recipe/erp5testnode/__init__.py @@ -89,6 +89,7 @@ class Recipe(GenericBaseRecipe): ip=self.options['httpd-ip'], port=self.options['httpd-port'], error_log=os.path.join(self.options['httpd-log-directory'], + testnode_srv_directory=self.options['srv-directory'], 'httpd-error.log'), access_log=os.path.join(self.options['httpd-log-directory'], 'httpd-access.log'), diff --git a/software/erp5testnode/instance-default.cfg b/software/erp5testnode/instance-default.cfg index 8aae80e07..c4973322e 100644 --- a/software/erp5testnode/instance-default.cfg +++ b/software/erp5testnode/instance-default.cfg @@ -26,13 +26,13 @@ pwgen-binary = ${pwgen:location}/bin/pwgen [testnode] recipe = slapos.cookbook:erp5testnode - slapos-directory = $${directory:slapos} working-directory = $${directory:testnode} test-suite-directory = $${directory:test-suite} proxy-host = $${slap-network-information:global-ipv6} proxy-port = 5000 log-directory = $${directory:log} +srv-directory = $${rootdirectory:srv} run-directory = $${directory:run} test-node-title = $${slap-parameter:test-node-title} node-quantity = $${slap-parameter:node-quantity} diff --git a/software/erp5testnode/software.cfg b/software/erp5testnode/software.cfg index 3f55e7e12..fe1b97aee 100644 --- a/software/erp5testnode/software.cfg +++ b/software/erp5testnode/software.cfg @@ -1,6 +1,7 @@ [buildout] -find-links += http://dist.repoze.org +find-links += http://192.168.242.75:1235/ + http://dist.repoze.org http://www.nexedi.org/static/packages/source/ extends = @@ -26,6 +27,7 @@ parts = template lxml-python eggs + testnode zip git apache @@ -36,7 +38,9 @@ recipe = plone.recipe.command stop-on-error = true location = ${buildout:parts-directory}/${:_buildout_section_name_} #command = ${git:location}/bin/git clone --branch erp5testnode --quiet http://git.erp5.org/repos/slapos.git ${:location} -command = ${git:location}/bin/git clone --branch erp5testnode --quiet http://192.168.242.75:1236/slapdev.git ${:location} +branch = erp5testnode +repository = http://192.168.242.75:1236/slapdev.git +command = ${git:location}/bin/git clone --branch ${:branch} ${:repository} ${:location} update-command = cd "${:location}" && "${git:location}/bin/git" fetch --quiet && "${git:location}/bin/git" reset --hard @{upstream} [check-recipe] @@ -45,19 +49,6 @@ stop-on-error = true update-command = ${:command} command = grep parts ${buildout:develop-eggs-directory}/slapos.cookbook.egg-link -[scalability_testnode] -#The plone.recipe.command buildout recipe allows you to run a command when a buildout part is installed or updated -recipe = plone.recipe.command -stop-on-error = true -location = ${buildout:parts-directory}/testnode -branch = scalability-master2 -#repository = http://git.erp5.org/repos/erp5.git -repository = http://192.168.242.75:1235/erp5.git -command = ${git:location}/bin/git clone --branch ${:branch} ${:repository} ${:location} -update-command = cd "${:location}" && "${git:location}/bin/git" fetch && "${git:location}/bin/git" reset --hard @{upstream} - - - [eggs] recipe = zc.recipe.egg eggs = @@ -70,6 +61,15 @@ eggs = PyXML [testnode] +#The plone.recipe.command buildout recipe allows you to run a command when a buildout part is installed or updated +recipe = plone.recipe.command +stop-on-error = true +location = ${buildout:parts-directory}/testnode +branch = scalability-master2 +#repository = http://git.erp5.org/repos/erp5.git +repository = http://192.168.242.75:1235/erp5.git +command = ${git:location}/bin/git clone --branch ${:branch} ${:repository} ${:location} +update-command = cd "${:location}" && "${git:location}/bin/git" fetch && "${git:location}/bin/git" reset --hard @{upstream} scripts = testnode = erp5.util.testnode:main diff --git a/stack/erp5/buildout.cfg b/stack/erp5/buildout.cfg index 18a7d22ef..7a9b1852f 100644 --- a/stack/erp5/buildout.cfg +++ b/stack/erp5/buildout.cfg @@ -149,9 +149,11 @@ parts = recipe = plone.recipe.command stop-on-error = true branch = erp5testnode +repository = http://192.168.242.75:1236/slapdev.git revision = location = ${buildout:parts-directory}/${:_buildout_section_name_} -command = "${git:location}/bin/git" clone --branch "${:branch}" --quiet http://git.erp5.org/repos/slapos.git "${:location}" && if [ -n "${:revision}" ]; then cd "${:location}" && "${git:location}/bin/git" reset --quiet --hard "${:revision}" ; fi +#command = "${git:location}/bin/git" clone --branch "${:branch}" --quiet http://git.erp5.org/repos/slapos.git "${:location}" && if [ -n "${:revision}" ]; then cd "${:location}" && "${git:location}/bin/git" reset --quiet --hard "${:revision}" ; fi +command = "${git:location}/bin/git" clone --branch "${:branch}" "${:repository}" "${:location}" && if [ -n "${:revision}" ]; then cd "${:location}" && "${git:location}/bin/git" reset --quiet --hard "${:revision}" ; fi update-command = cd "${:location}" && "${git:location}/bin/git" fetch --quiet && if [ -n "${:revision}" ]; then "${git:location}/bin/git" reset --hard "${:revision}"; else "${git:location}/bin/git" reset --quiet --hard @{upstream} ; fi [testnode] -- 2.30.9