Skip to content
Open
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
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,17 @@ SHA ?= $(shell if [ -d .git ]; then git show -s --format=%h; else echo "unknown_
TAG ?= $(shell if [ -d .git ]; then git tag --points-at HEAD; else echo "local_build"; fi)
IMAGE_REPO ?= "apache"
VERSION = $(TAG)@$(SHA)
CONTAINER_CMD ?= docker
PLATFORM ?= linux/amd64

build-server-image:
make build-server-image -C backend

build-config-ui-image:
cd config-ui; docker build -t $(IMAGE_REPO)/devlake-config-ui:$(TAG) --file ./Dockerfile .
cd config-ui; $(CONTAINER_CMD) build --platform=$(PLATFORM) -t $(IMAGE_REPO)/devlake-config-ui:$(TAG) --file ./Dockerfile .

build-grafana-image:
cd grafana; docker build -t $(IMAGE_REPO)/devlake-dashboard:$(TAG) --file ./backend/Dockerfile .
cd grafana; $(CONTAINER_CMD) build --platform=$(PLATFORM) -t $(IMAGE_REPO)/devlake-dashboard:$(TAG) --file ./Dockerfile .

build-images: build-server-image build-config-ui-image build-grafana-image

Expand Down
10 changes: 7 additions & 3 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,17 @@ RUN for arch in aarch64 x86_64 ; do \
if [ "$arch" = "aarch64" ] ; then \
cmake .. -DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc \
-DBUILD_SHARED_LIBS=ON -DCMAKE_SYSROOT=/rootfs-arm64 \
-DCMAKE_INSTALL_PREFIX=/usr/local/deps/${arch} ; \
-DCMAKE_INSTALL_PREFIX=/usr/local/deps/${arch} \
-DCMAKE_C_FLAGS="-Wno-incompatible-pointer-types" \
-DUSE_BUNDLED_ZLIB=ON ; \
elif [ "$arch" = "x86_64" ] ; then \
cmake .. -DCMAKE_C_COMPILER=x86_64-linux-gnu-gcc \
-DBUILD_SHARED_LIBS=ON -DCMAKE_SYSROOT=/rootfs-amd64 \
-DCMAKE_INSTALL_PREFIX=/usr/local/deps/${arch} ; \
-DCMAKE_INSTALL_PREFIX=/usr/local/deps/${arch} \
-DCMAKE_C_FLAGS="-Wno-incompatible-pointer-types" \
-DUSE_BUNDLED_ZLIB=ON ; \
fi && \
make -j install ; \
make install -j ; \
done


Expand Down
4 changes: 3 additions & 1 deletion backend/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ TAG ?= $(shell if [ -d .git ]; then git tag --points-at HEAD; else echo "local_b
IMAGE_REPO ?= "apache"
VERSION = $(TAG)@$(SHA)
PYTHON_DIR ?= "./python"
CONTAINER_CMD ?= docker
PLATFORM ?= linux/amd64


all: build
Expand Down Expand Up @@ -106,7 +108,7 @@ clean:
@rm -rf bin

build-server-image:
docker build -t $(IMAGE_REPO)/devlake:$(TAG) --build-arg TAG=$(TAG) --build-arg SHA=$(SHA) --file ./Dockerfile .
$(CONTAINER_CMD) build --platform=$(PLATFORM) -t $(IMAGE_REPO)/devlake:$(TAG) --build-arg TAG=$(TAG) --build-arg SHA=$(SHA) --file ./Dockerfile .

migration-script-lint:
go run core/migration/linter/main.go -- $$(find . -path '**/migrationscripts/**.go')