]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
ci: save intergation logs artifacts 2035/head
authorVallari Agrawal <val.agl002@gmail.com>
Fri, 7 Mar 2025 06:39:32 +0000 (12:09 +0530)
committerVallari Agrawal <val.agl002@gmail.com>
Wed, 2 Apr 2025 15:44:52 +0000 (21:14 +0530)
Mount volume for archive_dir and then
upload it's logfiles as GA artifacts,
so we can use download-artifacts action
to download logs.

Signed-off-by: Vallari Agrawal <val.agl002@gmail.com>
.github/workflows/integration.yml
docs/docker-compose/docker-compose.yml

index 2423d09a58e7052926f2b5edf97223bdbca22dae..e599289b3bcc8bd631ad69635a8696ecaa9eaa4e 100644 (file)
@@ -7,6 +7,27 @@ jobs:
     runs-on: ubuntu-24.04
     steps:
       - uses: actions/checkout@v4
+      - name: Make archive directory
+        run: mkdir /tmp/archive_dir
       - name: Test using docker-compose
         run: ./start.sh
         working-directory: ./docs/docker-compose
+      - name: Rename Directory
+        # Replace ":" with "_" everywhere in directory path.
+        # This needs to be done because GA does not support ":" colon character in artifacts (like in /root-2025-03-06_18:47:26-teuthology:no-ceph-main-distro-default-testnode).
+        # Invalid characters include:  Double quote ", Colon :, Less than <, Greater than >, Vertical bar |, Asterisk *, Question mark ?, Carriage return \r, Line feed \n
+        if: always()
+        run: |
+          for DIR in /tmp/archive_dir/root-*; do
+            SAFE_DIR="${DIR//:/_}"   # Replace in '/tmp/archive_dir/root-2025-03-06_18:47:26-teuthology:no-ceph-main-distro-default-testnode'
+            if [ "$DIR" != "$SAFE_DIR" ]; then
+              mv "$DIR" "$SAFE_DIR"
+            fi
+          done
+      - name: Upload teuthology archive logs 
+        uses: actions/upload-artifact@v4
+        if: always()
+        with:
+          name: teuthology-logs 
+          path: |
+            /tmp/archive_dir/*
index f64d17a546d8a8377d360f9bfabb54b7b08b8b2d..8c97cd252dbb6b42b6becf1a7dcee7f130674718 100644 (file)
@@ -74,6 +74,8 @@ services:
       TESTNODES:
       TEUTHOLOGY_WAIT:
       TEUTH_BRANCH:
+    volumes:
+      - /tmp/archive_dir:/archive_dir:rw
   testnode:
     build:
       context: ./testnode