6 podman build
-f "$1" -t "$2"
10 echo podman run
--rm -it -v .
:/repo
-w /repo
"$1" bash
-xc "$2"
11 podman run
--rm -it -v .
:/repo
-w /repo
"$1" bash
-xc "$2"
19 cd "$(git rev-parse --show-toplevel 2>/dev/null || echo ".
")"
22 while getopts "a:h" opt
28 echo "Empty architecture is invalid" >&2
49 echo "No distro specified" >&2
57 if [[ -n "$(git clean -nXd)" ]]
59 echo "Tree is not clean, please run 'git clean -fXd'" >&2
66 project
="$(yq -r '.projects[0]' ci/manifest.yml)"
67 if [[ -z "$project" ]]
69 echo "Could not parse project name from ci/manifest.yml" >&2
74 if [[ "$arch" != "x86_64" ]]
78 local file="ci/containers/$distro$suffix.Dockerfile"
80 local tag
="ci-$project-$distro$suffix"
81 echo "Testing $file as $tag"
86 build_container
$file $tag
89 if [[ "$status" -ne 0 ]]
91 echo "Container build failed with exit code $status" >&2
96 before_script
="$(yq -r '.[".base_build_job
"].before_script[]' .gitlab-ci.yml)"
99 variables
="$(yq -r '.["'"$arch-$distro"'"].variables | to_entries[] | "export " + .key + "=\"" + .value + "\""' ci/gitlab.yml)"
102 build_project
$tag "$before_script; $variables; $cmd"
105 if [[ "$status" -ne 0 ]]
107 echo "Project build failed with exit code $status" >&2