From a7e2c846880924168a94218ed6205b1e44f8aeda Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Mon, 25 Jun 2018 22:05:02 +0300 Subject: Add: example of an .ick file to the front page --- index.mdwn | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) (limited to 'index.mdwn') 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]] + + +# 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 + -- cgit v1.2.1