mirror of
https://github.com/containers/podman.git
synced 2025-05-19 08:07:10 +08:00
Merge pull request #22260 from baude/validatepr
[CI:DOCS]Initial PR validation
This commit is contained in:
12
Makefile
12
Makefile
@ -315,6 +315,18 @@ codespell:
|
|||||||
.PHONY: validate
|
.PHONY: validate
|
||||||
validate: lint .gitvalidation validate.completions man-page-check swagger-check tests-expect-exit pr-removes-fixed-skips
|
validate: lint .gitvalidation validate.completions man-page-check swagger-check tests-expect-exit pr-removes-fixed-skips
|
||||||
|
|
||||||
|
.PHONY: validatepr
|
||||||
|
validatepr:
|
||||||
|
$(PODMANCMD) run --rm --env HOME=/root \
|
||||||
|
-v $(CURDIR):/var/tmp/go/src/github.com/containers/podman \
|
||||||
|
--security-opt label=disable \
|
||||||
|
quay.io/libpod/fedora_podman:latest \
|
||||||
|
make .validatepr
|
||||||
|
|
||||||
|
.PHONY: .validatepr
|
||||||
|
.validatepr:
|
||||||
|
env BUILDTAGS="$(BUILDTAGS)" REMOTETAGS="$(REMOTETAGS)" contrib/validatepr/validatepr.sh
|
||||||
|
|
||||||
.PHONY: build-all-new-commits
|
.PHONY: build-all-new-commits
|
||||||
build-all-new-commits:
|
build-all-new-commits:
|
||||||
# Validate that all the commits build on top of $(GIT_BASE_BRANCH)
|
# Validate that all the commits build on top of $(GIT_BASE_BRANCH)
|
||||||
|
17
contrib/validatepr/Containerfile
Normal file
17
contrib/validatepr/Containerfile
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
FROM registry.fedoraproject.org/fedora:latest
|
||||||
|
|
||||||
|
WORKDIR /go/src/github.com/containers/podman
|
||||||
|
|
||||||
|
RUN dnf install -y systemd-devel \
|
||||||
|
libassuan-devel \
|
||||||
|
libseccomp-devel \
|
||||||
|
gpgme-devel \
|
||||||
|
device-mapper-devel \
|
||||||
|
btrfs-progs-devel \
|
||||||
|
golang \
|
||||||
|
make \
|
||||||
|
man-db \
|
||||||
|
git \
|
||||||
|
perl-Clone \
|
||||||
|
perl-FindBin \
|
||||||
|
pre-commit && dnf clean all
|
23
contrib/validatepr/validatepr.sh
Executable file
23
contrib/validatepr/validatepr.sh
Executable file
@ -0,0 +1,23 @@
|
|||||||
|
#!/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
|
Reference in New Issue
Block a user