-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Add create log artifacts when e2e test fails
Signed-off-by: Alexey Paschenko <[email protected]>
- Loading branch information
Showing
11 changed files
with
2,205 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -529,6 +529,40 @@ jobs: | |
bash /deckhouse/testing/cloud_layouts/script.sh run-test | ||
# </template: e2e_run_template> | ||
|
||
################################################### Collect logs when e2e failed ########################### | ||
- name: "Create log artifacts archive" | ||
id: create_e2e_tests_logs | ||
if: always() | ||
env: | ||
PROVIDER: AWS | ||
LAYOUT: WithoutNAT | ||
LAYOUT_SSH_KEY: ${{ secrets.LAYOUT_SSH_KEY }} | ||
SSH_CONNECT_STR_FILE: ${{ steps.e2e_test_run.outputs.ssh_connection_str_file }} | ||
run: | | ||
ssh_private_key_path="/tmp/sshkey" | ||
rm -f "$ssh_private_key_path" | ||
base64 -d <<< "$LAYOUT_SSH_KEY" > "$ssh_private_key_path" | ||
chmod 0600 "$ssh_private_key_path" | ||
eval $(ssh-agent) | ||
ssh-add $ssh_private_key_path | ||
ssh $(cat ${{ env.SSH_CONNECT_STR_FILE }}) -t 'sudo su - -c "kubectl -n d8-system exec svc/deckhouse-leader -c deckhouse \ | ||
-- deckhouse-controller collect-debug-info \ | ||
> /tmp/deckhouse-debug.tar.gz"' | ||
scp $(cat ${{ env.SSH_CONNECT_STR_FILE }}):/tmp/deckhouse-debug.tar-gz /tmp/deckhouse-debug.tar-gz | ||
- name: "Upload log artifacts archive" | ||
id: upload_e2e_tests_logs | ||
if: failure() || cancelled() | ||
uses: actions/[email protected] | ||
with: | ||
name: deckhouse-debug | ||
path: /tmp/deckhouse-debug.tar-gz | ||
retention-days: 7 | ||
compression-level: 9 | ||
################################################### Collect logs when e2e failed ########################### | ||
- name: Read connection string | ||
if: ${{ failure() || cancelled() }} | ||
id: check_stay_failed_cluster | ||
|
@@ -1024,6 +1058,40 @@ jobs: | |
bash /deckhouse/testing/cloud_layouts/script.sh run-test | ||
# </template: e2e_run_template> | ||
|
||
################################################### Collect logs when e2e failed ########################### | ||
- name: "Create log artifacts archive" | ||
id: create_e2e_tests_logs | ||
if: always() | ||
env: | ||
PROVIDER: AWS | ||
LAYOUT: WithoutNAT | ||
LAYOUT_SSH_KEY: ${{ secrets.LAYOUT_SSH_KEY }} | ||
SSH_CONNECT_STR_FILE: ${{ steps.e2e_test_run.outputs.ssh_connection_str_file }} | ||
run: | | ||
ssh_private_key_path="/tmp/sshkey" | ||
rm -f "$ssh_private_key_path" | ||
base64 -d <<< "$LAYOUT_SSH_KEY" > "$ssh_private_key_path" | ||
chmod 0600 "$ssh_private_key_path" | ||
eval $(ssh-agent) | ||
ssh-add $ssh_private_key_path | ||
ssh $(cat ${{ env.SSH_CONNECT_STR_FILE }}) -t 'sudo su - -c "kubectl -n d8-system exec svc/deckhouse-leader -c deckhouse \ | ||
-- deckhouse-controller collect-debug-info \ | ||
> /tmp/deckhouse-debug.tar.gz"' | ||
scp $(cat ${{ env.SSH_CONNECT_STR_FILE }}):/tmp/deckhouse-debug.tar-gz /tmp/deckhouse-debug.tar-gz | ||
- name: "Upload log artifacts archive" | ||
id: upload_e2e_tests_logs | ||
if: failure() || cancelled() | ||
uses: actions/[email protected] | ||
with: | ||
name: deckhouse-debug | ||
path: /tmp/deckhouse-debug.tar-gz | ||
retention-days: 7 | ||
compression-level: 9 | ||
################################################### Collect logs when e2e failed ########################### | ||
- name: Read connection string | ||
if: ${{ failure() || cancelled() }} | ||
id: check_stay_failed_cluster | ||
|
@@ -1519,6 +1587,40 @@ jobs: | |
bash /deckhouse/testing/cloud_layouts/script.sh run-test | ||
# </template: e2e_run_template> | ||
|
||
################################################### Collect logs when e2e failed ########################### | ||
- name: "Create log artifacts archive" | ||
id: create_e2e_tests_logs | ||
if: always() | ||
env: | ||
PROVIDER: AWS | ||
LAYOUT: WithoutNAT | ||
LAYOUT_SSH_KEY: ${{ secrets.LAYOUT_SSH_KEY }} | ||
SSH_CONNECT_STR_FILE: ${{ steps.e2e_test_run.outputs.ssh_connection_str_file }} | ||
run: | | ||
ssh_private_key_path="/tmp/sshkey" | ||
rm -f "$ssh_private_key_path" | ||
base64 -d <<< "$LAYOUT_SSH_KEY" > "$ssh_private_key_path" | ||
chmod 0600 "$ssh_private_key_path" | ||
eval $(ssh-agent) | ||
ssh-add $ssh_private_key_path | ||
ssh $(cat ${{ env.SSH_CONNECT_STR_FILE }}) -t 'sudo su - -c "kubectl -n d8-system exec svc/deckhouse-leader -c deckhouse \ | ||
-- deckhouse-controller collect-debug-info \ | ||
> /tmp/deckhouse-debug.tar.gz"' | ||
scp $(cat ${{ env.SSH_CONNECT_STR_FILE }}):/tmp/deckhouse-debug.tar-gz /tmp/deckhouse-debug.tar-gz | ||
- name: "Upload log artifacts archive" | ||
id: upload_e2e_tests_logs | ||
if: failure() || cancelled() | ||
uses: actions/[email protected] | ||
with: | ||
name: deckhouse-debug | ||
path: /tmp/deckhouse-debug.tar-gz | ||
retention-days: 7 | ||
compression-level: 9 | ||
################################################### Collect logs when e2e failed ########################### | ||
- name: Read connection string | ||
if: ${{ failure() || cancelled() }} | ||
id: check_stay_failed_cluster | ||
|
@@ -2014,6 +2116,40 @@ jobs: | |
bash /deckhouse/testing/cloud_layouts/script.sh run-test | ||
# </template: e2e_run_template> | ||
|
||
################################################### Collect logs when e2e failed ########################### | ||
- name: "Create log artifacts archive" | ||
id: create_e2e_tests_logs | ||
if: always() | ||
env: | ||
PROVIDER: AWS | ||
LAYOUT: WithoutNAT | ||
LAYOUT_SSH_KEY: ${{ secrets.LAYOUT_SSH_KEY }} | ||
SSH_CONNECT_STR_FILE: ${{ steps.e2e_test_run.outputs.ssh_connection_str_file }} | ||
run: | | ||
ssh_private_key_path="/tmp/sshkey" | ||
rm -f "$ssh_private_key_path" | ||
base64 -d <<< "$LAYOUT_SSH_KEY" > "$ssh_private_key_path" | ||
chmod 0600 "$ssh_private_key_path" | ||
eval $(ssh-agent) | ||
ssh-add $ssh_private_key_path | ||
ssh $(cat ${{ env.SSH_CONNECT_STR_FILE }}) -t 'sudo su - -c "kubectl -n d8-system exec svc/deckhouse-leader -c deckhouse \ | ||
-- deckhouse-controller collect-debug-info \ | ||
> /tmp/deckhouse-debug.tar.gz"' | ||
scp $(cat ${{ env.SSH_CONNECT_STR_FILE }}):/tmp/deckhouse-debug.tar-gz /tmp/deckhouse-debug.tar-gz | ||
- name: "Upload log artifacts archive" | ||
id: upload_e2e_tests_logs | ||
if: failure() || cancelled() | ||
uses: actions/[email protected] | ||
with: | ||
name: deckhouse-debug | ||
path: /tmp/deckhouse-debug.tar-gz | ||
retention-days: 7 | ||
compression-level: 9 | ||
################################################### Collect logs when e2e failed ########################### | ||
- name: Read connection string | ||
if: ${{ failure() || cancelled() }} | ||
id: check_stay_failed_cluster | ||
|
@@ -2509,6 +2645,40 @@ jobs: | |
bash /deckhouse/testing/cloud_layouts/script.sh run-test | ||
# </template: e2e_run_template> | ||
|
||
################################################### Collect logs when e2e failed ########################### | ||
- name: "Create log artifacts archive" | ||
id: create_e2e_tests_logs | ||
if: always() | ||
env: | ||
PROVIDER: AWS | ||
LAYOUT: WithoutNAT | ||
LAYOUT_SSH_KEY: ${{ secrets.LAYOUT_SSH_KEY }} | ||
SSH_CONNECT_STR_FILE: ${{ steps.e2e_test_run.outputs.ssh_connection_str_file }} | ||
run: | | ||
ssh_private_key_path="/tmp/sshkey" | ||
rm -f "$ssh_private_key_path" | ||
base64 -d <<< "$LAYOUT_SSH_KEY" > "$ssh_private_key_path" | ||
chmod 0600 "$ssh_private_key_path" | ||
eval $(ssh-agent) | ||
ssh-add $ssh_private_key_path | ||
ssh $(cat ${{ env.SSH_CONNECT_STR_FILE }}) -t 'sudo su - -c "kubectl -n d8-system exec svc/deckhouse-leader -c deckhouse \ | ||
-- deckhouse-controller collect-debug-info \ | ||
> /tmp/deckhouse-debug.tar.gz"' | ||
scp $(cat ${{ env.SSH_CONNECT_STR_FILE }}):/tmp/deckhouse-debug.tar-gz /tmp/deckhouse-debug.tar-gz | ||
- name: "Upload log artifacts archive" | ||
id: upload_e2e_tests_logs | ||
if: failure() || cancelled() | ||
uses: actions/[email protected] | ||
with: | ||
name: deckhouse-debug | ||
path: /tmp/deckhouse-debug.tar-gz | ||
retention-days: 7 | ||
compression-level: 9 | ||
################################################### Collect logs when e2e failed ########################### | ||
- name: Read connection string | ||
if: ${{ failure() || cancelled() }} | ||
id: check_stay_failed_cluster | ||
|
@@ -3004,6 +3174,40 @@ jobs: | |
bash /deckhouse/testing/cloud_layouts/script.sh run-test | ||
# </template: e2e_run_template> | ||
|
||
################################################### Collect logs when e2e failed ########################### | ||
- name: "Create log artifacts archive" | ||
id: create_e2e_tests_logs | ||
if: always() | ||
env: | ||
PROVIDER: AWS | ||
LAYOUT: WithoutNAT | ||
LAYOUT_SSH_KEY: ${{ secrets.LAYOUT_SSH_KEY }} | ||
SSH_CONNECT_STR_FILE: ${{ steps.e2e_test_run.outputs.ssh_connection_str_file }} | ||
run: | | ||
ssh_private_key_path="/tmp/sshkey" | ||
rm -f "$ssh_private_key_path" | ||
base64 -d <<< "$LAYOUT_SSH_KEY" > "$ssh_private_key_path" | ||
chmod 0600 "$ssh_private_key_path" | ||
eval $(ssh-agent) | ||
ssh-add $ssh_private_key_path | ||
ssh $(cat ${{ env.SSH_CONNECT_STR_FILE }}) -t 'sudo su - -c "kubectl -n d8-system exec svc/deckhouse-leader -c deckhouse \ | ||
-- deckhouse-controller collect-debug-info \ | ||
> /tmp/deckhouse-debug.tar.gz"' | ||
scp $(cat ${{ env.SSH_CONNECT_STR_FILE }}):/tmp/deckhouse-debug.tar-gz /tmp/deckhouse-debug.tar-gz | ||
- name: "Upload log artifacts archive" | ||
id: upload_e2e_tests_logs | ||
if: failure() || cancelled() | ||
uses: actions/[email protected] | ||
with: | ||
name: deckhouse-debug | ||
path: /tmp/deckhouse-debug.tar-gz | ||
retention-days: 7 | ||
compression-level: 9 | ||
################################################### Collect logs when e2e failed ########################### | ||
- name: Read connection string | ||
if: ${{ failure() || cancelled() }} | ||
id: check_stay_failed_cluster | ||
|
@@ -3499,6 +3703,40 @@ jobs: | |
bash /deckhouse/testing/cloud_layouts/script.sh run-test | ||
# </template: e2e_run_template> | ||
|
||
################################################### Collect logs when e2e failed ########################### | ||
- name: "Create log artifacts archive" | ||
id: create_e2e_tests_logs | ||
if: always() | ||
env: | ||
PROVIDER: AWS | ||
LAYOUT: WithoutNAT | ||
LAYOUT_SSH_KEY: ${{ secrets.LAYOUT_SSH_KEY }} | ||
SSH_CONNECT_STR_FILE: ${{ steps.e2e_test_run.outputs.ssh_connection_str_file }} | ||
run: | | ||
ssh_private_key_path="/tmp/sshkey" | ||
rm -f "$ssh_private_key_path" | ||
base64 -d <<< "$LAYOUT_SSH_KEY" > "$ssh_private_key_path" | ||
chmod 0600 "$ssh_private_key_path" | ||
eval $(ssh-agent) | ||
ssh-add $ssh_private_key_path | ||
ssh $(cat ${{ env.SSH_CONNECT_STR_FILE }}) -t 'sudo su - -c "kubectl -n d8-system exec svc/deckhouse-leader -c deckhouse \ | ||
-- deckhouse-controller collect-debug-info \ | ||
> /tmp/deckhouse-debug.tar.gz"' | ||
scp $(cat ${{ env.SSH_CONNECT_STR_FILE }}):/tmp/deckhouse-debug.tar-gz /tmp/deckhouse-debug.tar-gz | ||
- name: "Upload log artifacts archive" | ||
id: upload_e2e_tests_logs | ||
if: failure() || cancelled() | ||
uses: actions/[email protected] | ||
with: | ||
name: deckhouse-debug | ||
path: /tmp/deckhouse-debug.tar-gz | ||
retention-days: 7 | ||
compression-level: 9 | ||
################################################### Collect logs when e2e failed ########################### | ||
- name: Read connection string | ||
if: ${{ failure() || cancelled() }} | ||
id: check_stay_failed_cluster | ||
|
Oops, something went wrong.