From: Vallari Agrawal Date: Fri, 7 Mar 2025 06:39:32 +0000 (+0530) Subject: ci: save intergation logs artifacts X-Git-Tag: 1.2.2~27^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F2035%2Fhead;p=teuthology.git ci: save intergation logs artifacts 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 --- diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 2423d09a5..e599289b3 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -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/* diff --git a/docs/docker-compose/docker-compose.yml b/docs/docker-compose/docker-compose.yml index f64d17a54..8c97cd252 100644 --- a/docs/docker-compose/docker-compose.yml +++ b/docs/docker-compose/docker-compose.yml @@ -74,6 +74,8 @@ services: TESTNODES: TEUTHOLOGY_WAIT: TEUTH_BRANCH: + volumes: + - /tmp/archive_dir:/archive_dir:rw testnode: build: context: ./testnode