fix: 🐛 sha256sum filename mismatch + privileged SCC for buildah #162

Merged
goern merged 0 commits from refs/pull/162/head into main 2026-05-25 23:28:10 +00:00
goern commented 2026-05-25 23:25:05 +00:00 (Migrated from codeberg.org)

Problems found during first real pipeline run

1. Containerfile: sha256sum filename mismatch (from PR #159)

curl -sSfLo /tmp/goreleaser.tar.gz downloads to a renamed file, but sha256sum -c goreleaser-expected.txt expects goreleaser_Linux_x86_64.tar.gz in the current directory. Same bug for syft.

Fix: download to the original release filename so sha256sum -c resolves it correctly.

2. build-image task: buildah requires privileged: true on this cluster

Attempted rootless buildah approaches:

  • runAsUser: 1000 + --isolation=chroot → UID namespace can't map base-image UID 65532 (hi/go owns /go as UID 65532, no subUID space in pod)
  • runAsUser: 0 + anyuid SCC + --isolation=chroot → OpenShift still places container in user namespace where writing to uid_map is not permitted (CAP_SYS_ADMIN required for nested user namespace)
  • --userns=host — same error; buildah internally still attempts uid_map write

Resolution: grant privileged SCC to pipeline SA in op1st-pipelines namespace (scoped grant via oc adm policy add-scc-to-user privileged -z pipeline -n op1st-pipelines). This is the standard pattern for container build CI namespaces on OpenShift. Task reverts to privileged: true.

Closes forgejo-mcp-aps

## Problems found during first real pipeline run ### 1. Containerfile: sha256sum filename mismatch (from PR #159) `curl -sSfLo /tmp/goreleaser.tar.gz` downloads to a renamed file, but `sha256sum -c goreleaser-expected.txt` expects `goreleaser_Linux_x86_64.tar.gz` in the current directory. Same bug for syft. Fix: download to the original release filename so `sha256sum -c` resolves it correctly. ### 2. build-image task: buildah requires `privileged: true` on this cluster Attempted rootless buildah approaches: - `runAsUser: 1000` + `--isolation=chroot` → UID namespace can't map base-image UID 65532 (`hi/go` owns `/go` as UID 65532, no subUID space in pod) - `runAsUser: 0` + `anyuid` SCC + `--isolation=chroot` → OpenShift still places container in user namespace where writing to `uid_map` is not permitted (`CAP_SYS_ADMIN` required for nested user namespace) - `--userns=host` — same error; buildah internally still attempts uid_map write **Resolution**: grant `privileged` SCC to `pipeline` SA in `op1st-pipelines` namespace (scoped grant via `oc adm policy add-scc-to-user privileged -z pipeline -n op1st-pipelines`). This is the standard pattern for container build CI namespaces on OpenShift. Task reverts to `privileged: true`. Closes forgejo-mcp-aps
op1st-gitops commented 2026-05-25 23:25:12 +00:00 (Migrated from codeberg.org)

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

Starting Pipelinerun on-pull-request-qb8lt 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-qb8lt -f

op1st Pipelines as Code/on-pull-request-qb8lt is running. Starting Pipelinerun <b>[on-pull-request-qb8lt](https://console-openshift-console.apps.nostromo.erdgeschoss.b4mad.emea.operate-first.cloud/k8s/ns/op1st-pipelines/tekton.dev~v1~PipelineRun/on-pull-request-qb8lt)</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-qb8lt) 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-qb8lt -f</code>
op1st-gitops commented 2026-05-25 23:25:12 +00:00 (Migrated from codeberg.org)

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

Starting Pipelinerun code-scans-vlvdd 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-vlvdd -f

op1st Pipelines as Code/code-scans-vlvdd is running. Starting Pipelinerun <b>[code-scans-vlvdd](https://console-openshift-console.apps.nostromo.erdgeschoss.b4mad.emea.operate-first.cloud/k8s/ns/op1st-pipelines/tekton.dev~v1~PipelineRun/code-scans-vlvdd)</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-vlvdd) 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-vlvdd -f</code>
op1st-gitops commented 2026-05-25 23:25:31 +00:00 (Migrated from codeberg.org)

op1st Pipelines as Code/code-scans-vlvdd has successfully validated your commit.


Task Statuses:

StatusDurationName
Succeeded 10 seconds

fetch-source

Succeeded 9 seconds

gitleaks-version

Succeeded 8 seconds

gitleaks

op1st Pipelines as Code/code-scans-vlvdd has <b>successfully</b> validated your commit. <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-vlvdd">code-scans-vlvdd</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>10 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-vlvdd/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-vlvdd/logs/gitleaks-version) </td></tr> <tr> <td>Succeeded</td> <td>8 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-vlvdd/logs/gitleaks) </td></tr> </table>
op1st-gitops commented 2026-05-25 23:26:36 +00:00 (Migrated from codeberg.org)

op1st Pipelines as Code/on-pull-request-qb8lt has successfully validated your commit.


Task Statuses:

StatusDurationName
Succeeded 13 seconds

fetch-source

Succeeded 1 minute

build-and-test

op1st Pipelines as Code/on-pull-request-qb8lt has <b>successfully</b> validated your commit. <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-qb8lt">on-pull-request-qb8lt</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>13 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-qb8lt/logs/fetch-source) </td></tr> <tr> <td>Succeeded</td> <td>1 minute</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-qb8lt/logs/build-and-test) </td></tr> </table>
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!162
No description provided.