Skip to content

Commit

Permalink
Add make _docker-load task
Browse files Browse the repository at this point in the history
  • Loading branch information
hjkatz committed Dec 19, 2024
1 parent 0158c23 commit e97b90e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 1 addition & 3 deletions .github/actions/build-and-test/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,10 @@ runs:
E2E_BINDING_NAME: k8s/e2e-${{ github.run_id }}
# use the latest image built in this run
IMG: ngrok-operator-${{ github.run_id }}
MAKE_DOCKER_LOAD_COMMAND: "k3d image import ngrok-operator-${{ github.run_id }}"
run: |
make e2e-deploy
# also load the image so the deploy can succeed
k3d image import $IMG
- name: Check if operator is up
shell: bash
run: |
Expand Down
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,12 @@ docker-build: ## Build docker image with the manager.
docker-push: ## Push docker image with the manager.
docker push ${IMG}

.PHONY: _docker-load
_docker-load: ## Load the docker image into a k8s cluster, as defined by $MAKE_DOCKER_LOAD_COMMAND
ifdef MAKE_DOCKER_LOAD_COMMAND
$(MAKE_DOCKER_LOAD_COMMAND)
endif

##@ Deployment

ifndef ignore-not-found
Expand Down Expand Up @@ -298,7 +304,7 @@ helm-update-snapshots-no-deps: ## Update helm unittest snapshots without rebuild

# NOTE: You will also need to load ngrok-operator:latest image into your local cluster for this to work
.PHONY: e2e-deploy ## Deploy the operator for e2e tests
e2e-deploy: _deploy-check-env-vars docker-build manifests kustomize _helm_setup
e2e-deploy: _deploy-check-env-vars docker-build _docker-load manifests kustomize _helm_setup
# create some namespaces for bindings tests
kubectl create ns e2e || true

Expand Down

0 comments on commit e97b90e

Please sign in to comment.