summaryrefslogtreecommitdiff
path: root/pipelines/systrees.ick
blob: d675a487f7d3d861e16969dd3ac11e4bed2fb83f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Lars Wirzenius.
# 
# Feel free to use this as you wish. It is simple enough that it is
# probably not even copyrightable.

pipelines:

  # Build a Debian systree. Save it as an artifact named in the
  # artifact_name parameter. The debian_codename parameter specifies
  # the Debian release to be used. The packages parameter names
  # addtional Debian packages to install into the systree. The systree
  # will get the following packages added unconditionally: python3,
  # jq, gnupg.

  - pipeline: ick/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 jq gnupg
        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: use the artifact named in the
  # artifact_name parameter.

  - pipeline: ick/setup_container
    parameters:
      - artifact_name
    actions:
      - action: populate_systree
        where: host