Commit eb9b6b95 authored by Xiaowu Zhang's avatar Xiaowu Zhang

stack/erp5: use download recipe for templating

parent 1d0f5117
...@@ -158,13 +158,6 @@ rendered = ${buildout:directory}/instance-caucase.cfg ...@@ -158,13 +158,6 @@ rendered = ${buildout:directory}/instance-caucase.cfg
<= download-base-neo <= download-base-neo
url = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
[template-run-zelenium]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/template/run-zelenium-test.py.in
md5sum = 8c42f98228f0ae9dc16ee2dab739b818
output = ${buildout:directory}/run-zelenium-test.py.in
mode = 755
[check-recipe] [check-recipe]
recipe = plone.recipe.command recipe = plone.recipe.command
stop-on-error = true stop-on-error = true
...@@ -224,6 +217,10 @@ link-binary = ...@@ -224,6 +217,10 @@ link-binary =
[template-postfix-aliases] [template-postfix-aliases]
< = download-base < = download-base
[template-run-zelenium]
< = download-base
url = ${:_profile_base_location_}/template/run-zelenium-test.py.in
  • Why customise url when the rest of the file does not customise it, and the only purpose of download-base is to automatically build that URL to begin with ?

    Where is the checksum verified ? This section is not present in buildout.hash.cfg.

    What is the expected filename once downloaded ? The other sections specify that name by declaring homonymous sections in buildout.hash.cfg.

  • Also, please do not use a subfolder for a single template when the rest of the SR is careful to not use a subfolder.

    The reason of this being precisely to support buildout.hash.cfg in a portable manner.

  • it seems i forget to do checksum, i'll change it as others and remove subfolder(i don't remember why i add a subfolder)

Please register or sign in to reply
[template] [template]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
# XXX: "template.cfg" is hardcoded in instanciation recipe # XXX: "template.cfg" is hardcoded in instanciation recipe
...@@ -292,7 +289,8 @@ context = ...@@ -292,7 +289,8 @@ context =
key root_common root-common:target key root_common root-common:target
key site_zcml site-zcml:target key site_zcml site-zcml:target
key sixtunnel_location 6tunnel:location key sixtunnel_location 6tunnel:location
key template_run_zelenium template-run-zelenium:output key template_run_zelenium template-run-zelenium:target
key egg_interpreter eggs:interpreter
key stunnel_location stunnel:location key stunnel_location stunnel:location
key template_apache_conf template-apache-backend-conf:target key template_apache_conf template-apache-backend-conf:target
key template_balancer template-balancer:target key template_balancer template-balancer:target
......
...@@ -66,7 +66,7 @@ md5sum = 0969fbb25b05c02ef3c2d437b2f4e1a0 ...@@ -66,7 +66,7 @@ md5sum = 0969fbb25b05c02ef3c2d437b2f4e1a0
[template] [template]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = e9229b6b3ca344a094f63fef2c7fc2a1 md5sum = a5e8278067899081239d4366cf2b9eae
[monitor-template-dummy] [monitor-template-dummy]
filename = dummy.cfg filename = dummy.cfg
...@@ -82,7 +82,7 @@ md5sum = 3e650915959ff31c9c13c84069bbcd35 ...@@ -82,7 +82,7 @@ md5sum = 3e650915959ff31c9c13c84069bbcd35
[template-zope] [template-zope]
filename = instance-zope.cfg.in filename = instance-zope.cfg.in
md5sum = bec70aec9d8961f17b4c93d797cc67f9 md5sum = ea20f40f33f8d6f702b43f9e25bd516e
[template-balancer] [template-balancer]
filename = instance-balancer.cfg.in filename = instance-balancer.cfg.in
......
...@@ -73,17 +73,19 @@ ca-crl = ${directory:test-ca-crl} ...@@ -73,17 +73,19 @@ ca-crl = ${directory:test-ca-crl}
configuration = {{ dumps(saucelabs_dict) }} configuration = {{ dumps(saucelabs_dict) }}
user = {{ dumps(slapparameter_dict['inituser-login']) }} user = {{ dumps(slapparameter_dict['inituser-login']) }}
password = {{ dumps(slapparameter_dict['inituser-password']) }} password = {{ dumps(slapparameter_dict['inituser-password']) }}
binPath = {{ bin_directory }}/{{ parameter_dict['egg-interpreter'] }}
[{{ section('test-zelenium-runner') }}] [{{ section('test-zelenium-runner') }}]
recipe = slapos.recipe.template:jinja2 <= jinja2-template-base
template = {{ parameter_dict['run-zelenium-template'] }} template = {{ parameter_dict['run-zelenium-template'] }}
rendered = ${directory:bin}/runTestSuite rendered = ${directory:bin}/runTestSuite
extensions = jinja2.ext.do mode = 755
context = context =
import json_module json import json_module json
key configuration test-zelenium-runner-parameter:configuration key configuration test-zelenium-runner-parameter:configuration
key user test-zelenium-runner-parameter:user key user test-zelenium-runner-parameter:user
key password test-zelenium-runner-parameter:password key password test-zelenium-runner-parameter:password
key binPath test-zelenium-runner-parameter:binPath
{% else -%} {% else -%}
{% if slapparameter_dict['mysql-test-url-list'] -%} {% if slapparameter_dict['mysql-test-url-list'] -%}
[{{ section('run-unit-test-userhosts-wrapper') }}] [{{ section('run-unit-test-userhosts-wrapper') }}]
......
...@@ -97,6 +97,7 @@ template-monitor = {{ dumps(template_monitor) }} ...@@ -97,6 +97,7 @@ template-monitor = {{ dumps(template_monitor) }}
extra-path-list = {{ dumps(extra_path_list) }} extra-path-list = {{ dumps(extra_path_list) }}
matplotlibrc = {{ matplotlibrc_location }} matplotlibrc = {{ matplotlibrc_location }}
erp5-location = {{ erp5_location }} erp5-location = {{ erp5_location }}
egg-interpreter = {{egg_interpreter}}
[dynamic-template-zope] [dynamic-template-zope]
<= jinja2-template-base <= jinja2-template-base
......
#!${buildout:directory}/bin/${eggs:interpreter} #!{{ binPath }}
# BEWARE: This file is operated by slapgrid # BEWARE: This file is operated by slapgrid
# BEWARE: It will be overwritten automatically # BEWARE: It will be overwritten automatically
......
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