Skip to content

Commit

Permalink
Add target to delete helm namespace and trigger codefresh webhook (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
osterman authored Jun 12, 2018
1 parent a325420 commit 9cf062f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
15 changes: 15 additions & 0 deletions modules/codefresh/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
CF_TRIGGER_TYPE ?= build
CF_TRIGGER_REPO_NAME ?= $(CF_REPO_NAME)
CF_TRIGGER_BRANCH ?= $(CF_BRANCH)
CF_TRIGGER_REPO_OWNER ?= $(CF_REPO_OWNER)

## Trigger a CodeFresh WebHook
codefresh/trigger/webhook:
@curl 'https://g.codefresh.io/api/builds/$(CF_TRIGGER_SERVICE_ID)' \
--compressed \
-H 'content-type:application/json; charset=utf-8' \
-H 'x-access-token: $(CF_ACCESS_TOKEN)' \
--data-binary \
'{"serviceId":"$(CF_TRIGGER_SERVICE_ID)","type":"$(CF_TRIGGER_TYPE)","repoOwner":"$(CF_TRIGGER_REPO_OWNER)","branch":"$(CF_TRIGGER_BRANCH)","repoName":"$(CF_TRIGGER_REPO_NAME)"}'


4 changes: 4 additions & 0 deletions modules/helm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,7 @@ helm/serve/index:
helm/toolbox/upsert:
@$(BUILD_HARNESS_PATH)/bin/helm_toolbox.sh upsert

## Delete all releases in a namespace as well as the namespace
helm/delete/namespace:
@helm list --namespace $(NAMESPACE) --short | xargs helm delete --purge
@kubectl delete namespace $(NAMESPACE) --ignore-not-found

0 comments on commit 9cf062f

Please sign in to comment.