Commit 89b6630e authored by Nicolas Wavrant's avatar Nicolas Wavrant

slaprunner: adds promise to test that Software Release is correctly deployed on import instance

parent 91491325
......@@ -76,7 +76,7 @@ mode = 0644
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-runner-import.cfg.in
output = ${buildout:directory}/instance-runner-import.cfg
md5sum = 5234b94f24d57d43e3cd29ccabb2b119
md5sum = 4db13f6fad1483bf7c663a1485e56098
mode = 0644
[template-runner-export-script]
......
......@@ -26,6 +26,7 @@ parts +=
bash-profile
supervisord-wrapper
importer-consistency-promise
software-release-deployment-promise
resilient-software-release-information
# have to repeat the next one, as it's not inherited from pbsready-import
......@@ -106,6 +107,24 @@ input = inline: #!/bin/sh
output = $${directory:promises}/importer-consistency-promise
mode = 755
[software-release-deployment-promise]
recipe = collective.recipe.template
input = inline: #!/bin/sh
PROJECT_FILE=$(find "$${directory:etc}" -maxdepth 1 -name .project)
if [ -z "$PROJECT_FILE" ]; then
exit 0;
else
INSTALLATION_FILE=$(find "$${runnerdirectory:software-root}" -mindepth 2 -maxdepth 2 -name .completed)
if [ -n "$INSTALLATION_FILE" ]; then
exit 0;
else
exit 1;
fi
fi
exit 1
output = $${directory:promises}/software-release-deployment-promise
mode = 755
[resilient-software-release-information]
recipe = slapos.recipe.template
url = ${template-resilient-software-release-information:destination}/${template-resilient-software-release-information:filename}
......
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