[librsvg: 1/4] ci/pull-container-image.sh - New script to make it easy to get the image for local development




commit 43616bff0cf45241966719a893796a6c5280973d
Author: Federico Mena Quintero <federico gnome org>
Date:   Mon Jul 11 10:54:22 2022 -0500

    ci/pull-container-image.sh - New script to make it easy to get the image for local development
    
    Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/713>

 ci/pull-container-image.sh | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)
---
diff --git a/ci/pull-container-image.sh b/ci/pull-container-image.sh
new file mode 100644
index 000000000..712676d4d
--- /dev/null
+++ b/ci/pull-container-image.sh
@@ -0,0 +1,34 @@
+#!/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 librsvg"
+    exit 1
+fi
+
+tag=$(grep -e '^  BASE_TAG:' $CONTAINER_BUILDS | head -n 1 | sed -E 's/.*BASE_TAG: "(.+)"/\1/')
+rust_version=$(grep -e '^  RUST_STABLE:' $CONTAINER_BUILDS | head -n 1 | sed -E 's/.*RUST_STABLE: 
"(.+)"/\1/')
+full_tag=x86_64-$rust_version-$tag
+echo full_tag=\"$full_tag\"
+
+image_name=registry.gitlab.gnome.org/gnome/librsvg/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"
+echo ""
+echo "Don't forget to run this once inside the container:"
+echo "  source ci/env.sh"


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]