glib/.gitlab-ci/run-docker.sh
Emmanuele Bassi e04d2e81fc ci: Add GitLab CI description file
We're mostly interested into building and testing everything that gets
pushed to the repository — including merge requests.

When pushing tags, though, we should assume we're spinning a release, so
let's run the dist target, and store the tarball, and the generated
documentation while we're at it, as artifacts on GitLab.

The Dockerfile for the image used for the build is included in tree, and
published on Docker Hub. Using a custom image allows us to avoid the
costly "download and install build dependencies" phase, as well as
controlling the environment a little bit better.

https://bugzilla.gnome.org/show_bug.cgi?id=793635
2018-02-20 13:49:21 +00:00

10 lines
254 B
Bash
Executable File

#!/bin/bash
set -e
sudo docker build --build-arg HOST_USER_ID="$UID" --tag "gitlab-glib" \
--file "Dockerfile" .
sudo docker run --rm \
--volume "$(pwd)/..:/home/user/app" --workdir "/home/user/app" \
--tty --interactive "gitlab-glib" bash