docs/ftest/tutorial-new-specimen/index.html

294 lines
8.6 KiB
HTML

<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="https://docs.forgeflux.org/main.css">
<link rel="icon" href="https://forgeflux.org/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<title> Docs | [Tutorial] Add new specimen </title>
</head>
<body>
<main>
<nav>
<a href="https:&#x2F;&#x2F;docs.forgeflux.org">
<img src="/logo.svg" alt="" />
</a>
<a href="javascript:void(0);" onclick="burger()" id="mobile" class="ms-Icon--GlobalNavButton"></a>
<div id="trees">
<input class="tree-toggle" type="checkbox" id="ftest"
checked />
<label class="tree-toggle-label" for="ftest">ftest</label>
<ul class="subtree">
<li >
<a href="https://docs.forgeflux.org/ftest/introduction/">Introducing ftest</a>
</li>
<li >
<a href="https://docs.forgeflux.org/ftest/cli/">Using ftest CLI</a>
</li>
<li >
<a href="https://docs.forgeflux.org/ftest/terminology/">Terminology</a>
</li>
<li >
<a href="https://docs.forgeflux.org/ftest/quick-links/">Quick Links</a>
</li>
<li >
<a href="https://docs.forgeflux.org/ftest/ftest-toml/">ftest.toml</a>
</li>
<li >
<a href="https://docs.forgeflux.org/ftest/tests/">Tests</a>
</li>
<li class="active">
<a href="https://docs.forgeflux.org/ftest/tutorial-new-specimen/">[Tutorial] Add new specimen</a>
</li>
<ul id="toc">
<li><a href="https://docs.forgeflux.org/ftest/tutorial-new-specimen/#how-to-add-new-specimen">How to add new specimen</a>
<ul>
<li><a href="https://docs.forgeflux.org/ftest/tutorial-new-specimen/#1-fork-the-control-repository">1. Fork the control repository.</a></li>
<li><a href="https://docs.forgeflux.org/ftest/tutorial-new-specimen/#2-create-specimen-subdirectory">2. Create specimen subdirectory</a></li>
<li><a href="https://docs.forgeflux.org/ftest/tutorial-new-specimen/#3-create-docker-compose-yml">3. Create docker-compose.yml:</a></li>
<li><a href="https://docs.forgeflux.org/ftest/tutorial-new-specimen/#4-create-job-manifest">4. Create job manifest</a></li>
</ul>
</li>
</ul>
</ul>
<input class="tree-toggle" type="checkbox" id="interface"
/>
<label class="tree-toggle-label" for="interface">Interface</label>
<ul class="subtree">
<li >
<a href="https://docs.forgeflux.org/Interface/about/">About Interface</a>
</li>
</ul>
<input class="tree-toggle" type="checkbox" id="northstar"
/>
<label class="tree-toggle-label" for="northstar">Northstar</label>
<ul class="subtree">
<li >
<a href="https://docs.forgeflux.org/Northstar/about/">About Northstar</a>
</li>
</ul>
<input class="tree-toggle" type="checkbox" id="updates"
/>
<label class="tree-toggle-label" for="updates">Updates</label>
<ul class="subtree">
<li >
<a href="https://docs.forgeflux.org/updates/december2020/">December 2020</a>
</li>
<li >
<a href="https://docs.forgeflux.org/updates/november2020/">November 2020</a>
</li>
<li >
<a href="https://docs.forgeflux.org/updates/october2020/">October 2020</a>
</li>
<li >
<a href="https://docs.forgeflux.org/updates/september2020/">September 2020</a>
</li>
</ul>
</div>
</nav>
<article>
<div id="on_right">
<span id="search-ico" class="ms-Icon--Search"></span>
</div>
<div class="search-container">
<input id="search" type="search" placeholder="Search as you type...">
<div class="search-results">
<div class="search-results__header"></div>
<ul class="search-results__items"></ul>
</div>
</div>
<div id="wrap">
<h2 id="how-to-add-new-specimen">How to add new specimen&nbsp;<a class="anchor" href="#how-to-add-new-specimen">&#xE732;</a></h2>
<h3 id="1-fork-the-control-repository">1. Fork the <a href="https://docs.forgeflux.org/ftest/terminology/#control-repository">control repository</a>.&nbsp;<a class="anchor" href="#1-fork-the-control-repository">&#xE732;</a></h3>
<pre style="background-color:#eff1f5;color:#4f5b66;"><code><span>git clone https://git.batsense.net/ForgeFlux/ftest-control
</span></code></pre>
<h3 id="2-create-specimen-subdirectory">2. Create specimen subdirectory&nbsp;<a class="anchor" href="#2-create-specimen-subdirectory">&#xE732;</a></h3>
<p>If <a href="https://docs.forgeflux.org/ftest/terminology/#specimen">specimen</a> doesn't exist within <code>targets/</code> directory, then create subdirectory for it:</p>
<pre data-lang="bash" style="background-color:#eff1f5;color:#4f5b66;" class="language-bash "><code class="language-bash" data-lang="bash"><span style="color:#bf616a;">mkdir</span><span> targets/&lt;insert-specimen-name&gt;
</span><span style="color:#96b5b4;">cd</span><span> targets/&lt;insert-specimen-name&gt;
</span></code></pre>
<h3 id="3-create-docker-compose-yml">3. Create docker-compose.yml:&nbsp;<a class="anchor" href="#3-create-docker-compose-yml">&#xE732;</a></h3>
<pre data-lang="bash" style="background-color:#eff1f5;color:#4f5b66;" class="language-bash "><code class="language-bash" data-lang="bash"><span style="color:#bf616a;">touch</span><span> docker-compose.yml
</span></code></pre>
<p>Populate docker-compose.yml with instructions to spin up a test
environment for the specimen. The specimen's upstream sources
will include a reference docker-compose file should be fine in most cases.</p>
<h3 id="4-create-job-manifest">4. Create job manifest&nbsp;<a class="anchor" href="#4-create-job-manifest">&#xE732;</a></h3>
<p>Job manifest is defined in <code>ftest.toml</code> file in the specimen's
subdirectory. It can contain information on:</p>
<h4 id="initialization-code">Initialization code&nbsp;<a class="anchor" href="#initialization-code">&#xE732;</a></h4>
<p>needs to be run to prepare the test environment.</p>
</div>
</article>
</main>
<script type="text/javascript" src="https://docs.forgeflux.org/elasticlunr.min.js" defer></script>
<script type="text/javascript" src="https://docs.forgeflux.org/search_index.en.js" defer></script>
<script type="text/javascript" src="https://docs.forgeflux.org/js.js" defer></script>
</body>
</html>