added permanent artifact links for latest green builds: /branches/<branch-key>/... serves the latest green build's artifacts (green-only, resolved per request), keepLatestGreen retention protection, permanent artifact-index page, and latestGreenUrl links in the branches view
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
83e70e73c3
commit
bb06c8b731
@@ -227,7 +227,14 @@ function renderBuildRow(build, allowRestart) {
|
||||
artifactLink.href = "/builds/" + encodeURIComponent(build.artifactKey);
|
||||
artifactLink.title = "Open artifacts";
|
||||
artifactsCell.appendChild(artifactLink);
|
||||
} else {
|
||||
}
|
||||
if (build.latestGreenUrl) {
|
||||
const permanentLink = elem("a", "artifact-link", "🔗");
|
||||
permanentLink.href = build.latestGreenUrl;
|
||||
permanentLink.title = "Permanent link: artifacts of the latest green build";
|
||||
artifactsCell.appendChild(permanentLink);
|
||||
}
|
||||
if (!build.artifactKey && !build.latestGreenUrl) {
|
||||
artifactsCell.textContent = "n/a";
|
||||
}
|
||||
row.appendChild(artifactsCell);
|
||||
|
||||
@@ -6,6 +6,11 @@
|
||||
<h1 th:replace="~{fragments :: header(${pageTitle})}"></h1>
|
||||
<div th:replace="~{fragments :: nav(${view})}"></div>
|
||||
<article class="panel">
|
||||
<p th:if="${permanentBranch != null}" class="muted">
|
||||
Permanent link: this page always shows the latest green build of branch
|
||||
<b th:text="${permanentBranch}">main</b> — every link on it stays valid across new builds.
|
||||
<a th:href="${concreteUrl}">Open this specific build</a> instead.
|
||||
</p>
|
||||
<h2>Build</h2>
|
||||
<ul th:if="${result != null}" class="build-facts">
|
||||
<li>
|
||||
@@ -45,7 +50,7 @@
|
||||
<h2>Logs</h2>
|
||||
<ul th:if="${!#lists.isEmpty(logs)}">
|
||||
<li th:each="log : ${logs}">
|
||||
<a th:href="'/artifacts/' + ${artifactKey} + '/' + ${log}" target="_blank"
|
||||
<a th:href="${filesBase} + '/' + ${log}" target="_blank"
|
||||
rel="noopener noreferrer" th:text="${log}">build.log</a>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -57,7 +62,7 @@
|
||||
<h2>Build Artifacts</h2>
|
||||
<ul th:if="${!#lists.isEmpty(reportIndexes)}">
|
||||
<li th:each="report : ${reportIndexes}">
|
||||
<a th:href="'/artifacts/' + ${artifactKey} + '/reports/' + ${report}" target="_blank"
|
||||
<a th:href="${filesBase} + '/reports/' + ${report}" target="_blank"
|
||||
rel="noopener noreferrer" th:text="'reports/' + ${report}">reports/tests/index.html</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -53,6 +53,9 @@
|
||||
<td data-label="Artifacts">
|
||||
<a th:if="${row.artifactKey != ''}" class="artifact-link"
|
||||
th:href="'/builds/' + ${row.artifactKey}" title="Open artifacts">📄</a>
|
||||
<a th:if="${row.latestGreenUrl != null}" class="artifact-link"
|
||||
th:href="${row.latestGreenUrl}"
|
||||
title="Permanent link: artifacts of the latest green build">🔗</a>
|
||||
<span th:if="${row.artifactKey == ''}">n/a</span>
|
||||
</td>
|
||||
<td class="actions-cell">
|
||||
|
||||
Reference in New Issue
Block a user