summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Tissoires <benjamin.tissoires@gmail.com>2019-08-06 13:32:16 +0200
committerBenjamin Tissoires <benjamin.tissoires@gmail.com>2019-08-07 11:51:52 +0200
commitd5662590d4d636df0ac23c1f8a11e0831b44a55e (patch)
treeb6bde0d40103cc8dafc11da6fcd169fddfe7ca3f
parent2c6e90f4bea9c3fb3f708934eef1804348558fa0 (diff)
gitlab-ci: allow to run on unprivileged containers
This parameter is already included by default in ci-templates, but we also need it in freebsd Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
-rw-r--r--.gitlab-ci.yml13
1 files changed, 7 insertions, 6 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 777a5189..1e79400b 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -27,15 +27,15 @@
include:
# Arch container builder template
- project: 'wayland/ci-templates'
- ref: c73dae8b84697ef18e2dbbf4fed7386d9652b0cd # see https://docs.gitlab.com/ee/ci/yaml/#includefile
+ ref: adfcd8c318d3398d0547960e45daa34d3b48bce6 # see https://docs.gitlab.com/ee/ci/yaml/#includefile
file: '/templates/arch.yml'
# Fedora container builder template
- project: 'wayland/ci-templates'
- ref: c73dae8b84697ef18e2dbbf4fed7386d9652b0cd # see https://docs.gitlab.com/ee/ci/yaml/#includefile
+ ref: adfcd8c318d3398d0547960e45daa34d3b48bce6 # see https://docs.gitlab.com/ee/ci/yaml/#includefile
file: '/templates/fedora.yml'
# Ubuntu container builder template
- project: 'wayland/ci-templates'
- ref: c73dae8b84697ef18e2dbbf4fed7386d9652b0cd # see https://docs.gitlab.com/ee/ci/yaml/#includefile
+ ref: adfcd8c318d3398d0547960e45daa34d3b48bce6 # see https://docs.gitlab.com/ee/ci/yaml/#includefile
file: '/templates/ubuntu.yml'
stages:
@@ -199,10 +199,11 @@ arch:rolling@container-prep:
image: $BUILDAH_IMAGE
<<: *pull_upstream_or_rebuild
script:
+ - export BUILDAH_RUN="buildah run --isolation chroot"
- buildcntr=$(buildah from --quiet myfreeweb/freebsd-cross:latest)
- - buildah run $buildcntr apk add --no-cache $FREEBSD_BUILD_PKGS
- - buildah run $buildcntr pkg -r /freebsd update -f
- - buildah run $buildcntr pkg -r /freebsd install -y $FREEBSD_PKGS
+ - $BUILDAH_RUN $buildcntr apk add --no-cache $FREEBSD_BUILD_PKGS
+ - $BUILDAH_RUN $buildcntr pkg -r /freebsd update -f
+ - $BUILDAH_RUN $buildcntr pkg -r /freebsd install -y $FREEBSD_PKGS
- buildah config --workingdir /app $buildcntr
# tag the current container
- buildah commit --quiet $buildcntr $FREEBSD_CONTAINER_IMAGE