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 16, 2025
1 parent 7b38556 commit cad22a2
Show file tree
Hide file tree
Showing 11 changed files with 871 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/ci_templates/e2e_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,22 @@ 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: "Creating 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: |
echo $SSH_CONNECT_STR_FILE
echo $SSH_BASTION_STR_FILE
{!{- end }!}

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

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

################################################### Collect logs when e2e failed ###########################
- name: "Creating 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: |
echo $SSH_CONNECT_STR_FILE
echo $SSH_BASTION_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 +1037,19 @@ jobs:
bash /deckhouse/testing/cloud_layouts/script.sh run-test
# </template: e2e_run_template>

################################################### Collect logs when e2e failed ###########################
- name: "Creating 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: |
echo $SSH_CONNECT_STR_FILE
echo $SSH_BASTION_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 +1545,19 @@ jobs:
bash /deckhouse/testing/cloud_layouts/script.sh run-test
# </template: e2e_run_template>

################################################### Collect logs when e2e failed ###########################
- name: "Creating 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: |
echo $SSH_CONNECT_STR_FILE
echo $SSH_BASTION_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 +2053,19 @@ jobs:
bash /deckhouse/testing/cloud_layouts/script.sh run-test
# </template: e2e_run_template>

################################################### Collect logs when e2e failed ###########################
- name: "Creating 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: |
echo $SSH_CONNECT_STR_FILE
echo $SSH_BASTION_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 +2561,19 @@ jobs:
bash /deckhouse/testing/cloud_layouts/script.sh run-test
# </template: e2e_run_template>

################################################### Collect logs when e2e failed ###########################
- name: "Creating 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: |
echo $SSH_CONNECT_STR_FILE
echo $SSH_BASTION_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 +3069,19 @@ jobs:
bash /deckhouse/testing/cloud_layouts/script.sh run-test
# </template: e2e_run_template>

################################################### Collect logs when e2e failed ###########################
- name: "Creating 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: |
echo $SSH_CONNECT_STR_FILE
echo $SSH_BASTION_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 +3577,19 @@ jobs:
bash /deckhouse/testing/cloud_layouts/script.sh run-test
# </template: e2e_run_template>

################################################### Collect logs when e2e failed ###########################
- name: "Creating 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: |
echo $SSH_CONNECT_STR_FILE
echo $SSH_BASTION_STR_FILE
################################################### Collect logs when e2e failed ###########################
- name: Read connection string
if: ${{ failure() || cancelled() }}
id: check_stay_failed_cluster
Expand Down
91 changes: 91 additions & 0 deletions .github/workflows/e2e-azure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,19 @@ jobs:
bash /deckhouse/testing/cloud_layouts/script.sh run-test
# </template: e2e_run_template>

################################################### Collect logs when e2e failed ###########################
- name: "Creating 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: |
echo $SSH_CONNECT_STR_FILE
echo $SSH_BASTION_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 +1049,19 @@ jobs:
bash /deckhouse/testing/cloud_layouts/script.sh run-test
# </template: e2e_run_template>

################################################### Collect logs when e2e failed ###########################
- name: "Creating 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: |
echo $SSH_CONNECT_STR_FILE
echo $SSH_BASTION_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 +1565,19 @@ jobs:
bash /deckhouse/testing/cloud_layouts/script.sh run-test
# </template: e2e_run_template>

################################################### Collect logs when e2e failed ###########################
- name: "Creating 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: |
echo $SSH_CONNECT_STR_FILE
echo $SSH_BASTION_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 +2081,19 @@ jobs:
bash /deckhouse/testing/cloud_layouts/script.sh run-test
# </template: e2e_run_template>

################################################### Collect logs when e2e failed ###########################
- name: "Creating 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: |
echo $SSH_CONNECT_STR_FILE
echo $SSH_BASTION_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 +2597,19 @@ jobs:
bash /deckhouse/testing/cloud_layouts/script.sh run-test
# </template: e2e_run_template>

################################################### Collect logs when e2e failed ###########################
- name: "Creating 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: |
echo $SSH_CONNECT_STR_FILE
echo $SSH_BASTION_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 +3113,19 @@ jobs:
bash /deckhouse/testing/cloud_layouts/script.sh run-test
# </template: e2e_run_template>

################################################### Collect logs when e2e failed ###########################
- name: "Creating 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: |
echo $SSH_CONNECT_STR_FILE
echo $SSH_BASTION_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 +3629,19 @@ jobs:
bash /deckhouse/testing/cloud_layouts/script.sh run-test
# </template: e2e_run_template>

################################################### Collect logs when e2e failed ###########################
- name: "Creating 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: |
echo $SSH_CONNECT_STR_FILE
echo $SSH_BASTION_STR_FILE
################################################### Collect logs when e2e failed ###########################
- name: Read connection string
if: ${{ failure() || cancelled() }}
id: check_stay_failed_cluster
Expand Down
Loading

0 comments on commit cad22a2

Please sign in to comment.