Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

[meta] add helm 3.6.2 support #1232

Merged
merged 4 commits into from
Jul 8, 2021
Merged
Changes from 1 commit
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
Prev Previous commit
[meta] add retry to goss test
  • Loading branch information
jmlrt committed Jul 7, 2021
commit 24d7989ee4f1fcabde3e598670b3a084e3385e79
16 changes: 12 additions & 4 deletions helpers/examples.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,15 @@ help: ## Display this help

.PHONY: goss
goss: ## Run goss tests
GOSS_CONTAINER=$$(kubectl get --no-headers=true pods -l $(GOSS_SELECTOR) -o custom-columns=:metadata.name --field-selector=status.phase=Running --sort-by=.metadata.creationTimestamp | tail -1 ) && \
echo Testing with pod: $$GOSS_CONTAINER && \
kubectl cp test/$(GOSS_FILE) $$GOSS_CONTAINER:/tmp/$(GOSS_FILE) && \
kubectl exec $$GOSS_CONTAINER -- sh -c "cd /tmp/ && curl -s -L https://github.com/aelsabbahy/goss/releases/download/$(GOSS_VERSION)/goss-linux-amd64 -o goss && chmod +rx ./goss && ./goss --gossfile $(GOSS_FILE) validate --retry-timeout 300s --sleep 5s --color --format documentation"
for i in $$(seq 1 5); do \
if [ -z "$$GOSS_CONTAINER" ]; then \
sleep 5; \
echo "Retrieving pod ($$i/5)"; \
GOSS_CONTAINER=$$(kubectl get --no-headers=true pods -l "$(GOSS_SELECTOR)" -o custom-columns=:metadata.name --field-selector=status.phase=Running --sort-by=.metadata.creationTimestamp | tail -1 ); \
else \
echo "Testing with pod: $$GOSS_CONTAINER" && \
kubectl cp "test/$(GOSS_FILE)" "$$GOSS_CONTAINER:/tmp/$(GOSS_FILE)" && \
kubectl exec "$$GOSS_CONTAINER" -- sh -c "cd /tmp/ && curl -s -L \"https://github.com/aelsabbahy/goss/releases/download/$(GOSS_VERSION)/goss-linux-amd64\" -o goss && chmod +rx ./goss && ./goss --gossfile \"$(GOSS_FILE)\" validate --retry-timeout 300s --sleep 5s --color --format documentation"; \
break; \
fi; \
done