Commit cc5fe0ae authored by Antonio Terceiro's avatar Antonio Terceiro

Merge branch 'self-service-docs' into 'master'

self_service: add docs for JSON file upload

See merge request !101
parents bb3b2b0f ab34cc73
Pipeline #60486 passed with stage
in 10 minutes and 50 seconds
......@@ -16,12 +16,13 @@
</header>
<div class="col-xs-12">
<div class="page-header">
<h3>Upload JSON file</h3>
<h3>Send Request by Uploading JSON File</h3>
</div>
<form action="/selfservice/test/upload" method="post" enctype="multipart/form-data">
<div class="form-group">
<input name="tests" type="file" id="submit-json">
<p class="help-block">You can get an example JSON through exporting the filled-out form below.</p>
<p class="help-block">You can get an example JSON through exporting the filled-out form below or click <a
href="#json-doc">here</a> to view the thorough documentation.</p>
</div>
<div class="form-group">
<button type="submit" name="submit" class="btn btn-default" autocomplete="off">
......@@ -30,7 +31,7 @@
</div>
</form>
<div class="page-header">
<h3>Test Request Form</h3>
<h3>Send Request by Form</h3>
</div>
<form action="/selfservice/test/submit" method="post">
<div class="row">
......@@ -98,4 +99,85 @@
Export to JSON
</button>
</form>
</div>
<div id="json-doc" class="page-header">
<h3>Documentation for JSON file</h3>
</div>
<p>The request should be an <strong>array of Test Request objects</strong>.</p>
<h4>Test Request Object</h4>
<table class="table">
<thead>
<tr>
<th>property</th>
<th>type</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td>archs</td>
<td>Array of Architectures</td>
<td>Architectures available: <%= settings.archs %></td>
</tr>
<tr>
<td>suite</td>
<td>String</td>
<td>Suites available: <%= settings.suites %></td>
</tr>
<tr>
<td>tests</td>
<td>Array of Test Objects</td>
<td>See <strong>Test Object</strong></td>
</tr>
</tbody>
</table>
<h4>Test Object</h4>
<table class="table">
<thead>
<tr>
<th>property</th>
<th>type</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td>package</td>
<td>String</td>
<td>The package that the requestor wants to test</td>
</tr>
<tr>
<td>trigger</td>
<td>String (optional)</td>
<td>Works as an identifier for the requestor</td>
</tr>
<tr>
<td>pin-packages</td>
<td>Array of Pin-packages Arrays (optional)</td>
<td>See <strong>Pin-packages Array</strong></td>
</tr>
</tbody>
</table>
<h4>Pin-packages Array</h4>
<ul>
<li>An array of Strings with at least 2 elements</li>
<li>The last element should be a suite and can only be used <strong>once</strong>, Suites available: <%= settings.suites %></li>
<li><code>:bar</code> can be added to the pin-package to retrieve all binaries for the specified pin-package</li>
</ul>
<p>Example JSON file</p>
<pre><code>[
{
"archs": ["amd64"],
"suite": "unstable",
"tests": [
{
"trigger": "testpakcage v1.2",
"package": "testpackage",
"pin-packages": [
["src:bar", "unstable"],
["foo", "src:bar", "experimental"]
]
}
]
}
]</code></pre>
</div>
\ No newline at end of file
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