aboutsummaryrefslogtreecommitdiffstats
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorLibravatar Kelvin M. Klann <kmk3.code@protonmail.com>2023-04-25 13:42:08 -0300
committerLibravatar Kelvin M. Klann <kmk3.code@protonmail.com>2023-06-14 18:54:49 -0300
commit15e40e9ae48dcab4f317215fe5aef8a58f7259dc (patch)
treed66499339558c8c6ffc53ab981b394368f0c4598 /.gitlab-ci.yml
parentci: remove commented profile checks from build jobs (diff)
downloadfirejail-15e40e9ae48dcab4f317215fe5aef8a58f7259dc.tar.gz
firejail-15e40e9ae48dcab4f317215fe5aef8a58f7259dc.tar.zst
firejail-15e40e9ae48dcab4f317215fe5aef8a58f7259dc.zip
ci: standardize apt-get update/install
General changes: * Use a single -q on update, as the output is not too long * Use a single -q on install, to show all packages at once GitLab-specific changes: * Use `DEBIAN_FRONTEND=noninteractive` to reduce noise * Use --no-install-recommends to avoid installing unnecessary packages * Filter out uninteresting lines on install Note: `DEBIAN_FRONTEND` does not appear to be needed in the default GitHub runner container and not many packages are currently being downloaded/installed in them, so do the above changes only jobs that use custom Docker images.
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml32
1 files changed, 21 insertions, 11 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index c0d390998..cb88c0263 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -8,11 +8,14 @@
8 8
9build_ubuntu_package: 9build_ubuntu_package:
10 image: ubuntu:rolling 10 image: ubuntu:rolling
11 variables:
12 DEBIAN_FRONTEND: noninteractive
11 script: 13 script:
12 - apt-get update -qq 14 - apt-get update -qy
13 - > 15 - >
14 DEBIAN_FRONTEND=noninteractive apt-get install -y -qq 16 apt-get install --no-install-recommends -qy
15 build-essential lintian libapparmor-dev pkg-config gawk 17 build-essential fakeroot lintian libapparmor-dev pkg-config gawk
18 | grep -Ev '^(Selecting|Preparing to unpack|Unpacking)'
16 - ./ci/printenv.sh 19 - ./ci/printenv.sh
17 - ./configure || (cat config.log; exit 1) 20 - ./configure || (cat config.log; exit 1)
18 - make deb 21 - make deb
@@ -21,11 +24,14 @@ build_ubuntu_package:
21 24
22build_debian_package: 25build_debian_package:
23 image: debian:buster 26 image: debian:buster
27 variables:
28 DEBIAN_FRONTEND: noninteractive
24 script: 29 script:
25 - apt-get update -qq 30 - apt-get update -qy
26 - > 31 - >
27 apt-get install -y -qq 32 apt-get install --no-install-recommends -qy
28 build-essential lintian libapparmor-dev pkg-config gawk 33 build-essential fakeroot lintian libapparmor-dev pkg-config gawk
34 | grep -Ev '^(Selecting|Preparing to unpack|Unpacking)'
29 - ./ci/printenv.sh 35 - ./ci/printenv.sh
30 - ./configure || (cat config.log; exit 1) 36 - ./configure || (cat config.log; exit 1)
31 - make deb 37 - make deb
@@ -68,11 +74,14 @@ build_src_package:
68 74
69build_no_apparmor: 75build_no_apparmor:
70 image: ubuntu:latest 76 image: ubuntu:latest
77 variables:
78 DEBIAN_FRONTEND: noninteractive
71 script: 79 script:
72 - apt-get update -qq 80 - apt-get update -qy
73 - > 81 - >
74 DEBIAN_FRONTEND=noninteractive apt-get install -y -qq 82 apt-get install --no-install-recommends -qy
75 build-essential lintian pkg-config gawk 83 build-essential fakeroot lintian pkg-config gawk
84 | grep -Ev '^(Selecting|Preparing to unpack|Unpacking)'
76 - ./ci/printenv.sh 85 - ./ci/printenv.sh
77 - ./configure || (cat config.log; exit 1) 86 - ./configure || (cat config.log; exit 1)
78 - make dist 87 - make dist
@@ -86,6 +95,7 @@ debian_ci:
86 variables: 95 variables:
87 DEBFULLNAME: "$GITLAB_USER_NAME" 96 DEBFULLNAME: "$GITLAB_USER_NAME"
88 DEBEMAIL: "$GITLAB_USER_EMAIL" 97 DEBEMAIL: "$GITLAB_USER_EMAIL"
98 DEBIAN_FRONTEND: noninteractive
89 before_script: 99 before_script:
90 - git checkout -B ci_build "$CI_COMMIT_SHA" 100 - git checkout -B ci_build "$CI_COMMIT_SHA"
91 - gitlab-ci-enable-sid 101 - gitlab-ci-enable-sid
@@ -95,7 +105,7 @@ debian_ci:
95 deb-src http://deb.debian.org/debian sid main 105 deb-src http://deb.debian.org/debian sid main
96 deb-src http://deb.debian.org/debian experimental main 106 deb-src http://deb.debian.org/debian experimental main
97 EOF 107 EOF
98 - apt-get update 108 - apt-get update -qy
99 - git config user.name "$DEBFULLNAME" 109 - git config user.name "$DEBFULLNAME"
100 - git config user.email "$DEBEMAIL" 110 - git config user.email "$DEBEMAIL"
101 - | 111 - |
@@ -116,7 +126,7 @@ debian_ci:
116 - git commit -m 'add debian/' 126 - git commit -m 'add debian/'
117 - export CI_COMMIT_SHA="$(git rev-parse HEAD)" 127 - export CI_COMMIT_SHA="$(git rev-parse HEAD)"
118 script: 128 script:
119 - apt-get --no-install-recommends install -y -qq gawk 129 - apt-get install --no-install-recommends -qy gawk
120 - ./ci/printenv.sh 130 - ./ci/printenv.sh
121 - gitlab-ci-git-buildpackage 131 - gitlab-ci-git-buildpackage
122 - gitlab-ci-lintian 132 - gitlab-ci-lintian