config 2.02 KB
Newer Older
boklm's avatar
boklm committed
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
# vim: filetype=yaml sw=2
filename: 'container-image_[% c("var/container/suite") %]-[% c("var/container/arch") %].tar.gz'
pkg_type: build

var:
  ubuntu_version: 17.04

  container_dir: '[% c("tmp_dir") %]/rbm-containers/[% sha256(c("build_id")) %]'
  container_user: rbm

  container:
    use_container: 1
    # We need CAP_SYS_ADMIN for debootstrap to work
    CAP_SYS_ADMIN: 1

pre: |
  #!/bin/sh
  set -e
  apt-get update -y
  apt-get install -y debian-archive-keyring ubuntu-keyring debootstrap
  debootstrap --arch=[% c("var/container/arch") %] [% c("var/container/debootstrap_opt") %] [% c("var/container/suite") %] base-image [% c("var/container/debootstrap_mirror") %]
  tar -C ./base-image -czf [% dest_dir %]/[% c("filename") %] .

targets:
  wheezy-amd64:
    var:
      container:
        suite: wheezy
        arch: amd64
30
31
32
33
34
  wheezy-i386:
    var:
      container:
        suite: wheezy
        arch: i386
boklm's avatar
boklm committed
35
36
37
38
39
  jessie-amd64:
    var:
      container:
        suite: jessie
        arch: amd64
40
41
42
43
44
  jessie-i386:
    var:
      container:
        suite: jessie
        arch: i386
boklm's avatar
boklm committed
45
46
47
48
49
50
  precise-amd64:
    var:
      container:
        suite: precise
        arch: amd64
        debootstrap_opt: --keyring=/usr/share/keyrings/ubuntu-archive-removed-keys.gpg
51
52
53
54
55
56
  precise-i386:
    var:
      container:
        suite: precise
        arch: i386
        debootstrap_opt: --keyring=/usr/share/keyrings/ubuntu-archive-removed-keys.gpg
boklm's avatar
boklm committed
57
58
59
60
61
62
  utopic-amd64:
    var:
      container:
        suite: utopic
        arch: amd64
        debootstrap_mirror: http://old-releases.ubuntu.com/ubuntu/
63
64
65
66
67
68
  utopic-i386:
    var:
      container:
        suite: utopic
        arch: i386
        debootstrap_mirror: http://old-releases.ubuntu.com/ubuntu/
boklm's avatar
boklm committed
69
70
71
72
73
74

input_files:
  - URL: 'http://cdimage.ubuntu.com/ubuntu-base/releases/[% c("var/ubuntu_version") %]/release/ubuntu-base-[% c("var/ubuntu_version") %]-base-amd64.tar.gz'
    filename: 'container-image_ubuntu-base-[% c("var/ubuntu_version") %]-base-amd64.tar.gz'
    sha256sum: df2c8fd540e474b8e1e29c0db8ed6b43a932918f1b9a8149bb82104a7c07ba2a