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
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ tmp
artifacts
sources
*.tar
image-linux*
76 changes: 30 additions & 46 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,72 +1,56 @@
#!groovy


def genBranch(String arch) {
return [
"${arch}": { ->
stage("Build engine image on ${arch}") {
wrappedNode(label: "linux&&${arch}", cleanWorkspace: true) {
try {
checkout scm
sh("git clone https://github.com/docker/engine.git engine")
sh('make ENGINE_DIR=$(pwd)/engine image')
} finally {
sh('make ENGINE_DIR=$(pwd)/engine clean-image clean-engine')
}
}
}
}]
}

def branch = env.CHANGE_TARGET ?: env.BRANCH_NAME

test_steps = [
'deb': { ->
stage('Ubuntu Xenial Debian Package') {
wrappedNode(label: 'ubuntu && x86_64', cleanWorkspace: true) {
checkout scm
sh('git clone https://github.com/docker/cli.git')
sh("git -C cli checkout $branch")
sh('git clone https://github.com/docker/engine.git')
sh("git -C engine checkout $branch")
sh('make -C deb VERSION=0.0.1-dev ENGINE_DIR=$(pwd)/engine CLI_DIR=$(pwd)/cli ubuntu-xenial')
try {
checkout scm
sh('git clone https://github.com/docker/cli.git')
sh("git -C cli checkout $branch")
sh('git clone https://github.com/docker/engine.git')
sh("git -C engine checkout $branch")
sh('make -C deb VERSION=0.0.1-dev ENGINE_DIR=$(pwd)/engine CLI_DIR=$(pwd)/cli ubuntu-xenial')
} finally {
sh('make ENGINE_DIR=$(pwd)/engine clean-engine')
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wasn't sure if we needed this, but only the image-based build ran clean-engine. Perhaps we should call make -C deb ... clean here as well?

}
}
}
},
'rpm': { ->
stage('Centos 7 RPM Package') {
wrappedNode(label: 'ubuntu && x86_64', cleanWorkspace: true) {
checkout scm
sh('git clone https://github.com/docker/cli.git')
sh("git -C cli checkout $branch")
sh('git clone https://github.com/docker/engine.git')
sh("git -C engine checkout $branch")
sh('make -C rpm VERSION=0.0.1-dev ENGINE_DIR=$(pwd)/engine CLI_DIR=$(pwd)/cli centos-7')
try {
checkout scm
sh('git clone https://github.com/docker/cli.git')
sh("git -C cli checkout $branch")
sh('git clone https://github.com/docker/engine.git')
sh("git -C engine checkout $branch")
sh('make -C rpm VERSION=0.0.1-dev ENGINE_DIR=$(pwd)/engine CLI_DIR=$(pwd)/cli centos-7')
} finally {
sh('make ENGINE_DIR=$(pwd)/engine clean-engine')
}
}
}
},
'static': { ->
stage('Static Linux Binaries') {
wrappedNode(label: 'ubuntu && x86_64', cleanWorkspace: true) {
checkout scm
sh('git clone https://github.com/docker/cli.git')
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=static-linux ENGINE_DIR=$(pwd)/engine CLI_DIR=$(pwd)/cli static')
try {
checkout scm
sh('git clone https://github.com/docker/cli.git')
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=static-linux ENGINE_DIR=$(pwd)/engine CLI_DIR=$(pwd)/cli static')
} finally {
sh('make ENGINE_DIR=$(pwd)/engine clean-engine')
}
}
}
},
]

arches = [
"x86_64",
"aarch64",
"armhf"
]

arches.each {
test_steps << genBranch(it)
}

parallel(test_steps)
22 changes: 1 addition & 21 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,8 @@ help: ## show make targets
clean-engine:
rm -rf $(ENGINE_DIR)

.PHONY: clean-image
clean-image:
$(MAKE) ENGINE_DIR=$(ENGINE_DIR) -C image clean


.PHONY: clean
clean: clean-image ## remove build artifacts
clean: ## remove build artifacts
$(MAKE) -C rpm clean
$(MAKE) -C deb clean
$(MAKE) -C static clean
Expand All @@ -40,18 +35,3 @@ static: ## build static-compiled 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

# TODO - figure out multi-arch
.PHONY: image
image: DOCKER_BUILD_PKGS:=image-linux
image: ## build static-compiled 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

engine-$(ARCH).tar:
$(MAKE) -C image $@

.PHONY: release
release:
$(MAKE) -C image $@
2 changes: 1 addition & 1 deletion deb/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ RUN=docker run --rm -i \
$(RUN_FLAGS) \
debbuild-$@/$(ARCH)

SOURCE_FILES=engine-image cli.tgz engine.tgz docker.service docker.socket distribution_based_engine.json plugin-installers.tgz
SOURCE_FILES=engine-image cli.tgz engine.tgz docker.service docker.socket plugin-installers.tgz
SOURCES=$(addprefix sources/, $(SOURCE_FILES))

DEBIAN_VERSIONS := debian-stretch debian-buster
Expand Down
1 change: 0 additions & 1 deletion deb/common/rules
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ override_dh_auto_install:
install -D -m 0755 $(shell readlink -e engine/bundles/dynbinary-daemon/dockerd) debian/docker-ce/usr/bin/dockerd
install -D -m 0755 /usr/local/bin/docker-proxy debian/docker-ce/usr/bin/docker-proxy
install -D -m 0755 /usr/local/bin/docker-init debian/docker-ce/usr/bin/docker-init
install -D -m 0644 /sources/distribution_based_engine.json debian/docker-ce/var/lib/docker-engine/distribution_based_engine.json

override_dh_installinit:
# use "docker" as our service name, not "docker-ce"
Expand Down
101 changes: 0 additions & 101 deletions image/Dockerfile.engine

This file was deleted.

97 changes: 0 additions & 97 deletions image/Dockerfile.engine-dm

This file was deleted.

Loading