Skip to content

Commit

Permalink
ci: fix start and stop makefile targets
Browse files Browse the repository at this point in the history
Signed-off-by: Lenin Mehedy <lenin.mehedy@swirldslabs.com>
  • Loading branch information
leninmehedy committed Oct 4, 2023
1 parent 0f3d319 commit f394c4a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions dev/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,10 @@ run-func:
source "${SCRIPTS_DIR}/${SCRIPT_NAME}" && ${FUNC}

.PHONY: start
start: deploy-minio-operator-if-required update-helm-dependencies deploy-network setup-nodes start-nodes
start: ci-deploy-network setup-nodes start-nodes

.PHONY: stop
stop: stop-nodes destroy-network

.PHONY: restart
restart: stop-nodes start-nodes
Expand Down Expand Up @@ -242,7 +245,8 @@ deploy-all:
# Enable cleanup_test function so that even if test fails, we cleanup the cluster.
# We are only enabling this in this make target, however if necessary, similar pattern can be used in other targets.
# Ref: https://stackoverflow.com/questions/28597794/how-can-i-clean-up-after-an-error-in-a-makefile
function cleanup_test {
# NOTE: It needs latest make (version ~=4.3)
function cleanup_test () {
$(MAKE) destroy-network
}
trap cleanup_test EXIT # always destroy-network on exit
Expand Down
4 changes: 2 additions & 2 deletions dev/scripts/docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ function build_kubectl_bats() {
[[ -z "${CLUSTER_NAME}" ]] && echo "ERROR: [build_kubectl_bats] Cluster name is required" && return 1

echo ""
echo "Building kubectl-bats image"
echo "Building kubectl-bats image"
echo "-----------------------------------------------------------------------------------------------------"
cd "${DOCKERFILE_DIR}/kubectl-bats" && docker build -t "${KUBECTL_BATS_IMAGE}" .
cd "${DOCKERFILE_DIR}/kubectl-bats" && docker build -t "${KUBECTL_BATS_IMAGE}" .
kind load docker-image "${KUBECTL_BATS_IMAGE}" -n "${CLUSTER_NAME}"
}

0 comments on commit f394c4a

Please sign in to comment.