Skip to content

Commit

Permalink
chore: Add create log artifacts when e2e test fails
Browse files Browse the repository at this point in the history
Signed-off-by: Alexey Paschenko <[email protected]>
  • Loading branch information
Steamvis committed Jan 17, 2025
1 parent 7b38556 commit d1fcb18
Show file tree
Hide file tree
Showing 11 changed files with 733 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/ci_templates/e2e_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,19 @@ check_e2e_labels:
INITIAL_IMAGE_TAG: ${{ steps.setup.outputs.initial-image-tag }}
{!{- tmpl.Exec "e2e_run_template" (slice .provider "run-test" (coll.Has $ctx "manualRun") ) | strings.Indent 6 }!}

################################################### Collect logs when e2e failed ###########################
{!{- if coll.Has $ctx "manualRun" }!}
- name: "Create log artifacts when e2e testing fails"
id: create_e2e_tests_logs
if: failure() || cancelled()
env:
SSH_CONNECT_STR_FILE: ${{ steps.e2e_test_run.outputs.ssh_connection_str_file }}
SSH_BASTION_STR_FILE: ${{ steps.e2e_test_run.outputs.ssh_bastion_str_file }}
run: |
cat $SSH_CONNECT_STR_FILE
{!{- end }!}
################################################### Collect logs when e2e failed ###########################

{!{- if coll.Has $ctx "manualRun" }!}
- name: Read connection string
if: ${{ failure() || cancelled() }}
Expand Down
77 changes: 77 additions & 0 deletions .github/workflows/e2e-aws.yml
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,17 @@ jobs:
bash /deckhouse/testing/cloud_layouts/script.sh run-test
# </template: e2e_run_template>

################################################### Collect logs when e2e failed ###########################
- name: "Create log artifacts when e2e testing fails"
id: create_e2e_tests_logs
if: failure() || cancelled()
env:
SSH_CONNECT_STR_FILE: ${{ steps.e2e_test_run.outputs.ssh_connection_str_file }}
SSH_BASTION_STR_FILE: ${{ steps.e2e_test_run.outputs.ssh_bastion_str_file }}
run: |
cat $SSH_CONNECT_STR_FILE
################################################### Collect logs when e2e failed ###########################
- name: Read connection string
if: ${{ failure() || cancelled() }}
id: check_stay_failed_cluster
Expand Down Expand Up @@ -1024,6 +1035,17 @@ jobs:
bash /deckhouse/testing/cloud_layouts/script.sh run-test
# </template: e2e_run_template>

################################################### Collect logs when e2e failed ###########################
- name: "Create log artifacts when e2e testing fails"
id: create_e2e_tests_logs
if: failure() || cancelled()
env:
SSH_CONNECT_STR_FILE: ${{ steps.e2e_test_run.outputs.ssh_connection_str_file }}
SSH_BASTION_STR_FILE: ${{ steps.e2e_test_run.outputs.ssh_bastion_str_file }}
run: |
cat $SSH_CONNECT_STR_FILE
################################################### Collect logs when e2e failed ###########################
- name: Read connection string
if: ${{ failure() || cancelled() }}
id: check_stay_failed_cluster
Expand Down Expand Up @@ -1519,6 +1541,17 @@ jobs:
bash /deckhouse/testing/cloud_layouts/script.sh run-test
# </template: e2e_run_template>

################################################### Collect logs when e2e failed ###########################
- name: "Create log artifacts when e2e testing fails"
id: create_e2e_tests_logs
if: failure() || cancelled()
env:
SSH_CONNECT_STR_FILE: ${{ steps.e2e_test_run.outputs.ssh_connection_str_file }}
SSH_BASTION_STR_FILE: ${{ steps.e2e_test_run.outputs.ssh_bastion_str_file }}
run: |
cat $SSH_CONNECT_STR_FILE
################################################### Collect logs when e2e failed ###########################
- name: Read connection string
if: ${{ failure() || cancelled() }}
id: check_stay_failed_cluster
Expand Down Expand Up @@ -2014,6 +2047,17 @@ jobs:
bash /deckhouse/testing/cloud_layouts/script.sh run-test
# </template: e2e_run_template>

