mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
32915b1d0a
Starting with this commit, integration tests should no longer rely on the docker cli, they should be API tests instead. For the existing tests the scripts will use a frozen version of the docker cli with a DOCKER_API_VERSION frozen to 1.30, which should ensure that the CI remains green at all times. To help contributors develop and test manually with a modified docker cli, this commit also adds a DOCKER_CLI_PATH environment variable to the Makefile. This allows to set the path of a custom cli that will be available inside the development container and used to run the integration tests. Signed-off-by: Arnaud Porterie (icecrime) <arnaud.porterie@docker.com> Signed-off-by: Tibor Vass <tibor@docker.com>
53 lines
2.1 KiB
Makefile
Executable file
53 lines
2.1 KiB
Makefile
Executable file
#!/usr/bin/make -f
|
|
|
|
VERSION = $(shell cat VERSION)
|
|
SYSTEMD_VERSION := $(shell dpkg-query -W -f='$${Version}\n' systemd | cut -d- -f1)
|
|
SYSTEMD_GT_227 := $(shell [ '$(SYSTEMD_VERSION)' ] && [ '$(SYSTEMD_VERSION)' -gt 227 ] && echo true )
|
|
|
|
override_dh_gencontrol:
|
|
# if we're on Ubuntu, we need to Recommends: apparmor
|
|
echo 'apparmor:Recommends=$(shell dpkg-vendor --is Ubuntu && echo apparmor)' >> debian/docker-engine.substvars
|
|
dh_gencontrol
|
|
|
|
override_dh_auto_build:
|
|
./hack/make.sh dynbinary
|
|
# ./man/md2man-all.sh runs outside the build container (if at all), since we don't have go-md2man here
|
|
|
|
override_dh_auto_test:
|
|
./bundles/$(VERSION)/dynbinary-daemon/dockerd -v
|
|
|
|
override_dh_strip:
|
|
# Go has lots of problems with stripping, so just don't
|
|
|
|
override_dh_auto_install:
|
|
mkdir -p debian/docker-engine/usr/bin
|
|
cp -aT "$$(readlink -f bundles/$(VERSION)/dynbinary-daemon/dockerd)" debian/docker-engine/usr/bin/dockerd
|
|
cp -aT /usr/local/bin/docker-proxy debian/docker-engine/usr/bin/docker-proxy
|
|
cp -aT /usr/local/bin/docker-containerd debian/docker-engine/usr/bin/docker-containerd
|
|
cp -aT /usr/local/bin/docker-containerd-shim debian/docker-engine/usr/bin/docker-containerd-shim
|
|
cp -aT /usr/local/bin/docker-containerd-ctr debian/docker-engine/usr/bin/docker-containerd-ctr
|
|
cp -aT /usr/local/bin/docker-runc debian/docker-engine/usr/bin/docker-runc
|
|
cp -aT /usr/local/bin/docker-init debian/docker-engine/usr/bin/docker-init
|
|
mkdir -p debian/docker-engine/usr/lib/docker
|
|
|
|
override_dh_installinit:
|
|
# use "docker" as our service name, not "docker-engine"
|
|
dh_installinit --name=docker
|
|
ifeq (true, $(SYSTEMD_GT_227))
|
|
$(warning "Setting TasksMax=infinity")
|
|
sed -i -- 's/#TasksMax=infinity/TasksMax=infinity/' debian/docker-engine/lib/systemd/system/docker.service
|
|
endif
|
|
|
|
override_dh_installudev:
|
|
# match our existing priority
|
|
dh_installudev --priority=z80
|
|
|
|
override_dh_install:
|
|
dh_install
|
|
dh_apparmor --profile-name=docker-engine -pdocker-engine
|
|
|
|
override_dh_shlibdeps:
|
|
dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info
|
|
|
|
%:
|
|
dh $@ --with=bash-completion $(shell command -v dh_systemd_enable > /dev/null 2>&1 && echo --with=systemd)
|