summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/base/agl-base.jinja23
-rw-r--r--templates/base/agl-callback.jinja211
-rw-r--r--templates/callback/callback_readme.txt19
3 files changed, 33 insertions, 0 deletions
diff --git a/templates/base/agl-base.jinja2 b/templates/base/agl-base.jinja2
index 1119aaa..f717ef6 100644
--- a/templates/base/agl-base.jinja2
+++ b/templates/base/agl-base.jinja2
@@ -4,6 +4,9 @@
metadata:
image.type: 'AGL'
{% endblock %}
+{% if callback_name %}
+{% include 'base/agl-callback.jinja2' %}
+{% endif %}
{%- block main %}
device_type: {{ device_type }}
job_name: {{ name }}
diff --git a/templates/base/agl-callback.jinja2 b/templates/base/agl-callback.jinja2
new file mode 100644
index 0000000..6798b17
--- /dev/null
+++ b/templates/base/agl-callback.jinja2
@@ -0,0 +1,11 @@
+{%- block notify -%}
+notify:
+ criteria:
+ status: finished
+ callback:
+ url: {{ backend_fqdn }}/callback/{{ callback_name }}?lab_name={{ lab_name }}&status={STATUS}&status_string={STATUS_STRING}
+ method: POST
+ dataset: all
+ token: {{ lab_token }}
+ content-type: json
+{%- endblock %}
diff --git a/templates/callback/callback_readme.txt b/templates/callback/callback_readme.txt
new file mode 100644
index 0000000..7bfed0d
--- /dev/null
+++ b/templates/callback/callback_readme.txt
@@ -0,0 +1,19 @@
+## The callbacks info must be in this repo ##
+- - - -
+
+### Requirements: ###
+
+* Filetype: .cfg
+* Filename: <LAB_NAME>.cfg
+ * [default] section
+ * backend_fqdn = "The FQDN of the kernelCI backend to callback"
+ * lab_name = "The lab name as registered for the kernelCI backend"
+ * lab_token = "The kernelCI backend lab token"
+
+Example file: lab-mylab.cfg
+`
+[default]
+backend_fqdn = http(s)://api.mylab.com
+lab_name = lab-mylab
+lab_token = 123g5789-45f4-4f21-a485-7412589df235
+`