################################################### Collect logs when e2e failed ###########################
- name: "Create log artifacts when e2e testing fails"
id: create_e2e_tests_logs
if: failure() || cancelled()
env:
SSH_CONNECT_STR_FILE: ${{ steps.e2e_test_run.outputs.ssh_connection_str_file }}
SSH_BASTION_STR_FILE: ${{ steps.e2e_test_run.outputs.ssh_bastion_str_file }}
run: |
cat $SSH_CONNECT_STR_FILE
################################################### Collect logs when e2e failed ###########################
- name: Read connection string
if: ${{ failure() || cancelled() }}
id: check_stay_failed_cluster
Expand Down Expand Up @@ -2509,6 +2553,17 @@ jobs:
bash /deckhouse/testing/cloud_layouts/script.sh run-test
# </template: e2e_run_template>

################################################### Collect logs when e2e failed ###########################
- name: "Create log artifacts when e2e testing fails"
id: create_e2e_tests_logs
if: failure() || cancelled()
env:
SSH_CONNECT_STR_FILE: ${{ steps.e2e_test_run.outputs.ssh_connection_str_file }}
SSH_BASTION_STR_FILE: ${{ steps.e2e_test_run.outputs.ssh_bastion_str_file }}
run: |
cat $SSH_CONNECT_STR_FILE
################################################### Collect logs when e2e failed ###########################
- name: Read connection string
if: ${{ failure() || cancelled() }}
id: check_stay_failed_cluster
Expand Down Expand Up @@ -3004,6 +3059,17 @@ jobs:
bash /deckhouse/testing/cloud_layouts/script.sh run-test
# </template: e2e_run_template>

################################################### Collect logs when e2e failed ###########################
- name: "Create log artifacts when e2e testing fails"
id: create_e2e_tests_logs
if: failure() || cancelled()
env:
SSH_CONNECT_STR_FILE: ${{ steps.e2e_test_run.outputs.ssh_connection_str_file }}
SSH_BASTION_STR_FILE: ${{ steps.e2e_test_run.outputs.ssh_bastion_str_file }}
run: |
cat $SSH_CONNECT_STR_FILE
################################################### Collect logs when e2e failed ###########################
- name: Read connection string
if: ${{ failure() || cancelled() }}
id: check_stay_failed_cluster
Expand Down Expand Up @@ -3499,6 +3565,17 @@ jobs:
bash /deckhouse/testing/cloud_layouts/script.sh run-test
# </template: e2e_run_template>

################################################### Collect logs when e2e failed ###########################
- name: "Create log artifacts when e2e testing fails"
id: create_e2e_tests_logs
if: failure() || cancelled()
env:
SSH_CONNECT_STR_FILE: ${{ steps.e2e_test_run.outputs.ssh_connection_str_file }}
SSH_BASTION_STR_FILE: ${{ steps.e2e_test_run.outputs.ssh_bastion_str_file }}
run: |
cat $SSH_CONNECT_STR_FILE
################################################### Collect logs when e2e failed ###########################
- name: Read connection string
if: ${{ failure() || cancelled() }}
id: check_stay_failed_cluster
Expand Down
77 changes: 77 additions & 0 deletions .github/workflows/e2e-azure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,17 @@ jobs:
bash /deckhouse/testing/cloud_layouts/script.sh run-test
# </template: e2e_run_template>

################################################### Collect logs when e2e failed ###########################
- name: "Create log artifacts when e2e testing fails"
id: create_e2e_tests_logs
if: failure() || cancelled()
env:
SSH_CONNECT_STR_FILE: ${{ steps.e2e_test_run.outputs.ssh_connection_str_file }}
SSH_BASTION_STR_FILE: ${{ steps.e2e_test_run.outputs.ssh_bastion_str_file }}
run: |
cat $SSH_CONNECT_STR_FILE
################################################### Collect logs when e2e failed ###########################
- name: Read connection string
if: ${{ failure() || cancelled() }}
id: check_stay_failed_cluster
Expand Down Expand Up @@ -1036,6 +1047,17 @@ jobs:
bash /deckhouse/testing/cloud_layouts/script.sh run-test
# </template: e2e_run_template>

