File: pull-container-image.sh

package info (click to toggle)
at-spi2-core 2.58.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 6,148 kB
  • sloc: ansic: 44,812; xml: 1,480; python: 384; sh: 239; makefile: 30; javascript: 13
file content (30 lines) | stat: -rw-r--r-- 949 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/sh
#
# Utility script so you can pull the container image from CI for local development.
# Run this script and follow the instructions; the script will tell you how
# to run "podman run" to launch a container that has the same environment as the
# one used during CI pipelines.  You can debug things at leisure there.

set -eu
set -o pipefail

CONTAINER_BUILDS=ci/container_builds.yml

if [ ! -f $CONTAINER_BUILDS ]
then
    echo "Please run this from the toplevel source directory in at-spi2-core"
    exit 1
fi

tag=$(grep -e '^  BASE_TAG:' $CONTAINER_BUILDS | head -n 1 | sed -E 's/.*BASE_TAG: "(.+)"/\1/')
full_tag=x86_64-$tag
echo full_tag=\"$full_tag\"

image_name=registry.gitlab.gnome.org/gnome/at-spi2-core/opensuse/tumbleweed:$full_tag

echo pulling image $image_name
podman pull $image_name

echo ""
echo "You can now run this:"
echo "  podman run --rm -ti --cap-add=SYS_PTRACE -v \$(pwd):/srv/project -w /srv/project $image_name"