Skip to content

Commit

Permalink
Support running make commands from within the build container
Browse files Browse the repository at this point in the history
  • Loading branch information
hairyhum committed Apr 9, 2024
1 parent f97d6c3 commit ba8e67b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ ifeq ($(DOCKER_BUILD),"true")
@echo "running CMD in the containerized build environment"
@PWD=$(PWD) ARCH=$(ARCH) PKG=$(PKG) GITHUB_TOKEN=$(GITHUB_TOKEN) CMD="$(CMD)" /bin/bash ./build/run_container.sh run
else
@/bin/bash $(CMD)
@/bin/bash -c "$(CMD)"
endif

clean: dotfile-clean bin-clean
Expand Down
3 changes: 2 additions & 1 deletion build/run_container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ set -o nounset
PWD="${PWD:-$(pwd)}"

DOCS_BUILD_IMAGE="${DOCS_BUILD_IMAGE:-ghcr.io/kanisterio/docker-sphinx:0.2.0}"
BUILD_IMAGE="${BUILD_IMAGE:-ghcr.io/kanisterio/build:v0.0.28}"
BUILD_IMAGE="${BUILD_IMAGE:-ghcr.io/kanisterio/build:v0.0.28-reno}"
PKG="${PKG:-github.com/kanisterio/kanister}"

ARCH="${ARCH:-amd64}"
Expand Down Expand Up @@ -64,6 +64,7 @@ run_build_container() {
--rm \
--net host \
-e GITHUB_TOKEN="${github_token}" \
-e DOCKER_BUILD="false" \
${minikube_dir_binding} \
-v "${HOME}/.kube:/root/.kube" \
-v "${PWD}/.go/pkg:/go/pkg" \
Expand Down

0 comments on commit ba8e67b

Please sign in to comment.