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

Use release kjob v0.1.0 version. #315

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
19 changes: 9 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,25 @@ KUEUE_REPO=https://github.com/kubernetes-sigs/kueue.git

KUBECTL_VERSION := $(shell curl -L -s https://dl.k8s.io/release/stable.txt)
KUEUE_VERSION=v0.9.1
KJOB_VERSION=v0.1.0

OS := $(shell uname -s | tr A-Z a-z)
PLATFORM := $(shell uname -m | sed -e 's/aarch64/arm64/' | sed -e 's/x86_64/amd64/')

KUBECTL_URL = "https://dl.k8s.io/release/$(KUBECTL_VERSION)/bin/$(OS)/$(PLATFORM)/kubectl"
KUEUECTL_URL = "https://github.com/kubernetes-sigs/kueue/releases/download/$(KUEUE_VERSION)/kubectl-kueue-$(OS)-$(PLATFORM)"
KJOBCTL_URL = "https://github.com/kubernetes-sigs/kjob/releases/download/$(KJOB_VERSION)/kubectl-kjob-$(OS)-$(PLATFORM)"

PROJECT_DIR := $(realpath $(shell dirname $(firstword $(MAKEFILE_LIST))))
KJOB_DOCKER_IMG := xpk_kjob
KJOB_DOCKER_CONTAINER := xpk_kjob_container
BIN_PATH=$(PROJECT_DIR)/bin

.PHONY: install
install: check-python check-gcloud install-kueuectl install-kjob pip-install
install: check-python check-gcloud install-kueuectl install-kjobctl pip-install

.PHONY: install-dev
install-dev: check-python check-gcloud mkdir-bin install-kubectl install-kueuectl install-kjob pip-install install-pytest
install-dev: check-python check-gcloud mkdir-bin install-kubectl install-kueuectl install-kjobctl pip-install install-pytest

.PHONY: pip-install
pip-install:
Expand All @@ -35,14 +37,6 @@ run-unittests:
run-integrationtests:
pytest src/xpk/core/tests/integration/

.PHONY: install-kjob
install-kjob: install-kubectl
docker build -f tools/Dockerfile-kjob -t $(KJOB_DOCKER_IMG) tools/
docker run -idt --name $(KJOB_DOCKER_CONTAINER) $(KJOB_DOCKER_IMG)
docker cp $(KJOB_DOCKER_CONTAINER):/kjob/bin/kubectl-kjob $(BIN_PATH)/kubectl-kjob
docker rm -f $(KJOB_DOCKER_CONTAINER)
docker image rm $(KJOB_DOCKER_IMG)
$(BIN_PATH)/kubectl-kjob --help
.PHONY: mkdir-bin
mkdir-bin:
mkdir -p $(BIN_PATH)
Expand All @@ -57,6 +51,11 @@ install-kueuectl: install-kubectl
curl -Lo $(BIN_PATH)/kubectl-kueue $(KUEUECTL_URL)
chmod +x $(BIN_PATH)/kubectl-kueue

.PHONY: install-kjobctl
install-kjobctl: install-kubectl
curl -Lo $(BIN_PATH)/kubectl-kjob $(KJOBCTL_URL)
chmod +x $(BIN_PATH)/kubectl-kjob

.PHONY: check-gcloud
check-gcloud:
gcloud version || (echo "gcloud not installed, use this link to install: https://cloud.google.com/sdk/docs/install" && exit 1)
Expand Down
Loading