################################################### Collect logs when e2e failed ###########################
- name: "Create log artifacts when e2e testing fails"
id: create_e2e_tests_logs
if: failure() || cancelled()
env:
SSH_CONNECT_STR_FILE: ${{ steps.e2e_test_run.outputs.ssh_connection_str_file }}
SSH_BASTION_STR_FILE: ${{ steps.e2e_test_run.outputs.ssh_bastion_str_file }}
run: |
cat $SSH_CONNECT_STR_FILE
################################################### Collect logs when e2e failed ###########################
- name: Read connection string
if: ${{ failure() || cancelled() }}
id: check_stay_failed_cluster
Expand Down Expand Up @@ -1539,6 +1561,17 @@ jobs:
bash /deckhouse/testing/cloud_layouts/script.sh run-test
# </template: e2e_run_template>

################################################### Collect logs when e2e failed ###########################
- name: "Create log artifacts when e2e testing fails"
id: create_e2e_tests_logs
if: failure() || cancelled()
env:
SSH_CONNECT_STR_FILE: ${{ steps.e2e_test_run.outputs.ssh_connection_str_file }}
SSH_BASTION_STR_FILE: ${{ steps.e2e_test_run.outputs.ssh_bastion_str_file }}
run: |
cat $SSH_CONNECT_STR_FILE
################################################### Collect logs when e2e failed ###########################
- name: Read connection string
if: ${{ failure() || cancelled() }}
id: check_stay_failed_cluster
Expand Down Expand Up @@ -2042,6 +2075,17 @@ jobs:
bash /deckhouse/testing/cloud_layouts/script.sh run-test
# </template: e2e_run_template>

################################################### Collect logs when e2e failed ###########################
- name: "Create log artifacts when e2e testing fails"
id: create_e2e_tests_logs
if: failure() || cancelled()
env:
SSH_CONNECT_STR_FILE: ${{ steps.e2e_test_run.outputs.ssh_connection_str_file }}
SSH_BASTION_STR_FILE: ${{ steps.e2e_test_run.outputs.ssh_bastion_str_file }}
run: |
cat $SSH_CONNECT_STR_FILE
################################################### Collect logs when e2e failed ###########################
- name: Read connection string
if: ${{ failure() || cancelled() }}
id: check_stay_failed_cluster
Expand Down Expand Up @@ -2545,6 +2589,17 @@ jobs:
bash /deckhouse/testing/cloud_layouts/script.sh run-test
# </template: e2e_run_template>

################################################### Collect logs when e2e failed ###########################
- name: "Create log artifacts when e2e testing fails"
id: create_e2e_tests_logs
if: failure() || cancelled()
env:
SSH_CONNECT_STR_FILE: ${{ steps.e2e_test_run.outputs.ssh_connection_str_file }}
SSH_BASTION_STR_FILE: ${{ steps.e2e_test_run.outputs.ssh_bastion_str_file }}
run: |
cat $SSH_CONNECT_STR_FILE
################################################### Collect logs when e2e failed ###########################
- name: Read connection string
if: ${{ failure() || cancelled() }}
id: check_stay_failed_cluster
Expand Down Expand Up @@ -3048,6 +3103,17 @@ jobs:
bash /deckhouse/testing/cloud_layouts/script.sh run-test
# </template: e2e_run_template>

