spiegel_podman/contrib/validatepr/validatepr.sh
Brent Baude e773ed42b3 [CI:DOCS]Initial PR validation
This PR is only a first step towards being able to validate developer
code locally prior to pushing a PR and using CI.  Right now, we have a
prepared image in a temporary spot (will change when done).  That image
can be used to exercise various podman builds, make validate, and DCO
check.

The idea here is we have a make target that spins a podman container (or
machine) and then execute a small script to perform the actual builds.
Note, these builds are to verify code, not make production binaries so
corners are cut.  As of now, we choose to not build cross-arch binaries
because most of our problems thus far have been operating system builds
and not arch.

Of course this can be expanded in the future.  This is just step one to
start getting some of it in place.  The rest of the work is tracked in
JIRA under two cards.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2024-04-11 07:49:03 -05:00

23 lines
634 B
Bash
Executable file

#!/bin/bash
set -x
#
# This script is intended to help developers contribute to the podman project. It
# checks various pre-CI checks like building, linting, man-pages, etc. It is meant
# to be run in a specific container environment.
#
# build all require incantations of podman
echo "Building windows ..."
GOOS=windows CGO_ENABLED=0 go build -tags "$REMOTETAGS" -o bin/test.windows ./cmd/podman
echo "Building darwin..."
GOOS=darwin CGO_ENABLED=0 go build -tags "$REMOTETAGS" -o bin/test.darwin ./cmd/podman
# build podman
echo "Building podman binaries ..."
make binaries
echo "Running validation tooling ..."
make validate