]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ceph-dev-pipeline: Store sccache logs
authorZack Cerza <zack@cerza.org>
Thu, 6 Mar 2025 23:34:25 +0000 (16:34 -0700)
committerZack Cerza <zack@cerza.org>
Wed, 7 May 2025 23:28:45 +0000 (17:28 -0600)
There is an issue where invocations of archiveArtifacts in parallel branches of
the pipeline overwrite each other.

Signed-off-by: Zack Cerza <zack@cerza.org>
ceph-dev-pipeline/build/Jenkinsfile

index fa70a6ef19e01a1005134c173a45a17e0ae67d2d..a23c0783673eb2cbe28524a335d5a2357a65284d 100644 (file)
@@ -362,6 +362,8 @@ pipeline {
                   sh '''#!/bin/bash
                     echo "SCCACHE=$SCCACHE" >> .env
                     echo "SCCACHE_CONF=/ceph/sccache.conf" >> .env
+                    echo "SCCACHE_ERROR_LOG=/ceph/sccache_log.txt" >> .env
+                    echo "SCCACHE_LOG=debug" >> .env
                     echo "AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID" >> .env
                     echo "AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY" >> .env
                   '''
@@ -411,6 +413,20 @@ pipeline {
               }
             }
             post {
+              always {
+                script {
+                  sh """
+                    if [ -f "${env.WORKSPACE}/dist/ceph/sccache_log.txt" ]; then
+                      ln dist/ceph/sccache_log.txt sccache_log_${env.DIST}_${env.ARCH}.txt
+                    fi
+                  """
+                  archiveArtifacts(
+                    artifacts: 'sccache_log*.txt',
+                    allowEmptyArchive: true,
+                    fingerprint: true,
+                  )
+                }
+              }
               unsuccessful {
                 script {
                   def os = get_os_info(env.DIST)