fix(ci): move Go cache out of workspace to fix goreleaser dirty-tree check #154

Merged
goern merged 0 commits from refs/pull/154/head into main 2026-05-25 11:55:13 +00:00
goern commented 2026-05-25 11:54:52 +00:00 (Migrated from codeberg.org)

Summary

v2.24.1 Tekton release run failed with:

⨯ release failed after 0s
  error=
  │ git is in a dirty state
  │ Please check in your pipeline what can be changing the following files:
  │ ?? .gocache/
  │ ?? .gomodcache/

Cause: stepTemplate set GOCACHE and GOMODCACHE to paths inside /workspace/src (the workspace mount where the git checkout lives). Go's caches showed up as untracked directories; GoReleaser inspects git status before publishing and bails on any unclean state.

Fix: move both env vars to /tmp/gocache and /tmp/gomodcache — outside the workspace, outside any git context.

Tracks bead forgejo-mcp-trb. Proper image-based fix still in forgejo-mcp-1b4 (P0).

Why /tmp is fine here

Tekton Step containers do not share /tmp, so cache reuse across Steps is lost. But the release Task collapses install + run into a single Step (per PR #153), so there are no later Steps that need the cache.

The go-ci Task at .tekton/tasks/go-ci.yaml uses the same workspace-cache pattern; safe there because nothing in go-ci inspects git status mid-job. Not touching it.

Status of v2.24.1

Same as v2.24.0 — tag pushed, no Release object on Codeberg (goreleaser exited before publish). Phantom tag, harmless. Next cut → v2.24.2 from this fix(ci) commit.

Test plan

  • Merge.
  • Cut release → v2.24.2 (fix(ci) → patch bump).
  • goreleaser Step passes git state check; goes on to build + publish.
  • cosign-sign + mcpb-pack complete.
  • 8 assets + checksums.txt.sig on Codeberg release page.
## Summary v2.24.1 Tekton release run failed with: ``` ⨯ release failed after 0s error= │ git is in a dirty state │ Please check in your pipeline what can be changing the following files: │ ?? .gocache/ │ ?? .gomodcache/ ``` Cause: stepTemplate set `GOCACHE` and `GOMODCACHE` to paths inside `/workspace/src` (the workspace mount where the git checkout lives). Go's caches showed up as untracked directories; GoReleaser inspects `git status` before publishing and bails on any unclean state. Fix: move both env vars to `/tmp/gocache` and `/tmp/gomodcache` — outside the workspace, outside any git context. Tracks bead `forgejo-mcp-trb`. Proper image-based fix still in `forgejo-mcp-1b4` (P0). ## Why /tmp is fine here Tekton Step containers do not share `/tmp`, so cache reuse across Steps is lost. But the release Task collapses install + run into a single Step (per PR #153), so there are no later Steps that need the cache. The `go-ci` Task at `.tekton/tasks/go-ci.yaml` uses the same workspace-cache pattern; safe there because nothing in `go-ci` inspects `git status` mid-job. Not touching it. ## Status of v2.24.1 Same as v2.24.0 — tag pushed, no Release object on Codeberg (goreleaser exited before publish). Phantom tag, harmless. Next cut → v2.24.2 from this `fix(ci)` commit. ## Test plan - [ ] Merge. - [ ] Cut release → v2.24.2 (fix(ci) → patch bump). - [ ] `goreleaser` Step passes `git state` check; goes on to build + publish. - [ ] cosign-sign + mcpb-pack complete. - [ ] 8 assets + `checksums.txt.sig` on Codeberg release page.
op1st-gitops commented 2026-05-25 11:54:57 +00:00 (Migrated from codeberg.org)

op1st Pipelines as Code/code-scans-m6h9n is running.

Starting Pipelinerun code-scans-m6h9n in namespace op1st-pipelines

You can monitor the execution using the op1st Pipelines as Code PipelineRun viewer or through the command line by
using the tkn CLI with the following command:

tkn pr logs -n op1st-pipelines code-scans-m6h9n -f

op1st Pipelines as Code/code-scans-m6h9n is running. Starting Pipelinerun <b>[code-scans-m6h9n](https://console-openshift-console.apps.nostromo.erdgeschoss.b4mad.emea.operate-first.cloud/k8s/ns/op1st-pipelines/tekton.dev~v1~PipelineRun/code-scans-m6h9n)</b> in namespace <b>op1st-pipelines</b> You can monitor the execution using the [op1st Pipelines as Code](https://console-openshift-console.apps.nostromo.erdgeschoss.b4mad.emea.operate-first.cloud/k8s/ns/op1st-pipelines/tekton.dev~v1~PipelineRun/code-scans-m6h9n) PipelineRun viewer or through the command line by using the [tkn](https://tekton.dev/docs/cli/#installation) CLI with the following command: <code>tkn pr logs -n op1st-pipelines code-scans-m6h9n -f</code>
op1st-gitops commented 2026-05-25 11:54:57 +00:00 (Migrated from codeberg.org)

op1st Pipelines as Code/on-pull-request-nqjcv is running.

Starting Pipelinerun on-pull-request-nqjcv in namespace op1st-pipelines

You can monitor the execution using the op1st Pipelines as Code PipelineRun viewer or through the command line by
using the tkn CLI with the following command:

tkn pr logs -n op1st-pipelines on-pull-request-nqjcv -f

op1st Pipelines as Code/on-pull-request-nqjcv is running. Starting Pipelinerun <b>[on-pull-request-nqjcv](https://console-openshift-console.apps.nostromo.erdgeschoss.b4mad.emea.operate-first.cloud/k8s/ns/op1st-pipelines/tekton.dev~v1~PipelineRun/on-pull-request-nqjcv)</b> in namespace <b>op1st-pipelines</b> You can monitor the execution using the [op1st Pipelines as Code](https://console-openshift-console.apps.nostromo.erdgeschoss.b4mad.emea.operate-first.cloud/k8s/ns/op1st-pipelines/tekton.dev~v1~PipelineRun/on-pull-request-nqjcv) PipelineRun viewer or through the command line by using the [tkn](https://tekton.dev/docs/cli/#installation) CLI with the following command: <code>tkn pr logs -n op1st-pipelines on-pull-request-nqjcv -f</code>
op1st-gitops commented 2026-05-25 11:55:17 +00:00 (Migrated from codeberg.org)

op1st Pipelines as Code/code-scans-m6h9n


Task Statuses:

StatusDurationName
Succeeded 14 seconds

fetch-source

Succeeded 9 seconds

gitleaks-version

Failed 4 seconds

gitleaks


Failure snippet:

task gitleaks has the status "TaskRunCancelled":
TaskRun "code-scans-m6h9n-gitleaks" was cancelled. TaskRun cancelled as the PipelineRun it belongs to has been cancelled.
op1st Pipelines as Code/code-scans-m6h9n <ul> <li><b>Namespace</b>: <a href="https://detailurl.setting.custom-console-url-namespace.is.not.configured">op1st-pipelines</a></li> <li><b>PipelineRun:</b> <a href="https://console-openshift-console.apps.nostromo.erdgeschoss.b4mad.emea.operate-first.cloud/k8s/ns/op1st-pipelines/tekton.dev~v1~PipelineRun/code-scans-m6h9n">code-scans-m6h9n</a></li> </ul> <hr> <h4>Task Statuses:</h4> <table> <tr><th>Status</th><th>Duration</th><th>Name</th></tr> <tr> <td>Succeeded</td> <td>14 seconds</td><td> [fetch-source](https://console-openshift-console.apps.nostromo.erdgeschoss.b4mad.emea.operate-first.cloud/k8s/ns/op1st-pipelines/tekton.dev~v1~PipelineRun/code-scans-m6h9n/logs/fetch-source) </td></tr> <tr> <td>Succeeded</td> <td>9 seconds</td><td> [gitleaks-version](https://console-openshift-console.apps.nostromo.erdgeschoss.b4mad.emea.operate-first.cloud/k8s/ns/op1st-pipelines/tekton.dev~v1~PipelineRun/code-scans-m6h9n/logs/gitleaks-version) </td></tr> <tr> <td>Failed</td> <td>4 seconds</td><td> [gitleaks](https://console-openshift-console.apps.nostromo.erdgeschoss.b4mad.emea.operate-first.cloud/k8s/ns/op1st-pipelines/tekton.dev~v1~PipelineRun/code-scans-m6h9n/logs/gitleaks) </td></tr> </table> <hr> <h4>Failure snippet:</h4> task <b>gitleaks</b> has the status <b>"TaskRunCancelled"</b>: <pre>TaskRun "code-scans-m6h9n-gitleaks" was cancelled. TaskRun cancelled as the PipelineRun it belongs to has been cancelled.</pre>
op1st-gitops commented 2026-05-25 11:55:17 +00:00 (Migrated from codeberg.org)

op1st Pipelines as Code/on-pull-request-nqjcv


Task Statuses:

StatusDurationName
Succeeded 11 seconds

fetch-source

Failed 7 seconds

build-and-test


Failure snippet:

task build-and-test has the status "TaskRunCancelled":
TaskRun "on-pull-request-nqjcv-build-and-test" was cancelled. TaskRun cancelled as the PipelineRun it belongs to has been cancelled.
op1st Pipelines as Code/on-pull-request-nqjcv <ul> <li><b>Namespace</b>: <a href="https://detailurl.setting.custom-console-url-namespace.is.not.configured">op1st-pipelines</a></li> <li><b>PipelineRun:</b> <a href="https://console-openshift-console.apps.nostromo.erdgeschoss.b4mad.emea.operate-first.cloud/k8s/ns/op1st-pipelines/tekton.dev~v1~PipelineRun/on-pull-request-nqjcv">on-pull-request-nqjcv</a></li> </ul> <hr> <h4>Task Statuses:</h4> <table> <tr><th>Status</th><th>Duration</th><th>Name</th></tr> <tr> <td>Succeeded</td> <td>11 seconds</td><td> [fetch-source](https://console-openshift-console.apps.nostromo.erdgeschoss.b4mad.emea.operate-first.cloud/k8s/ns/op1st-pipelines/tekton.dev~v1~PipelineRun/on-pull-request-nqjcv/logs/fetch-source) </td></tr> <tr> <td>Failed</td> <td>7 seconds</td><td> [build-and-test](https://console-openshift-console.apps.nostromo.erdgeschoss.b4mad.emea.operate-first.cloud/k8s/ns/op1st-pipelines/tekton.dev~v1~PipelineRun/on-pull-request-nqjcv/logs/build-and-test) </td></tr> </table> <hr> <h4>Failure snippet:</h4> task <b>build-and-test</b> has the status <b>"TaskRunCancelled"</b>: <pre>TaskRun "on-pull-request-nqjcv-build-and-test" was cancelled. TaskRun cancelled as the PipelineRun it belongs to has been cancelled.</pre>
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
agentic-forges/forgejo-mcp!154
No description provided.