build: rename image dirs
This commit is contained in:
1 parent
78c07696b4
commit
1e68e35c16
22 files changed
+28
-49
No files matched your search
@@ -214,7 +214,7 @@ help:
|
||||
@echo 'Targets:'
|
||||
@echo ' build Build source code for host platform.'
|
||||
@echo ' build.all Build source code for all platforms.'
|
||||
@echo ' Best done in the cross-build container'
|
||||
@echo ' Best done in the cross build container'
|
||||
@echo ' due to cross compiler dependencies.'
|
||||
@echo ' check Runs unit tests.'
|
||||
@echo ' clean Remove all files that are created '
|
||||
|
||||
+2
-2
@@ -20,8 +20,8 @@ host=$(hostname)
|
||||
rootdir=$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd -P)
|
||||
host_hash=`echo ${host}-${rootdir} | sha256sum | cut -c1-8`
|
||||
build_registry=build-${host_hash}
|
||||
container_image=${build_registry}/cross-build-amd64
|
||||
container_volume=cross-build-volume
|
||||
container_image=${build_registry}/cross-amd64
|
||||
container_volume=cross-volume
|
||||
rsync_port=10873
|
||||
|
||||
function ver() {
|
||||
|
||||
@@ -26,8 +26,8 @@ fi
|
||||
|
||||
# build the the container if we've not done so already
|
||||
if [[ -z "$(docker images -q ${container_image})" ]]; then
|
||||
echo ==== building the cross-build container \(this could take minutes the first time\)
|
||||
make_cmd="make --no-print-directory -C ${scriptdir}/../images cross-build.amd64 PULL=0"
|
||||
echo ==== building the cross container \(this could take minutes the first time\)
|
||||
make_cmd="make --no-print-directory -C ${scriptdir}/../images cross.amd64 PULL=0"
|
||||
make_output=$($make_cmd 2>&1) || {
|
||||
cat <<EOF >&2
|
||||
=== cross build image failed for ${container_image}
|
||||
|
||||
+16
-18
@@ -16,7 +16,7 @@ include image.mk
|
||||
|
||||
PLATFORMS ?= amd64 arm arm64
|
||||
PLATFORM_IMAGES ?= rookd
|
||||
HOST_IMAGES ?= cross-build
|
||||
HOST_IMAGES ?= cross
|
||||
|
||||
# ====================================================================================
|
||||
# Image Builds
|
||||
@@ -24,19 +24,19 @@ HOST_IMAGES ?= cross-build
|
||||
base.%:
|
||||
@$(MAKE) -C base GOARCH=$*
|
||||
|
||||
cross-build-gnu.%: base.%
|
||||
@$(MAKE) -C cross-build-gnu GOARCH=$*
|
||||
cross-gnu.%: base.%
|
||||
@$(MAKE) -C cross-gnu GOARCH=$*
|
||||
|
||||
cross-build-go.%: cross-build-gnu.%
|
||||
@$(MAKE) -C cross-build-go GOARCH=$*
|
||||
cross-go.%: cross-gnu.%
|
||||
@$(MAKE) -C cross-go GOARCH=$*
|
||||
|
||||
cross-build.%: cross-build-go.%
|
||||
@$(MAKE) -C cross-build GOARCH=$*
|
||||
cross.%: cross-go.%
|
||||
@$(MAKE) -C cross GOARCH=$*
|
||||
|
||||
ceph-build.%: cross-build-gnu.$(GOHOSTARCH)
|
||||
@$(MAKE) -C ceph-build GOARCH=$*
|
||||
ceph.%: cross-gnu.$(GOHOSTARCH)
|
||||
@$(MAKE) -C ceph GOARCH=$*
|
||||
|
||||
rookd.%: ceph-build.% base.%
|
||||
rookd.%: ceph.% base.%
|
||||
@$(MAKE) -C rookd GOARCH=$*
|
||||
|
||||
build.all: $(foreach p,$(PLATFORMS), $(foreach i,$(PLATFORM_IMAGES), $(i).$(p))) $(foreach i,$(HOST_IMAGES), $(i).$(GOHOSTARCH))
|
||||
@@ -60,7 +60,7 @@ help:
|
||||
@echo ' push Pushes public images to registry.'
|
||||
@echo ''
|
||||
@echo 'Advanced Targets:'
|
||||
@echo ' cross-build Build images used for cross-builds.'
|
||||
@echo ' cross Build images used for cross building.'
|
||||
@echo ' clean.all Remove all images including cached.'
|
||||
@echo ' images at the host level.'
|
||||
@echo ' prune.all Prune everything ignoring policy.'
|
||||
@@ -76,10 +76,8 @@ help:
|
||||
@echo ' is obtained from git.'
|
||||
@echo ''
|
||||
@echo 'Advanced Options:'
|
||||
@echo ' PRUNE_HOURS The number of hours from when an image is'
|
||||
@echo ' created for it to be considered a target for'
|
||||
@echo ' pruning. Default is 48 hrs.'
|
||||
@echo ' PRUNE_KEEP_CACHED The minimum number of cached images to keep.'
|
||||
@echo ' Default is 24 images.'
|
||||
@echo ' PRUNE_KEEP_ORPHANS The minimum number of orphaned images to keep.'
|
||||
@echo ' Default is 24 images.'
|
||||
@echo ' PRUNE_HOURS The number of hours from when an image is'
|
||||
@echo ' created for it to be considered a target for'
|
||||
@echo ' pruning. Default is 48 hrs.'
|
||||
@echo ' PRUNE_KEEP The minimum number of cached images to keep.'
|
||||
@echo ' Default is 24 images.'
|
||||
File renamed without changes.
File renamed without changes.
@@ -39,7 +39,7 @@ CEPH_TARBALL = ceph-install.tar
|
||||
CCACHE_DIR_HOST ?= $(HOME)/.ccache
|
||||
|
||||
CEPH_BUILDER_IMAGE := $(BUILD_REGISTRY)/ceph-builder-$(CEPH_CONFIG)
|
||||
CEPH_BUILDER_BASEIMAGE := $(BUILD_REGISTRY)/cross-build-gnu-$(GOHOSTARCH)
|
||||
CEPH_BUILDER_BASEIMAGE := $(BUILD_REGISTRY)/cross-gnu-$(GOHOSTARCH)
|
||||
|
||||
CEPH_IMAGE := $(BUILD_REGISTRY)/ceph-$(CEPH_CONFIG)-$$(docker images -q $(CEPH_BUILDER_IMAGE))
|
||||
|
||||
File renamed without changes.
File renamed without changes.
@@ -1,19 +0,0 @@
|
||||
# Cross Build Image
|
||||
|
||||
This directory builds a container image that can be used for cross building, and
|
||||
also to minimize dependencies on the host platform.
|
||||
|
||||
## Building
|
||||
|
||||
To build the container run make in the directory.
|
||||
|
||||
## Pushing
|
||||
|
||||
To publish to docker hub run `make push`.
|
||||
|
||||
## Version
|
||||
|
||||
Be sure to update the version number in the `version` file when making changes
|
||||
to the build container. We use semantic versioning for the build container.
|
||||
|
||||
|
||||
File renamed without changes.
@@ -14,7 +14,7 @@
|
||||
|
||||
include ../image.mk
|
||||
|
||||
IMAGE = $(BUILD_REGISTRY)/cross-build-gnu-$(GOARCH)
|
||||
IMAGE = $(BUILD_REGISTRY)/cross-gnu-$(GOARCH)
|
||||
IMAGES := $(IMAGE)
|
||||
CACHE_IMAGES = $(IMAGES)
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -14,11 +14,11 @@
|
||||
|
||||
include ../image.mk
|
||||
|
||||
IMAGE = $(BUILD_REGISTRY)/cross-build-$(GOARCH)
|
||||
IMAGE = $(BUILD_REGISTRY)/cross-go-$(GOARCH)
|
||||
IMAGES := $(IMAGE)
|
||||
CACHE_IMAGES = $(IMAGES)
|
||||
|
||||
BASEIMAGE = $(BUILD_REGISTRY)/cross-build-go-$(GOARCH)
|
||||
BASEIMAGE = $(BUILD_REGISTRY)/cross-gnu-$(GOARCH)
|
||||
|
||||
TEMP := $(shell mktemp -d)
|
||||
|
||||
File renamed without changes.
@@ -14,11 +14,11 @@
|
||||
|
||||
include ../image.mk
|
||||
|
||||
IMAGE = $(BUILD_REGISTRY)/cross-build-go-$(GOARCH)
|
||||
IMAGE = $(BUILD_REGISTRY)/cross-$(GOARCH)
|
||||
IMAGES := $(IMAGE)
|
||||
CACHE_IMAGES = $(IMAGES)
|
||||
|
||||
BASEIMAGE = $(BUILD_REGISTRY)/cross-build-gnu-$(GOARCH)
|
||||
BASEIMAGE = $(BUILD_REGISTRY)/cross-go-$(GOARCH)
|
||||
|
||||
TEMP := $(shell mktemp -d)
|
||||
|
||||
File renamed without changes.
File renamed without changes.
@@ -47,7 +47,7 @@ CEPH_TARBALL = $(TEMP)/$(CEPH_TARBALL_FILENAME)
|
||||
|
||||
$(CEPH_TARBALL):
|
||||
@echo === building ceph for $(ROOKD_IMAGE)
|
||||
@$(MAKE) -C ../ceph-build GOARCH=$(GOARCH) CEPH_ALLOCATOR=$(CEPH_ALLOCATOR) CEPH_BUILD_TYPE=$(CEPH_BUILD_TYPE) $(CEPH_TARBALL)
|
||||
@$(MAKE) -C ../ceph GOARCH=$(GOARCH) CEPH_ALLOCATOR=$(CEPH_ALLOCATOR) CEPH_BUILD_TYPE=$(CEPH_BUILD_TYPE) $(CEPH_TARBALL)
|
||||
|
||||
# ====================================================================================
|
||||
# Build Rook
|
||||
|
||||
Reference in new issue
Block a user