summaryrefslogtreecommitdiff
path: root/index.mdwn
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2018-06-25 22:05:02 +0300
committerLars Wirzenius <liw@liw.fi>2018-06-25 22:05:02 +0300
commita7e2c846880924168a94218ed6205b1e44f8aeda (patch)
tree7c8f0b2ec4981f501f53bf5dd162fa8c303900c3 /index.mdwn
parent97b646ae48f51863e206803b7adf3e09dcf90502 (diff)
downloadick.liw.fi-a7e2c846880924168a94218ed6205b1e44f8aeda.tar.gz
Add: example of an .ick file to the front page
Diffstat (limited to 'index.mdwn')
-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
+