-
Notifications
You must be signed in to change notification settings - Fork 566
/
.gitlab-ci.yml
78 lines (72 loc) · 3.51 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# Basic notes: builds firejail on 5 different systems for 2 package systems:
# 1. Debian-based systems. Use debian:jessie to ensure reasonable backwards
# compat and ubuntu:rolling for new setups
# 2. Redhat-based systems. Use centos:latest for reasonable backwards compat
# and fedora:latest for new setups
# 3. Alpine for installing directly from source
# Also builds apparmor package for Ubuntu LTS
build_ubuntu_package:
image: ubuntu:rolling
script:
- apt-get update -qq
- DEBIAN_FRONTEND=noninteractive apt-get install -y -qq build-essential lintian pkg-config python3 gawk
- ./configure --prefix=/usr && make deb && dpkg -i firejail*.deb
- python3 contrib/sort.py etc/profile-*/*.profile etc/inc/*.inc
build_debian_package:
image: debian:stretch
script:
- apt-get update -qq
- apt-get install -y -qq build-essential lintian pkg-config gawk
- ./configure --prefix=/usr && make deb && dpkg -i firejail*.deb
build_redhat_package:
image: centos:latest
script:
- dnf update -y
- dnf install -y rpm-build gcc make
- ./configure --prefix=/usr && make rpms && rpm -i firejail*.rpm
build_fedora_package:
image: fedora:latest
script:
- dnf update -y
- dnf install -y rpm-build gcc make
- ./configure --prefix=/usr && make rpms && rpm -i firejail*.rpm
- python3 contrib/sort.py etc/profile-*/*.profile etc/inc/*.inc
build_src_package:
image: alpine:latest
script:
- apk update
- apk upgrade
- apk add build-base linux-headers python3 gawk
- ./configure --prefix=/usr && make && make install-strip
# - python3 contrib/sort.py etc/*.{profile,inc}
build_apparmor:
image: ubuntu:latest
script:
- apt-get update -qq
- DEBIAN_FRONTEND=noninteractive apt-get install -y -qq build-essential lintian libapparmor-dev pkg-config gawk
- ./configure --prefix=/usr && make deb-apparmor && dpkg -i firejail*.deb
debian_ci:
image: registry.salsa.debian.org/salsa-ci-team/ci-image-git-buildpackage:latest
variables:
DEBFULLNAME: "$GITLAB_USER_NAME"
DEBEMAIL: "$GITLAB_USER_EMAIL"
before_script:
- git checkout -B ci_build $CI_COMMIT_SHA
- gitlab-ci-enable-sid
- gitlab-ci-enable-experimental
- echo "deb-src https://deb.debian.org/debian sid main" >> /etc/apt/sources.list
- echo "deb-src https://deb.debian.org/debian experimental main" >> /etc/apt/sources.list
- apt-get update
- git config user.email "$GITLAB_USER_NAME" && git config user.name "$GITLAB_USER_EMAIL"
- cd $CI_PROJECT_DIR/.. && (apt-get source --download-only -t experimental firejail || apt-get source --download-only firejail)
- cd $CI_PROJECT_DIR && tar xf ../firejail_*.debian.tar.*
- rm -rf debian/patches/
# next line is a temporary fix for dh_missing failure; remove it after next release
- echo "etc/firejail/*.config" >> debian/firejail.install
- VERSION=$(grep ^PACKAGE_VERSION= configure | cut -d"'" -f2) && dch -v ${VERSION}-0.1~ci "Non-maintainer upload." && git archive -o ../firejail_${VERSION}.orig.tar.gz HEAD && pristine-tar commit ../firejail_${VERSION}.orig.tar.gz ci_build && git branch -m pristine-tar origin/pristine-tar
- git add debian && git commit -m "add debian/"
- export CI_COMMIT_SHA=$(git rev-parse HEAD)
script:
- apt-get --no-install-recommends install -y -qq gawk
- gitlab-ci-git-buildpackage
- gitlab-ci-lintian