.gitlab-ci.yml 2.72 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
stages:
  - build
  - deploy

build-debian-stretch:
  cache: {}
  stage: build
  image: debian:stretch
  artifacts:
    expire_in: 1h
    paths:
      - build-stretch
  script:
    - apt-get update
15
16
17
18
19
    - apt-get install
        -q -y --no-install-recommends
        -o Dpkg::Options::="--force-confdef"
        -o Dpkg::Options::="--force-confold"
         build-essential autoconf ruby ruby-dev libpcap-dev
20
21
22
23
24
25
26
27
28
29
    - gem install fpm
    - autoheader autoconf/configure.in
    - autoconf autoconf/configure.in > configure
    - chmod 755 configure
    - ./configure --enable-wall --with-debug-lvl=3 --prefix=/usr
    - make deb
    - rm -rf build-stretch
    - mkdir build-stretch
    - mv -v rude/rude*.deb crude/crude*.deb build-stretch/

Kolbjørn Barmen's avatar
Kolbjørn Barmen committed
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
build-debian-buster:
  cache: {}
  stage: build
  image: debian:buster
  artifacts:
    expire_in: 1h
    paths:
      - build-buster
  script:
    - apt-get update
    - apt-get install
        -q -y --no-install-recommends
        -o Dpkg::Options::="--force-confdef"
        -o Dpkg::Options::="--force-confold"
         build-essential autoconf ruby ruby-dev libpcap-dev
    - gem install fpm
    - autoheader autoconf/configure.in
    - autoconf autoconf/configure.in > configure
    - chmod 755 configure
    - ./configure --enable-wall --with-debug-lvl=3 --prefix=/usr
    - make deb
    - rm -rf build-buster
    - mkdir build-buster
    - mv -v rude/rude*.deb crude/crude*.deb build-buster/

55
56
57
deploy-apt:
  stage: deploy
  image: debian:stretch
Kolbjørn Barmen's avatar
Kolbjørn Barmen committed
58
  image: debian:buster
59
60
61
  artifacts:
    paths:
      - build-stretch
Kolbjørn Barmen's avatar
Kolbjørn Barmen committed
62
      - build-buster
63
  script:
64
    - apt-get update && apt-get install openssh-client -y
65
66
67
68
69
70
    - (
        umask 077;
        mkdir -p ~/.ssh;
        echo "${SSH_PRIVKEY}" > ~/.ssh/id_rsa;
        echo "${SSH_APT_HOSTKEY}" > ~/.ssh/known_hosts;
      )
Kolbjørn Barmen's avatar
Kolbjørn Barmen committed
71
72
73
74
    - ssh jenkins@apt.uninett.no
        mkdir -p
          /www/apt.uninett.no/htdocs/debian/pool/stretch/main/binary-amd64/r/rude
          /www/apt.uninett.no/htdocs/debian/pool/stretch/main/binary-amd64/c/crude
Kolbjørn Barmen's avatar
Kolbjørn Barmen committed
75
76
77
78
79
80
          /www/apt.uninett.no/htdocs/debian/pool/buster/main/binary-amd64/r/rude
          /www/apt.uninett.no/htdocs/debian/pool/buster/main/binary-amd64/c/crude
    - scp build-stretch/rude*.deb   jenkins@apt.uninett.no:/www/apt.uninett.no/htdocs/debian/pool/stretch/main/binary-amd64/r/rude/
    - scp build-stretch/crude*.deb  jenkins@apt.uninett.no:/www/apt.uninett.no/htdocs/debian/pool/stretch/main/binary-amd64/c/crude/
    - scp build-buster/rude*.deb    jenkins@apt.uninett.no:/www/apt.uninett.no/htdocs/debian/pool/buster/main/binary-amd64/r/rude/
    - scp build-buster/crude*.deb   jenkins@apt.uninett.no:/www/apt.uninett.no/htdocs/debian/pool/buster/main/binary-amd64/c/crude/
81
    - ssh jenkins@apt.uninett.no /www/apt.uninett.no/bin/mkrepo.debian