Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ test_steps = [
sh("git -C cli checkout $branch")
sh('git clone https://github.com/docker/engine.git')
sh("git -C engine checkout $branch")
sh('make VERSION=0.0.1-dev DOCKER_BUILD_PKGS=ubuntu-xenial ENGINE_DIR=$(pwd)/engine CLI_DIR=$(pwd)/cli deb')
sh('make -C deb VERSION=0.0.1-dev ENGINE_DIR=$(pwd)/engine CLI_DIR=$(pwd)/cli ubuntu-xenial')
}
}
},
Expand All @@ -41,7 +41,7 @@ test_steps = [
sh("git -C cli checkout $branch")
sh('git clone https://github.com/docker/engine.git')
sh("git -C engine checkout $branch")
sh('make VERSION=0.0.1-dev DOCKER_BUILD_PKGS=centos-7 ENGINE_DIR=$(pwd)/engine CLI_DIR=$(pwd)/cli rpm')
sh('make -C rpm VERSION=0.0.1-dev ENGINE_DIR=$(pwd)/engine CLI_DIR=$(pwd)/cli centos-7')
}
}
},
Expand Down
10 changes: 2 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,12 @@ clean: clean-image ## remove build artifacts
$(MAKE) -C static clean

.PHONY: rpm
rpm: DOCKER_BUILD_PKGS:=$(shell find rpm -type d | grep ".*-.*" | sed 's/^rpm\///')
rpm: ## build rpm packages
for p in $(DOCKER_BUILD_PKGS); do \
$(MAKE) -C $@ VERSION=$(VERSION) ENGINE_DIR=$(ENGINE_DIR) CLI_DIR=$(CLI_DIR) GO_VERSION=$(GO_VERSION) $${p}; \
done
$(MAKE) -C $@ VERSION=$(VERSION) ENGINE_DIR=$(ENGINE_DIR) CLI_DIR=$(CLI_DIR) GO_VERSION=$(GO_VERSION) rpm

.PHONY: deb
deb: DOCKER_BUILD_PKGS:=$(shell find deb -type d | grep ".*-.*" | sed 's/^deb\///')
deb: ## build deb packages
for p in $(DOCKER_BUILD_PKGS); do \
$(MAKE) -C $@ VERSION=$(VERSION) ENGINE_DIR=$(ENGINE_DIR) CLI_DIR=$(CLI_DIR) GO_VERSION=$(GO_VERSION) $${p}; \
done
$(MAKE) -C $@ VERSION=$(VERSION) ENGINE_DIR=$(ENGINE_DIR) CLI_DIR=$(CLI_DIR) GO_VERSION=$(GO_VERSION) deb

.PHONY: static
static: DOCKER_BUILD_PKGS:=static-linux cross-mac cross-win cross-arm
Expand Down
33 changes: 12 additions & 21 deletions deb/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ RUN=docker run --rm -i \
SOURCE_FILES=engine-image cli.tgz engine.tgz docker.service docker.socket distribution_based_engine.json plugin-installers.tgz
SOURCES=$(addprefix sources/, $(SOURCE_FILES))

DEBIAN_VERSIONS := debian-stretch debian-buster
UBUNTU_VERSIONS := ubuntu-xenial ubuntu-bionic ubuntu-cosmic ubuntu-disco
RASPBIAN_VERSIONS := raspbian-stretch raspbian-buster
DISTROS := $(DEBIAN_VERSIONS) $(UBUNTU_VERSIONS) $(RASPBIAN_VERSIONS)

.PHONY: help
help: ## show make targets
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {sub("\\\\n",sprintf("\n%22c"," "), $$2);printf " \033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
Expand All @@ -55,34 +60,20 @@ engine-$(ARCH).tar:
docker save -o $@ $$(cat ../image/image-linux)

.PHONY: deb
deb: ubuntu debian raspbian ## build all deb packages
deb: ubuntu debian ## build all deb packages except for raspbian

.PHONY: ubuntu
ubuntu: ubuntu-bionic ubuntu-xenial ## build all ubuntu deb packages
ubuntu: $(UBUNTU_VERSIONS) ## build all ubuntu deb packages

.PHONY: debian
debian: debian-stretch debian-buster ## build all debian deb packages
debian: $(DEBIAN_VERSIONS) ## build all debian deb packages

.PHONY: raspbian
raspbian: raspbian-stretch raspbian-buster ## build all raspbian deb packages

.PHONY: ubuntu-%
## build ubuntu deb packages
ubuntu-%: $(SOURCES)
$(BUILD)
$(RUN)
$(CHOWN) -R $(shell id -u):$(shell id -g) debbuild/$@

.PHONY: debian-%
## build debian deb packages
debian-%: $(SOURCES)
$(BUILD)
$(RUN)
$(CHOWN) -R $(shell id -u):$(shell id -g) debbuild/$@
raspbian: $(RASPBIAN_VERSIONS) ## build all raspbian deb packages

.PHONY: raspbian-%
## build raspbian deb packages
raspbian-%: $(SOURCES)
.PHONY: $(DISTROS)
$(DISTROS): $(SOURCES)
@echo "== Building packages for $@ =="
$(BUILD)
$(RUN)
$(CHOWN) -R $(shell id -u):$(shell id -g) debbuild/$@
Expand Down
21 changes: 8 additions & 13 deletions rpm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ RUN?=$(RPMBUILD) rpmbuild-$@/$(ARCH) $(RPMBUILD_FLAGS)
SOURCE_FILES=engine-image engine.tgz cli.tgz docker.service docker.socket distribution_based_engine.json plugin-installers.tgz
SOURCES=$(addprefix rpmbuild/SOURCES/, $(SOURCE_FILES))

FEDORA_RELEASES := fedora-31 fedora-30 fedora-29 fedora-28
CENTOS_RELEASES := centos-7

.PHONY: help
help: ## show make targets
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {sub("\\\\n",sprintf("\n%22c"," "), $$2);printf " \033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
Expand All @@ -61,22 +64,14 @@ clean: ## remove build artifacts
rpm: fedora centos ## build all rpm packages

.PHONY: fedora
fedora: fedora-31 fedora-30 fedora-29 fedora-28 ## build all fedora rpm packages
fedora: $(FEDORA_RELEASES) ## build all fedora rpm packages

.PHONY: centos
centos: centos-7 ## build all centos rpm packages

.PHONY: fedora-%
fedora-%: ## build fedora rpm packages
fedora-%: $(SOURCES)
$(CHOWN) -R root:root rpmbuild
$(BUILD)
$(RUN)
$(CHOWN) -R $(shell id -u):$(shell id -g) rpmbuild
centos: $(CENTOS_RELEASES) ## build all centos rpm packages

.PHONY: centos-7
centos-7: ## build centos-7 rpm packages
centos-7: $(SOURCES)
.PHONY: $(FEDORA_RELEASES) $(CENTOS_RELEASES)
$(FEDORA_RELEASES) $(CENTOS_RELEASES): $(SOURCES)
@echo "== Building packages for $@ =="
$(CHOWN) -R root:root rpmbuild
$(BUILD)
$(RUN)
Expand Down