Browse Source

Add workflow step that shows build scan url (#11088)

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
Lauri Tulmin 11 months ago
parent
commit
4c77b48604

+ 4 - 0
.github/workflows/build-common.yml

@@ -267,6 +267,10 @@ jobs:
           # gradle enterprise is used for the build cache
           gradle-home-cache-excludes: caches/build-cache-1
 
+      - name: Build scan
+        if: ${{ hashFiles('build-scan.txt') != '' }}
+        run: cat build-scan.txt
+
       - name: Upload deadlock detector artifacts if any
         if: failure()
         uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1

+ 4 - 0
.github/workflows/reusable-test-indy.yml

@@ -85,3 +85,7 @@ jobs:
           cache-read-only: ${{ inputs.cache-read-only }}
           # gradle enterprise is used for the build cache
           gradle-home-cache-excludes: caches/build-cache-1
+
+      - name: Build scan
+        if: ${{ hashFiles('build-scan.txt') != '' }}
+        run: cat build-scan.txt

+ 4 - 0
.github/workflows/reusable-test-latest-deps.yml

@@ -83,6 +83,10 @@ jobs:
           # gradle enterprise is used for the build cache
           gradle-home-cache-excludes: caches/build-cache-1
 
+      - name: Build scan
+        if: ${{ hashFiles('build-scan.txt') != '' }}
+        run: cat build-scan.txt
+
       - name: Upload deadlock detector artifacts if any
         if: failure()
         uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1

+ 12 - 0
settings.gradle.kts

@@ -47,6 +47,12 @@ if (useScansGradleCom) {
       capture {
         fileFingerprints = true
       }
+
+      buildScanPublished {
+        File("build-scan.txt").printWriter().use { writer ->
+          writer.println(buildScanUri)
+        }
+      }
     }
   }
 } else {
@@ -65,6 +71,12 @@ if (useScansGradleCom) {
       gradle.startParameter.projectProperties["smokeTestSuite"]?.let {
         value("Smoke test suite", it)
       }
+
+      buildScanPublished {
+        File("build-scan.txt").printWriter().use { writer ->
+          writer.println(buildScanUri)
+        }
+      }
     }
   }