Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kamu-dev-base: use separate image for dev builds #969

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
File renamed without changes.
File renamed without changes.
11 changes: 7 additions & 4 deletions images/kamu-base-dev/Makefile → images/kamu-dev-base/Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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)
Loading