Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print post-test cluster-info #924

Merged
merged 3 commits into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
7 changes: 6 additions & 1 deletion .github/workflows/operator-verify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ jobs:
make -C tests/operator test
env:
IMG: europe-docker.pkg.dev/kyma-project/prod/serverless-operator:${{ github.sha }}
- name: collect cluster-info
if: ${{ always() }}
run: make -C tests/operator cluster-info

operator-upgrade-test:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -101,6 +104,9 @@ jobs:
make -C tests/operator test
env:
IMG: europe-docker.pkg.dev/kyma-project/prod/serverless-operator:${{ github.sha }}
- name: collect cluster-info
if: ${{ always() }}
run: make -C tests/operator cluster-info

gardener-integration-test:
if: github.event_name == 'push'
Expand Down Expand Up @@ -128,7 +134,6 @@ jobs:
env:
IMG: europe-docker.pkg.dev/kyma-project/prod/serverless-operator:${{ github.sha }}
- name: deprovision gardener
# https://docs.github.com/en/actions/learn-github-actions/expressions#always
if: ${{ always() }}
run: make -C hack deprovision-gardener
env:
Expand Down
14 changes: 14 additions & 0 deletions tests/operator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,17 @@ include ${PROJECT_ROOT}/hack/help.mk
.PHONY: test
test: ## Run integration test.
go run main.go

.PHONY: cluster-info
Copy link
Contributor

@dbadura dbadura Apr 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can try to look, use and modify this script: https://github.com/kyma-project/serverless/blob/main/tests/serverless/collect_logs.sh
You can also consider to move it to hack.

cluster-info: ## Print useful info about the cluster regarding integration run
@echo "####################### Operator Logs #######################"
@kubectl logs -n kyma-system -l app.kubernetes.io/component=serverless-operator.kyma-project.io --tail=-1 || true
@echo ""

@echo "####################### Serverless CR #######################"
@kubectl get serverless -A -oyaml || true
@echo ""

@echo "####################### Pods #######################"
@kubectl get pods -A || true
@echo ""
2 changes: 1 addition & 1 deletion tests/operator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
)

var (
testTimeout = time.Second * 120
testTimeout = time.Minute * 10
)

func main() {
Expand Down
Loading