.gitlab-ci.yml 2.34 KB
Newer Older
1
2
3
stages:
  - build
  - collect
zorun's avatar
zorun committed
4
5
6
7
8
9
10
11
12
13
14

build-debian-ubuntu:
  stage: build
  image: $DISTRO:$RELEASE
  before_script:
    - apt update && DEBIAN_FRONTEND=noninteractive apt-get install -y apt-transport-https curl gnupg2
    - curl -1sLf "https://dl.cloudsmith.io/public/isc/kea-${KEA_VERSION}/cfg/gpg/gpg.${GPG_KEY}.key" | apt-key add -
    - curl -1sLf "https://dl.cloudsmith.io/public/isc/kea-${KEA_VERSION}/cfg/setup/config.deb.txt?distro=${DISTRO}&codename=${RELEASE}" > /etc/apt/sources.list.d/isc-kea.list
    - apt update && DEBIAN_FRONTEND=noninteractive apt-get install -y isc-kea-dev libboost-dev g++ make
  script:
    - make -j
15
16
  after_script:
    - mv kea-hook-runscript.so kea-hook-runscript-kea-${KEA_VERSION}-${DISTRO}-${RELEASE}.so
zorun's avatar
zorun committed
17
18
19
20
21
  rules:
    - changes:
      - .gitlab-ci.yml
      - src/*
      - Makefile
22
      - CHANGELOG.md
zorun's avatar
zorun committed
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
  parallel:
    matrix:
      - KEA_VERSION: "1-6"
        GPG_KEY: "0607E2621F1564A6"
        DISTRO: debian
        RELEASE: [stretch, buster]
      - KEA_VERSION: "1-7"
        GPG_KEY: "40544590508A17DE"
        DISTRO: debian
        RELEASE: [stretch, buster]
      - KEA_VERSION: "1-8"
        GPG_KEY: "4DD5AE28ADA7268E"
        DISTRO: debian
        RELEASE: [stretch, buster]
      - KEA_VERSION: "1-9"
        GPG_KEY: "5DC67B0A74E30739"
        DISTRO: debian
        RELEASE: [stretch, buster]
      - KEA_VERSION: "1-6"
        GPG_KEY: "0607E2621F1564A6"
        DISTRO: ubuntu
        RELEASE: [bionic]
      - KEA_VERSION: "1-7"
        GPG_KEY: "40544590508A17DE"
        DISTRO: ubuntu
        RELEASE: [bionic, focal]
      - KEA_VERSION: "1-8"
        GPG_KEY: "4DD5AE28ADA7268E"
        DISTRO: ubuntu
        RELEASE: [bionic, focal]
      - KEA_VERSION: "1-9"
        GPG_KEY: "5DC67B0A74E30739"
        DISTRO: ubuntu
        RELEASE: [bionic, focal]
  artifacts:
    paths:
59
      - kea-hook-runscript*.so
60
    expire_in: 2 days
61
62

# Collect all artifacts in the same job: easier to browse
63
collect-artifacts-snapshot:
64
  stage: collect
65
  allow_failure: true
66
67
68
69
70
  script:
    - ls -lh kea-hook-runscript*.so
  artifacts:
    paths:
      - kea-hook-runscript*.so
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
    expire_in: 15 days
  except:
    - tags

# Same for tagged releases, with no expiration
collect-artifacts-release:
  stage: collect
  script:
    - ls -lh kea-hook-runscript*.so
  artifacts:
    paths:
      - kea-hook-runscript*.so
    expire_in: never
  only:
    - tags