Commit 2772191c by Kirill Smelkov

gitlab: Add helper to set up promise to check something via url

Like with [promise-wrapper] a recipe could do

    [promise-<service>]
    <= promise-byurl
    url     = ...

and a script to check such ur will be generated and automatically put
into etc/promise/<service>.

/cc @kazuhiko, @jerome
1 parent 5dc6321c
......@@ -326,6 +326,13 @@ tune-command =
recipe = slapos.cookbook:wrapper
wrapper-path = !py! '${directory:promise}/' + '${:_buildout_section_name_}'[8:]
# [promise-<something>] to check <something> by url
[promise-byurl]
recipe = slapos.cookbook:check_url_available
path = !py! '${directory:promise}/' + '${:_buildout_section_name_}'[8:]
dash_path = {{ bash_bin }}
curl_path = {{ curl_bin }}
http_code = 200
......
......@@ -30,7 +30,9 @@ context =
raw gitlab_shell_repository_location ${gitlab-shell-repository:location}
# program binaries
raw bash_bin ${bash:location}/bin/bash
raw bundler_4gitlab ${bundler-4gitlab:bundle}
raw curl_bin ${curl:location}/bin/curl
raw dcron_bin ${dcron-output:crond}
raw git ${git:location}/bin/git
raw gunzip_bin ${gzip:location}/bin/gunzip
......
......@@ -14,6 +14,8 @@ extends =
../../component/nginx/buildout.cfg
# for instance
../../component/bash/buildout.cfg
../../component/curl/buildout.cfg
../../component/gzip/buildout.cfg
../../component/dcron/buildout.cfg
../../component/logrotate/buildout.cfg
......@@ -39,6 +41,8 @@ parts =
slapos-cookbook
eggs
bash
curl
gzip
dcron-output
logrotate
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!