diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2017-11-02 15:31:21 -0400 |
---|---|---|
committer | Daniel J Walsh <dwalsh@redhat.com> | 2017-11-02 18:10:50 -0400 |
commit | f590429592951ab1a39480e1d5fac05aa47a1192 (patch) | |
tree | 040e3c78b66ecb5bac86dde2041ccd74d8940884 | |
parent | 0847e770bb1c666874da0374fadc0984ec3c62ef (diff) | |
download | podman-f590429592951ab1a39480e1d5fac05aa47a1192.tar.gz podman-f590429592951ab1a39480e1d5fac05aa47a1192.tar.bz2 podman-f590429592951ab1a39480e1d5fac05aa47a1192.zip |
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>
-rwxr-xr-x | .papr.sh | 37 | ||||
-rw-r--r-- | .papr.yml | 18 | ||||
-rw-r--r-- | .travis.yml | 1 | ||||
-rw-r--r-- | Makefile | 29 |
4 files changed, 71 insertions, 14 deletions
diff --git a/.papr.sh b/.papr.sh new file mode 100755 index 000000000..fb837d661 --- /dev/null +++ b/.papr.sh @@ -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 diff --git a/.papr.yml b/.papr.yml new file mode 100644 index 000000000..d52219411 --- /dev/null +++ b/.papr.yml @@ -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" diff --git a/.travis.yml b/.travis.yml index be326c1ae..a079aa21e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -55,6 +55,7 @@ jobs: go: tip - stage: Integration Test script: + - make all - make integration go: 1.8.x @@ -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: |