.gitlab-ci.yml 2.01 KB
Newer Older
James T. Lee's avatar
James T. Lee committed
1
---
2
.template: &template
3
  image: '${CI_REGISTRY}/nest/tools/buildah:${CI_HOST_CPU}'
James T. Lee's avatar
James T. Lee committed
4
  stage: 'build'
5
  tags: ['nest']
6
  script:
7
    - 'mkdir -p debug/usr/lib/debug'
8
    - 'buildah login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$CI_REGISTRY"'
9
    - 'buildah bud --security-opt seccomp=unconfined
James T. Lee's avatar
James T. Lee committed
10
                   --ulimit nofile=1048576
11
                   --build-arg STAGE0_TAG="$CPU"
12
                   --build-arg FACTER_emerge_default_opts="$CI_HOST_EMERGE_DEFAULT_OPTS"
James T. Lee's avatar
James T. Lee committed
13
                   --build-arg FACTER_makeopts="$CI_HOST_MAKEOPTS"
14
15
                   --build-arg PROFILE="${CPU}/${ROLE}"
                   -v "/usr/bin/qemu-${QEMU_ARCH}:/usr/bin/qemu-${QEMU_ARCH}:ro"
James T. Lee's avatar
James T. Lee committed
16
17
                   -v "${PUPPET_CERTIFICATE}:/etc/puppetlabs/puppet/ssl/certs/ci.pem"
                   -v "${PUPPET_PRIVATE_KEY}:/etc/puppetlabs/puppet/ssl/private_keys/ci.pem"
18
                   -v "${PWD}/debug/usr/lib/debug:/usr/lib/debug"
19
                   -v /nest:/nest
20
21
22
23
24
                   -t "${CI_REGISTRY_IMAGE}:${CPU}-${ROLE}" .'
    - 'buildah bud --build-arg STAGE0_TAG="$CPU" -t "${CI_REGISTRY_IMAGE}/debug:${CPU}-${ROLE}" -f Containerfile.debug .'
    - 'buildah push "${CI_REGISTRY_IMAGE}:${CPU}-${ROLE}"'
    - 'buildah push "${CI_REGISTRY_IMAGE}/debug:${CPU}-${ROLE}"'

25
26
27
28
29
30
31
32
33
'Build haswell-server':
  <<: *template
  variables:
    CPU: 'haswell'
    ROLE: 'server'
    QEMU_ARCH: 'x86_64'

'Build haswell-workstation':
  <<: *template
34
35
36
37
  variables:
    CPU: 'haswell'
    ROLE: 'workstation'
    QEMU_ARCH: 'x86_64'
38
39
40
41
42
43
44

'Build cortex-a72-a53-crypto-workstation':
  <<: *template
  variables:
    CPU: 'cortex-a72-a53-crypto'
    ROLE: 'workstation'
    QEMU_ARCH: 'aarch64'
45
46

'Build cortex-a72-workstation':
47
  <<: *template
48
49
50
51
  variables:
    CPU: 'cortex-a72'
    ROLE: 'workstation'
    QEMU_ARCH: 'aarch64'
52

James T. Lee's avatar
James T. Lee committed
53
54
55
56
57
58
59
'Build cortex-a53-crypto-server':
  <<: *template
  variables:
    CPU: 'cortex-a53-crypto'
    ROLE: 'server'
    QEMU_ARCH: 'aarch64'

60
61
62
63
64
65
'Build cortex-a8-server':
  <<: *template
  variables:
    CPU: 'cortex-a8'
    ROLE: 'server'
    QEMU_ARCH: 'arm'