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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
# 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
# systree_name parameter.
- pipeline: ick/setup_container
parameters:
- systree_name
actions:
- action: populate_systree
name_from: systree_name
where: host
# Archive current systree as the artifact named in the artifact_name
# parameter.
- pipeline: ick/archive_systree
parameters:
- artifact_name
actions:
- archive: systree
name_from: artifact_name
where: host
# In a Debian container, install packages listed in the packages
# parameter.
- pipeline: ick/install_debian_packages
parameters:
- packages
actions:
- python: |
import os, subprocess
def runcmd(argv, **kwargs):
subprocess.check_call(argv, **kwargs)
runcmd(['apt-get', 'install', '-y'] + params['packages'])
where: container
|