From 8a4ce9909bb6a228c76713e4c0be99f99b0edca8 Mon Sep 17 00:00:00 2001 From: Mikhail Klementev Date: Wed, 21 Feb 2024 14:05:47 +0000 Subject: [PATCH] ci: upload images only after test success --- .github/workflows/e2e.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 0173553..6d8af79 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -134,8 +134,6 @@ jobs: echo 'TimeoutStopSec=1' >> test.service echo 'ExecStart=/usr/local/bin/out-of-tree kernel autogen --threads=4 --max=256 --shuffle' >> test.service echo 'ExecStart=/usr/local/bin/out-of-tree pew --qemu-timeout=10m --threads=4 --include-internal-errors' >> test.service - echo 'ExecStart=/usr/local/bin/out-of-tree container save' >> test.service - echo "ExecStart=/usr/bin/s3cmd put --acl-public *.tar.gz s3://out-of-tree/1.0.0/containers/ --host=fra1.digitaloceanspaces.com --host-bucket='%(bucket)s.fra1.digitaloceanspaces.com' --access_key=${{ secrets.DIGITALOCEAN_SPACES_ACCESS_KEY }} --secret_key=${{ secrets.DIGITALOCEAN_SPACES_SECRET_KEY }}" >> test.service scp test.service root@$IP:/etc/systemd/system/test.service @@ -154,7 +152,10 @@ jobs: scp -r root@$IP:.out-of-tree/logs . - ssh root@$IP systemctl is-active test + ssh root@$IP systemctl is-active test || exit 1 + + ssh root@$IP "/usr/local/bin/out-of-tree container save" + ssh root@$IP "s3cmd put --acl-public *.tar.gz s3://out-of-tree/1.0.0/containers/ --host=fra1.digitaloceanspaces.com --host-bucket='%(bucket)s.fra1.digitaloceanspaces.com' --access_key=${{ secrets.DIGITALOCEAN_SPACES_ACCESS_KEY }} --secret_key=${{ secrets.DIGITALOCEAN_SPACES_SECRET_KEY }}" - name: Archive logs if: always()