################################################### Collect logs when e2e failed ###########################
- name: "Create log artifacts when e2e testing fails"
id: create_e2e_tests_logs
if: failure() || cancelled()
env:
SSH_CONNECT_STR_FILE: ${{ steps.e2e_test_run.outputs.ssh_connection_str_file }}
SSH_BASTION_STR_FILE: ${{ steps.e2e_test_run.outputs.ssh_bastion_str_file }}
run: |
cat $SSH_CONNECT_STR_FILE
################################################### Collect logs when e2e failed ###########################
- name: Read connection string
if: ${{ failure() || cancelled() }}
id: check_stay_failed_cluster
Expand Down Expand Up @@ -3551,6 +3617,17 @@ jobs:
bash /deckhouse/testing/cloud_layouts/script.sh run-test
# </template: e2e_run_template>

################################################### Collect logs when e2e failed ###########################
- name: "Create log artifacts when e2e testing fails"
id: create_e2e_tests_logs
if: failure() || cancelled()
env:
SSH_CONNECT_STR_FILE: ${{ steps.e2e_test_run.outputs.ssh_connection_str_file }}
SSH_BASTION_STR_FILE: ${{ steps.e2e_test_run.outputs.ssh_bastion_str_file }}
run: |
cat $SSH_CONNECT_STR_FILE
################################################### Collect logs when e2e failed ###########################
- name: Read connection string
if: ${{ failure() || cancelled() }}
id: check_stay_failed_cluster
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/e2e-daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,9 @@ jobs:
# </template: e2e_run_template>

################################################### Collect logs when e2e failed ###########################
################################################### Collect logs when e2e failed ###########################

- name: Cleanup bootstrapped cluster
if: always()
id: cleanup_cluster
Expand Down Expand Up @@ -930,6 +933,9 @@ jobs:
# </template: e2e_run_template>

################################################### Collect logs when e2e failed ###########################
################################################### Collect logs when e2e failed ###########################

- name: Cleanup bootstrapped cluster
if: always()
id: cleanup_cluster
Expand Down Expand Up @@ -1395,6 +1401,9 @@ jobs:
# </template: e2e_run_template>

################################################### Collect logs when e2e failed ###########################
################################################### Collect logs when e2e failed ###########################

- name: Cleanup bootstrapped cluster
if: always()
id: cleanup_cluster
Expand Down Expand Up @@ -1859,6 +1868,9 @@ jobs:
# </template: e2e_run_template>

################################################### Collect logs when e2e failed ###########################
################################################### Collect logs when e2e failed ###########################

- name: Cleanup bootstrapped cluster
if: always()
id: cleanup_cluster
Expand Down Expand Up @@ -2321,6 +2333,9 @@ jobs:
# </template: e2e_run_template>

################################################### Collect logs when e2e failed ###########################
################################################### Collect logs when e2e failed ###########################

- name: Cleanup bootstrapped cluster
if: always()
id: cleanup_cluster
Expand Down Expand Up @@ -2783,6 +2798,9 @@ jobs:
# </template: e2e_run_template>

################################################### Collect logs when e2e failed ###########################
################################################### Collect logs when e2e failed ###########################

- name: Cleanup bootstrapped cluster
if: always()
id: cleanup_cluster
Expand Down Expand Up @@ -3243,6 +3261,9 @@ jobs:
# </template: e2e_run_template>

################################################### Collect logs when e2e failed ###########################
################################################### Collect logs when e2e failed ###########################

- name: Cleanup bootstrapped cluster
if: always()
id: cleanup_cluster
Expand Down Expand Up @@ -3711,6 +3732,9 @@ jobs:
# </template: e2e_run_template>

################################################### Collect logs when e2e failed ###########################
################################################### Collect logs when e2e failed ###########################

- name: Cleanup bootstrapped cluster
if: always()
id: cleanup_cluster
Expand Down Expand Up @@ -4177,6 +4201,9 @@ jobs:
# </template: e2e_run_template>

################################################### Collect logs when e2e failed ###########################
################################################### Collect logs when e2e failed ###########################

- name: Cleanup bootstrapped cluster
if: always()
id: cleanup_cluster
Expand Down
Loading

0 comments on commit d1fcb18

Please sign in to comment.