From b1be7335668283e854974c3d8b04c8c08f8715ac Mon Sep 17 00:00:00 2001 From: Dima Pristupa Date: Fri, 22 Nov 2024 16:57:56 +0200 Subject: [PATCH] kamu-dev-base: use separate image for dev builds --- images/{kamu-base-dev => kamu-dev-base}/.gitignore | 0 images/{kamu-base-dev => kamu-dev-base}/Dockerfile | 0 images/{kamu-base-dev => kamu-dev-base}/Makefile | 11 +++++++---- 3 files changed, 7 insertions(+), 4 deletions(-) rename images/{kamu-base-dev => kamu-dev-base}/.gitignore (100%) rename images/{kamu-base-dev => kamu-dev-base}/Dockerfile (100%) rename images/{kamu-base-dev => kamu-dev-base}/Makefile (66%) diff --git a/images/kamu-base-dev/.gitignore b/images/kamu-dev-base/.gitignore similarity index 100% rename from images/kamu-base-dev/.gitignore rename to images/kamu-dev-base/.gitignore diff --git a/images/kamu-base-dev/Dockerfile b/images/kamu-dev-base/Dockerfile similarity index 100% rename from images/kamu-base-dev/Dockerfile rename to images/kamu-dev-base/Dockerfile diff --git a/images/kamu-base-dev/Makefile b/images/kamu-dev-base/Makefile similarity index 66% rename from images/kamu-base-dev/Makefile rename to images/kamu-dev-base/Makefile index e8820f83ab..201f525a67 100644 --- a/images/kamu-base-dev/Makefile +++ b/images/kamu-dev-base/Makefile @@ -1,12 +1,15 @@ KAMU_BASE_VERSION = $(shell cargo metadata --format-version 1 | jq -r '.packages[] | select( .name == "kamu") | .version') IMAGE_REPO=ghcr.io/kamu-data +IMAGE_NAME=kamu-dev-base TARGET=x86_64-unknown-linux-gnu -TAG=dev-$(shell git rev-parse --abbrev-ref HEAD | sed 's/\//-/g') +# Branch name +TAG=$(shell git rev-parse --abbrev-ref HEAD | sed 's/\//-/g') .PHONY: build build: - cd ../../ && RUSTFLAGS="" cross build -p kamu-cli --release --target=$(TARGET) --features ftp + # cargo binstall cross + cd ../../ && RUSTFLAGS="" cross build -p kamu-cli --release --target=$(TARGET) --features ingest-ftp .PHONY: image @@ -15,11 +18,11 @@ image: build cp ../../target/$(TARGET)/release/kamu-cli tmp/kamu-cli docker build \ --build-arg KAMU_BASE_VERSION=$(KAMU_BASE_VERSION) \ - -t $(IMAGE_REPO)/kamu-base:$(TAG) \ + -t $(IMAGE_REPO)/$(IMAGE_NAME):$(TAG) \ . rm -rf ./tmp .PHONY: image-push image-push: - docker push $(IMAGE_REPO)/kamu-base:$(TAG) + docker push $(IMAGE_REPO)/$(IMAGE_NAME):$(TAG)