| 1 |
#!/bin/sh |
| 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 orca" |
| 16 |
exit 1 |
| 17 |
fi |
| 18 |
|
| 19 |
tag=$(grep -e '^ BASE_TAG:' $CONTAINER_BUILDS | head -n 1 | sed -E 's/.*BASE_TAG: "(.+)"/\1/') |
| 20 |
full_tag=x86_64-$tag |
| 21 |
echo full_tag=\"$full_tag\" |
| 22 |
|
| 23 |
image_name=registry.gitlab.gnome.org/gnome/orca/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 -w /srv/project $image_name" |