Make sample job configurations self-contained
@@ -628,6 +628,8 @@ services:
<h3 id="job-type-docker">docker</h3>
<p>The job type docker is one of the most important jobs. You can use it to run any Docker container you like.</p>
<pre class="line-numbers"><code class="language-javascript">{
+ "version": 1,
+ "jobs": [{
"type": "docker",
"name": "build",
"docker_file": "infrabox/build-and-test/Dockerfile",
@@ -635,6 +637,7 @@ services:
"build_only": false,
"depends_on": ["other_job_name"],
"environment": { ... }
+ }]
}</code></pre>
<div class="table-responsive">
@@ -739,12 +742,15 @@ CMD /usr/bin/test.py
<p>An example docker-compose job definition:</p>
<pre class="line-numbers"><code class="language-javascript">{
+ "version": 1,
+ "jobs": [{
"type": "docker-compose",
"name": "test",
"docker_file": "infrabox/test/docker-compose.yml"
"resources": { "limits": { "cpu": 1, "memory": 1024 } },
"depends_on": ["other_job_name"],
"environment": { ... }
+ }]
}</code></pre>
<div class="table-responsive">
@@ -814,11 +820,14 @@ CMD /usr/bin/test.py
<p>It's not necessary to have all your job definitions in your own project. With the git job type you can include job definitions for any accessible git repository.</p>
<p>An example git job definition:</p>
<pre class="line-numbers"><code class="language-javascript">{
+ "version": 1,
+ "jobs": [{
"type": "git",
"name": "some-external-jobs",
"git_url": "https://github.com/InfraBox/examples.git",
"commit": "master",
"depends_on": ["other_job_name"]
+ }]
}</code></pre>
<div class="table-responsive">
@@ -876,10 +885,13 @@ CMD /usr/bin/test.py
<p>If you have many jobs you might want to structure them in different files.</p>
<p>An example job definition:</p>
<pre class="line-numbers"><code class="language-javascript">{
+ "version": 1,
+ "jobs": [{
"type": "workflow",
"name": "deploy",
"infrabox_file": "deployments.json",
"depends_on": ["test"]
+ }]
}</code></pre>
<div class="table-responsive">
