aboutsummaryrefslogtreecommitdiffstats
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorLibravatar Kelvin M. Klann <kmk3.code@protonmail.com>2023-04-10 20:36:31 -0300
committerLibravatar Kelvin M. Klann <kmk3.code@protonmail.com>2023-04-24 23:29:28 -0300
commitfd59df07de66a3e20038f2949ad760b77f9999b4 (patch)
treef54ffb752f2db405c9fab3369ea797fef2330cb8 /.gitlab-ci.yml
parentci: simplify test steps in build.yml (diff)
downloadfirejail-fd59df07de66a3e20038f2949ad760b77f9999b4.tar.gz
firejail-fd59df07de66a3e20038f2949ad760b77f9999b4.tar.zst
firejail-fd59df07de66a3e20038f2949ad760b77f9999b4.zip
ci: line-wrap and split/join some commands
For increased readability. Note: `>` basically turns each newline into a space while `|` keeps newlines as is. Both remove leading indentation. Note2: On jobs using `apt-get install`, this commit moves package names to their own line, to make it easier to compare which packages are being installed across such jobs.
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml39
1 files changed, 30 insertions, 9 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index fe07b5b93..bfad57c08 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -5,11 +5,14 @@
5# and fedora:latest for new setups 5# and fedora:latest for new setups
6# 3. Alpine for installing directly from source 6# 3. Alpine for installing directly from source
7# Also builds apparmor package for Ubuntu LTS 7# Also builds apparmor package for Ubuntu LTS
8
8build_ubuntu_package: 9build_ubuntu_package:
9 image: ubuntu:rolling 10 image: ubuntu:rolling
10 script: 11 script:
11 - apt-get update -qq 12 - apt-get update -qq
12 - DEBIAN_FRONTEND=noninteractive apt-get install -y -qq build-essential lintian libapparmor-dev pkg-config python3 gawk 13 - >
14 DEBIAN_FRONTEND=noninteractive apt-get install -y -qq
15 build-essential lintian libapparmor-dev pkg-config python3 gawk
13 - ./configure 16 - ./configure
14 - make deb 17 - make deb
15 - dpkg -i firejail*.deb 18 - dpkg -i firejail*.deb
@@ -20,7 +23,9 @@ build_debian_package:
20 image: debian:stretch 23 image: debian:stretch
21 script: 24 script:
22 - apt-get update -qq 25 - apt-get update -qq
23 - apt-get install -y -qq build-essential lintian libapparmor-dev pkg-config gawk 26 - >
27 apt-get install -y -qq
28 build-essential lintian libapparmor-dev pkg-config gawk
24 - ./configure 29 - ./configure
25 - make deb 30 - make deb
26 - dpkg -i firejail*.deb 31 - dpkg -i firejail*.deb
@@ -63,7 +68,9 @@ build_no_apparmor:
63 image: ubuntu:latest 68 image: ubuntu:latest
64 script: 69 script:
65 - apt-get update -qq 70 - apt-get update -qq
66 - DEBIAN_FRONTEND=noninteractive apt-get install -y -qq build-essential lintian pkg-config gawk 71 - >
72 DEBIAN_FRONTEND=noninteractive apt-get install -y -qq
73 build-essential lintian pkg-config gawk
67 - ./configure 74 - ./configure
68 - make dist 75 - make dist
69 - ./mkdeb.sh --disable-apparmor 76 - ./mkdeb.sh --disable-apparmor
@@ -80,16 +87,30 @@ debian_ci:
80 - git checkout -B ci_build $CI_COMMIT_SHA 87 - git checkout -B ci_build $CI_COMMIT_SHA
81 - gitlab-ci-enable-sid 88 - gitlab-ci-enable-sid
82 - gitlab-ci-enable-experimental 89 - gitlab-ci-enable-experimental
83 - echo "deb-src http://deb.debian.org/debian sid main" >> /etc/apt/sources.list 90 - |
84 - echo "deb-src http://deb.debian.org/debian experimental main" >> /etc/apt/sources.list 91 cat >>/etc/apt/sources.list <<EOF
92 deb-src http://deb.debian.org/debian sid main
93 deb-src http://deb.debian.org/debian experimental main
94 EOF
85 - apt-get update 95 - apt-get update
86 - git config user.name "$DEBFULLNAME" 96 - git config user.name "$DEBFULLNAME"
87 - git config user.email "$DEBEMAIL" 97 - git config user.email "$DEBEMAIL"
88 - cd $CI_PROJECT_DIR/.. && (apt-get source --download-only -t experimental firejail || apt-get source --download-only firejail) 98 - |
89 - cd $CI_PROJECT_DIR && tar xf ../firejail_*.debian.tar.* 99 cd $CI_PROJECT_DIR/.. &&
100 (apt-get source --download-only -t experimental firejail ||
101 apt-get source --download-only firejail)
102 - |
103 cd $CI_PROJECT_DIR &&
104 tar xf ../firejail_*.debian.tar.*
90 - rm -rf debian/patches/ 105 - rm -rf debian/patches/
91 - 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 106 - |
92 - git add debian && git commit -m "add debian/" 107 VERSION=$(grep ^PACKAGE_VERSION= configure | cut -d "'" -f 2) &&
108 dch -v ${VERSION}-0.1~ci "Non-maintainer upload." &&
109 git archive -o ../firejail_${VERSION}.orig.tar.gz HEAD &&
110 pristine-tar commit ../firejail_${VERSION}.orig.tar.gz ci_build &&
111 git branch -m pristine-tar origin/pristine-tar
112 - git add debian
113 - git commit -m "add debian/"
93 - export CI_COMMIT_SHA=$(git rev-parse HEAD) 114 - export CI_COMMIT_SHA=$(git rev-parse HEAD)
94 script: 115 script:
95 - apt-get --no-install-recommends install -y -qq gawk 116 - apt-get --no-install-recommends install -y -qq gawk