mirror of https://github.com/containers/podman.git
Add .papr support
Don't run lint for now, since we seem to be running out of memory. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
parent
0847e770bb
commit
f590429592
|
|
@ -0,0 +1,37 @@
|
|||
#!/bin/bash
|
||||
set -xeuo pipefail
|
||||
|
||||
export GOPATH=$HOME/gopath
|
||||
export PATH=$HOME/gopath/bin:$PATH
|
||||
export GOSRC=$HOME/gopath/src/github.com/projectatomic/libpod
|
||||
|
||||
(mkdir -p $GOSRC && cd /code && cp -r . $GOSRC)
|
||||
|
||||
dnf install -y \
|
||||
bats \
|
||||
btrfs-progs-devel \
|
||||
bzip2 \
|
||||
device-mapper-devel \
|
||||
findutils \
|
||||
git \
|
||||
glib2-devel \
|
||||
gnupg \
|
||||
golang \
|
||||
gpgme-devel \
|
||||
libassuan-devel \
|
||||
libseccomp-devel \
|
||||
libselinux-devel \
|
||||
skopeo-containers \
|
||||
runc \
|
||||
make \
|
||||
ostree-devel \
|
||||
python \
|
||||
which
|
||||
|
||||
# PAPR adds a merge commit, for testing, which fails the
|
||||
# short-commit-subject validation test, so tell git-validate.sh to only check
|
||||
# up to, but not including, the merge commit.
|
||||
export GITVALIDATE_TIP=$(cd $GOSRC; git log -2 --pretty='%H' | tail -n 1)
|
||||
export TAGS="seccomp $($GOSRC/hack/btrfs_tag.sh) $($GOSRC/hack/libdm_tag.sh) $($GOSRC/hack/btrfs_installed_tag.sh) $($GOSRC/hack/ostree_tag.sh) $($GOSRC/hack/selinux_tag.sh)"
|
||||
make -C $GOSRC binaries install.tools all gofmt localintegration testunit TAGS="${TAGS}"
|
||||
#make -C $GOSRC lint
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
branches:
|
||||
- master
|
||||
- auto
|
||||
- try
|
||||
|
||||
host:
|
||||
distro: fedora/26/atomic
|
||||
specs:
|
||||
ram: 8192
|
||||
|
||||
required: true
|
||||
|
||||
tests:
|
||||
# mount yum repos to inherit injected mirrors from PAPR
|
||||
- docker run --net=host --privileged -v /etc/yum.repos.d:/etc/yum.repos.d.host:ro
|
||||
-v /tmp:/tmp -v /var/tmp:/var/tmp
|
||||
-v $PWD:/code registry.fedoraproject.org/fedora:26 sh -c
|
||||
"cp -fv /etc/yum.repos.d{.host/*.repo,} && /code/.papr.sh"
|
||||
|
|
@ -55,6 +55,7 @@ jobs:
|
|||
go: tip
|
||||
- stage: Integration Test
|
||||
script:
|
||||
- make all
|
||||
- make integration
|
||||
go: 1.8.x
|
||||
|
||||
|
|
|
|||
29
Makefile
29
Makefile
|
|
@ -3,14 +3,14 @@ EPOCH_TEST_COMMIT ?= 1cc5a27
|
|||
PROJECT := github.com/projectatomic/libpod
|
||||
GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD 2>/dev/null)
|
||||
GIT_BRANCH_CLEAN := $(shell echo $(GIT_BRANCH) | sed -e "s/[^[:alnum:]]/-/g")
|
||||
CRIO_IMAGE := crio_dev$(if $(GIT_BRANCH_CLEAN),:$(GIT_BRANCH_CLEAN))
|
||||
CRIO_INSTANCE := crio_dev
|
||||
LIBPOD_IMAGE := libpod_dev$(if $(GIT_BRANCH_CLEAN),:$(GIT_BRANCH_CLEAN))
|
||||
LIBPOD_INSTANCE := libpod_dev
|
||||
PREFIX ?= ${DESTDIR}/usr/local
|
||||
BINDIR ?= ${PREFIX}/bin
|
||||
LIBEXECDIR ?= ${PREFIX}/libexec
|
||||
MANDIR ?= ${PREFIX}/share/man
|
||||
ETCDIR ?= ${DESTDIR}/etc
|
||||
ETCDIR_CRIO ?= ${ETCDIR}/crio
|
||||
ETCDIR_LIBPOD ?= ${ETCDIR}/crio
|
||||
BUILDTAGS ?= seccomp $(shell hack/btrfs_tag.sh) $(shell hack/libdm_tag.sh) $(shell hack/btrfs_installed_tag.sh) $(shell hack/ostree_tag.sh) $(shell hack/selinux_tag.sh)
|
||||
|
||||
BASHINSTALLDIR=${PREFIX}/share/bash-completion/completions
|
||||
|
|
@ -69,7 +69,7 @@ lint: .gopathok
|
|||
gofmt:
|
||||
@./hack/verify-gofmt.sh
|
||||
|
||||
bin/conmon:
|
||||
conmon:
|
||||
$(MAKE) -C $@
|
||||
|
||||
test/bin2img/bin2img: .gopathok $(wildcard test/bin2img/*.go)
|
||||
|
|
@ -81,7 +81,7 @@ test/copyimg/copyimg: .gopathok $(wildcard test/copyimg/*.go)
|
|||
test/checkseccomp/checkseccomp: .gopathok $(wildcard test/checkseccomp/*.go)
|
||||
$(GO) build $(LDFLAGS) -tags "$(BUILDTAGS) containers_image_ostree_stub" -o $@ $(PROJECT)/test/checkseccomp
|
||||
|
||||
bin/kpod: .gopathok $(shell hack/find-godeps.sh $(GOPKGDIR) cmd/kpod $(PROJECT))
|
||||
kpod: .gopathok $(shell hack/find-godeps.sh $(GOPKGDIR) cmd/kpod $(PROJECT))
|
||||
$(GO) build $(LDFLAGS_KPOD) -tags "$(BUILDTAGS)" -o bin/$@ $(PROJECT)/cmd/kpod
|
||||
|
||||
clean:
|
||||
|
|
@ -99,22 +99,23 @@ endif
|
|||
rm -f test/copyimg/copyimg
|
||||
rm -f test/checkseccomp/checkseccomp
|
||||
|
||||
crioimage:
|
||||
docker build -t ${CRIO_IMAGE} .
|
||||
libpodimage:
|
||||
docker build -t ${LIBPOD_IMAGE} .
|
||||
|
||||
dbuild: crioimage
|
||||
docker run --name=${CRIO_INSTANCE} --privileged ${CRIO_IMAGE} -v ${PWD}:/go/src/${PROJECT} --rm make binaries
|
||||
dbuild: libpodimage
|
||||
docker run --name=${LIBPOD_INSTANCE} --privileged ${LIBPOD_IMAGE} -v ${PWD}:/go/src/${PROJECT} --rm make binaries
|
||||
|
||||
integration: crioimage
|
||||
docker run -e STORAGE_OPTIONS="--storage-driver=vfs" -e TESTFLAGS -e TRAVIS -t --privileged --rm -v ${CURDIR}:/go/src/${PROJECT} ${CRIO_IMAGE} make localintegration
|
||||
integration: libpodimage
|
||||
docker run -e STORAGE_OPTIONS="--storage-driver=vfs" -e TESTFLAGS -e TRAVIS -t --privileged --rm -v ${CURDIR}:/go/src/${PROJECT} ${LIBPOD_IMAGE} make localintegration
|
||||
|
||||
testunit:
|
||||
$(GO) test -tags "$(BUILDTAGS)" -cover $(PACKAGES)
|
||||
|
||||
localintegration: clean binaries test-binaries
|
||||
localintegration: test-binaries
|
||||
./test/test_runner.sh ${TESTFLAGS}
|
||||
|
||||
binaries: bin/conmon bin/kpod
|
||||
binaries: conmon kpod
|
||||
|
||||
test-binaries: test/bin2img/bin2img test/copyimg/copyimg test/checkseccomp/checkseccomp
|
||||
|
||||
MANPAGES_MD := $(wildcard docs/*.md)
|
||||
|
|
@ -136,7 +137,7 @@ install.man:
|
|||
install ${SELINUXOPT} -m 644 $(filter %.1,$(MANPAGES)) -t $(MANDIR)/man1
|
||||
|
||||
install.config:
|
||||
install ${SELINUXOPT} -D -m 644 seccomp.json $(ETCDIR_CRIO)/seccomp.json
|
||||
install ${SELINUXOPT} -D -m 644 seccomp.json $(ETCDIR_LIBPOD)/seccomp.json
|
||||
install ${SELINUXOPT} -D -m 644 crio-umount.conf $(OCIUMOUNTINSTALLDIR)/crio-umount.conf
|
||||
|
||||
install.completions:
|
||||
|
|
|
|||
Loading…
Reference in New Issue