[buildout]
extends =
  buildout.hash.cfg
  https://lab.nexedi.com/nexedi/slapos/raw/1.0.232/software/kvm/software.cfg
parts =
  python-with-eggs
  template-deploy-test
  runTestSuite_py
  playbook

[runTestSuite_py]
recipe = zc.recipe.egg
eggs =
  erp5.util
  requests
interpreter = ${:_buildout_section_name_}

[python2.7-with-eggs]
# create interpreters named "python" and "python2.7" so that
# instance profile can use them in $PATH
recipe = plone.recipe.command

location = ${buildout:parts-directory}/${:_buildout_section_name_}
stop-on-error = true
command =
  rm -fr ${:location} &&
  mkdir -p ${:location} &&
  ln -s ${buildout:bin-directory}/${python-with-eggs:interpreter} ${:location}/python &&
  ln -s ${buildout:bin-directory}/${python-with-eggs:interpreter} ${:location}/python2.7
update-command = ${:command}

[playbook]
recipe = plone.recipe.command

stop-on-error = true
environment = export PATH=${tar:location}/bin:${gzip:location}/bin:$PATH
location = ${buildout:parts-directory}/${:_buildout_section_name_}
output = ${:location}/playbook.tar.gz
command =
  ${:environment}
  rm -fr ${:location}
  mkdir -p ${:location}
  cd ${slapos-package:location}/playbook
  tar czf ${:output} .
update-command = ${:command}

[test-location]
base = ${slapos-package:location}

[slapos-package]
recipe = slapos.recipe.build:gitclone
repository = https://lab.nexedi.com/nexedi/slapos.package.git
branch = cdn-test
git-executable = ${git:location}/bin/git

[template]
output = ${buildout:directory}/template-original.kvm.cfg

[deploy-script-controller-script]
location = ${:_profile_base_location_}/${:filename}
# configuration
waittime = 360
tries = 80

[standalone-local-playbook]
filename = standalone-local-playbook
location = ${:_profile_base_location_}/${:filename}

[template-deploy-test]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/template.cfg
mode = 0644

[versions]
erp5.util = 0.4.69