summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--index.mdwn78
1 files changed, 78 insertions, 0 deletions
diff --git a/index.mdwn b/index.mdwn
index 6883e63..638555b 100644
--- a/index.mdwn
+++ b/index.mdwn
@@ -24,3 +24,81 @@ Latest news from the project:
[[!inline pages="page(blog/*) and tagged(news)"
limit=5 template=titlepage archive=yes trail=no feeds=no]]
</div>
+
+
+# Example .ick file
+
+An .ick file defines projects and pipelines for ick. Here's an
+example:
+
+ projects:
+
+ # Define project to build a container "system tree": basically
+ # the "chroot" for the container.
+
+ - project: stretch_systree
+ pipelines:
+ - build_debian_systree
+ parameters:
+ debian_codename: stretch
+ packages:
+ - build-essential
+ - git
+ - jq
+ artifact_name: stretch_systree
+
+ # Define a project to say "hello, world" inside a container.x
+
+ - project: hello
+ pipelines:
+ - prepare_container
+ - hello
+ parameters:
+ systree_name: stretch_systree
+
+ pipelines:
+
+ # Define a pipeline of actions to build a system tree. Note
+ # that this is reuseable for different systrees, by the project
+ # giving it different parameters.
+
+ - pipeline: build_debian_systree
+ parameters:
+ - debian_codename
+ - packages
+ - artifact_name
+ actions:
+ - debootstrap: auto
+ mirror: http://deb.debian.org/debian
+ where: host
+
+ - shell: |
+ apt-get install -y python3
+ where: chroot
+
+ - python: |
+ import os, subprocess
+ def runcmd(argv, **kwargs):
+ subprocess.check_call(argv, **kwargs)
+ runcmd(['apt-get', 'install', '-y'] + params['packages'])
+ where: chroot
+
+ - archive: workspace
+ where: host
+
+ # Prepare container for building: get systree from artifact store.
+
+ - pipeline: prepare_container
+ actions:
+ - action: populate_systree
+ where: host
+
+ # Execute "echo hello, world" inside the container for a project.
+
+ - pipeline: hello
+ actions:
+ - shell: |
+ echo hello, world
+ pwd
+ where: container
+