.gitlab-ci.yml 1.62 KB
Newer Older
Guillaume Perréal's avatar
Guillaume Perréal committed
1
default:
2
3
4
    tags: [docker]
    retry: 2
    interruptible: true
5
6
7
8
9
10
11
12

stages:
    - build
    - reduce

.job:
    image: ${DISTRO}:${CODENAME}
    stage: build
13
14
15
    variables:
        LANG: C
        DEBIAN_FRONTEND: noninteractive
16
17
    script:
        - apt-get update -yqq
18
        - apt-get install -yq php-cli
19
        - mkdir public
20
        - php ./map-exts.php > public/${DISTRO}-${CODENAME}.yml
21
22
23
24
25
26
27
    artifacts:
        name: php_packages-${DISTRO}-${CODENAME}
        paths:
            - public/

debian:
    extends: .job
28
29
    variables:
        DISTRO: debian
30
31
    parallel:
        matrix:
32
            - CODENAME: [stretch, buster]
33
    before_script:
34
        - apt-get update -yqq
35
        - apt-get install -yqq apt-transport-https ca-certificates curl
36
37
        - curl -sSL -o /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
        - echo "deb https://packages.sury.org/php/ $CODENAME main" > /etc/apt/sources.list.d/php.list
38
39
40
41

ubuntu:
    extends: .job
    variables:
42
        DISTRO: ubuntu
43
44
        CODENAME: xenial
    before_script:
45
        - apt-get update -yqq
46
47
        - apt-get install -yqq apt-transport-https ca-certificates curl gnupg
        - gpg --keyserver keyserver.ubuntu.com --recv-keys 14AA40EC0831756756D7F66C4F4EA0AAE5267A6C
48
49
        - gpg --export 14AA40EC0831756756D7F66C4F4EA0AAE5267A6C | apt-key add -
        - echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu $CODENAME main" > /etc/apt/sources.list.d/php.list
50
51
52
53
54
55
56
57
58
59
60
61
62

archive:
    image: busybox
    stage: reduce
    needs:
        - debian
        - ubuntu
    script:
        - ls public/
    artifacts:
        name: php_packages
        paths:
            - public/