Commit 041b2cb4 authored by Nicolas Wavrant's avatar Nicolas Wavrant

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

parent 462b9ecf
...@@ -76,7 +76,7 @@ mode = 0644 ...@@ -76,7 +76,7 @@ mode = 0644
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-runner-import.cfg.in url = ${:_profile_base_location_}/instance-runner-import.cfg.in
output = ${buildout:directory}/instance-runner-import.cfg output = ${buildout:directory}/instance-runner-import.cfg
md5sum = c42b87357e0d47d22eb8ea377cd5f79f md5sum = 856eda762461264b21e46d17318e2bab
mode = 0644 mode = 0644
[template-runner-export-script] [template-runner-export-script]
......
...@@ -26,6 +26,7 @@ parts += ...@@ -26,6 +26,7 @@ parts +=
bash-profile bash-profile
supervisord-wrapper supervisord-wrapper
importer-consistency-promise importer-consistency-promise
software-release-deployment-promise
resilient-software-release-information resilient-software-release-information
# have to repeat the next one, as it's not inherited from pbsready-import # have to repeat the next one, as it's not inherited from pbsready-import
...@@ -106,6 +107,24 @@ input = inline: #!/bin/sh ...@@ -106,6 +107,24 @@ input = inline: #!/bin/sh
output = $${directory:promises}/importer-consistency-promise output = $${directory:promises}/importer-consistency-promise
mode = 755 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] [resilient-software-release-information]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${template-resilient-software-release-information:destination}/${template-resilient-software-release-information:filename} 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