.gitlab-ci.yml 6.13 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
build-ubuntu-xenial:
  cache: {}
  stage: build
  image: ubuntu:xenial
  artifacts:
    expire_in: 1h
    paths:
      - build-xenial
  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-xenial
    - mkdir build-xenial
    - mv -v rude/rude*.deb crude/crude*.deb build-xenial/

build-ubuntu-bionic:
  cache: {}
  stage: build
  image: ubuntu:bionic
  artifacts:
    expire_in: 1h
    paths:
      - build-bionic
  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-bionic
    - mkdir build-bionic
    - mv -v rude/rude*.deb crude/crude*.deb build-bionic/

build-ubuntu-focal:
  cache: {}
  stage: build
  image: ubuntu:focal
  artifacts:
    expire_in: 1h
    paths:
      - build-focal
  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-focal
    - mkdir build-focal
    - mv -v rude/rude*.deb crude/crude*.deb build-focal/

130
131
132
deploy-apt:
  stage: deploy
  image: debian:stretch
Kolbjørn Barmen's avatar
Kolbjørn Barmen committed
133
  image: debian:buster
134
135
136
  image: debian:xenial
  image: debian:bionic
  image: debian:focal
137
138
139
  artifacts:
    paths:
      - build-stretch
Kolbjørn Barmen's avatar
Kolbjørn Barmen committed
140
      - build-buster
141
142
143
      - build-xenial
      - build-bionic
      - build-focal
144
  script:
145
    - apt-get update && apt-get install openssh-client -y
146
147
148
149
150
151
    - (
        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
152
153
154
155
    - 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
156
157
          /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
158
159
160
161
162
163
          /www/apt.uninett.no/htdocs/ubuntu/pool/xenial/main/binary-amd64/r/rude
          /www/apt.uninett.no/htdocs/ubuntu/pool/xenial/main/binary-amd64/c/crude
          /www/apt.uninett.no/htdocs/ubuntu/pool/bionic/main/binary-amd64/r/rude
          /www/apt.uninett.no/htdocs/ubuntu/pool/bionic/main/binary-amd64/c/crude
          /www/apt.uninett.no/htdocs/ubuntu/pool/focal/main/binary-amd64/r/rude
          /www/apt.uninett.no/htdocs/ubuntu/pool/focal/main/binary-amd64/c/crude
Kolbjørn Barmen's avatar
Kolbjørn Barmen committed
164
165
166
167
    - 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/
168
169
170
171
172
173
174
    - scp build-xenial/rude*.deb    jenkins@apt.uninett.no:/www/apt.uninett.no/htdocs/ubuntu/pool/xenial/main/binary-amd64/r/rude/
    - scp build-xenial/crude*.deb   jenkins@apt.uninett.no:/www/apt.uninett.no/htdocs/ubuntu/pool/xenial/main/binary-amd64/c/crude/
    - scp build-bionic/rude*.deb    jenkins@apt.uninett.no:/www/apt.uninett.no/htdocs/ubuntu/pool/bionic/main/binary-amd64/r/rude/
    - scp build-bionic/crude*.deb   jenkins@apt.uninett.no:/www/apt.uninett.no/htdocs/ubuntu/pool/bionic/main/binary-amd64/c/crude/
    - scp build-focal/rude*.deb    jenkins@apt.uninett.no:/www/apt.uninett.no/htdocs/ubuntu/pool/focal/main/binary-amd64/r/rude/
    - scp build-focal/crude*.deb   jenkins@apt.uninett.no:/www/apt.uninett.no/htdocs/ubuntu/pool/focal/main/binary-amd64/c/crude/
    - ssh jenkins@apt.uninett.no /www/apt.uninett.no/bin/mkrepo