Debian Codegraph @

ci/pull-container-image.sh

raw symbols SCIP
1 #!/bin/bash
2 #
3 # Utility script so you can pull the container image from CI for local development.
4 # Run this script and follow the instructions; the script will tell you how
5 # to run "podman run" to launch a container that has the same environment as the
6 # one used during CI pipelines. You can debug things at leisure there.
7
8 set -eu
9 set -o pipefail
10
11 CONTAINER_BUILDS=ci/container_builds.yml
12
13 if [ ! -f $CONTAINER_BUILDS ]
14 then
15 echo "Please run this from the toplevel source directory in librsvg"
16 exit 1
17 fi
18
19 tag=$(grep -e '^ BASE_TAG:' $CONTAINER_BUILDS | head -n 1 | sed -E 's/.*BASE_TAG: "(.+)"/\1/')
20 rust_version=$(grep -e '^ RUST_STABLE:' $CONTAINER_BUILDS | head -n 1 | sed -E 's/.*RUST_STABLE: "(.+)"/\1/')
21 full_tag=x86_64-$rust_version-$tag
22
23 image_name=registry.gitlab.gnome.org/gnome/librsvg/opensuse/tumbleweed:$full_tag
24
25 echo pulling image "$image_name"
26 podman pull "$image_name"
27
28 echo ""
29 echo "You can now run this:"
30 echo " podman run --rm -ti --cap-add=SYS_PTRACE -v \$(pwd):/srv/project:z -w /srv/project $image_name"
31 echo ""
32 echo "Don't forget to run this once inside the container:"
33 echo " source ci/env.sh"
34 echo " source ci/setup-dependencies-env.sh"