fix(ci): bake MOKOSH_GIT_HASH + describe + date into OCI build #97

Merged
nrupard merged 1 commit from fix/e2e-runner-toolcache into main 2026-06-05 16:50:32 +02:00
Owner

The OCI Dockerfile reads MOKOSH_GIT_HASH / MOKOSH_GIT_DESCRIBE / MOKOSH_BUILD_DATE / SOURCE_DATE_EPOCH as build-args, but the build workflow only ever passed an unused GIT_SHA arg. With no real values supplied and .git deliberately absent from the build context (oci-build/Dockerfile:10-15), build.rs fell back to "unknown" / "v" and the deployed image reported git_hash=unknown on /api/v1/version. The PMS-140 deploy-sync gate then polled forever for a hash that the server could not advertise.

Resolve the metadata from git in a new "Resolve build metadata" step (fetch-depth: 0 was already set on checkout) and pass it as --build-arg in the buildx invocation. SOURCE_DATE_EPOCH comes from the commit's own timestamp so the build is reproducible against a given SHA; the wall-clock build date is the standard --utc --iso-8601 form.

The previous GIT_SHA arg was a no-op and is dropped.

#PMS-140

The OCI Dockerfile reads MOKOSH_GIT_HASH / MOKOSH_GIT_DESCRIBE / MOKOSH_BUILD_DATE / SOURCE_DATE_EPOCH as build-args, but the build workflow only ever passed an unused GIT_SHA arg. With no real values supplied and `.git` deliberately absent from the build context (oci-build/Dockerfile:10-15), `build.rs` fell back to "unknown" / "v<crate-version>" and the deployed image reported `git_hash=unknown` on `/api/v1/version`. The PMS-140 deploy-sync gate then polled forever for a hash that the server could not advertise. Resolve the metadata from git in a new "Resolve build metadata" step (fetch-depth: 0 was already set on checkout) and pass it as --build-arg in the buildx invocation. SOURCE_DATE_EPOCH comes from the commit's own timestamp so the build is reproducible against a given SHA; the wall-clock build date is the standard --utc --iso-8601 form. The previous GIT_SHA arg was a no-op and is dropped. #PMS-140
fix(ci): bake MOKOSH_GIT_HASH + describe + date into OCI build
All checks were successful
Create release / Create release from merged PR (pull_request) Has been skipped
Check / fmt + clippy + compile + tests (pull_request) Successful in 2m10s
Build OCI container / Build and push mokosh-api image (push) Successful in 3m31s
52742c67f5
The OCI Dockerfile reads MOKOSH_GIT_HASH / MOKOSH_GIT_DESCRIBE / MOKOSH_BUILD_DATE / SOURCE_DATE_EPOCH as build-args, but the build workflow only ever passed an unused GIT_SHA arg. With no real values supplied and `.git` deliberately absent from the build context (oci-build/Dockerfile:10-15), `build.rs` fell back to "unknown" / "v<crate-version>" and the deployed image reported `git_hash=unknown` on `/api/v1/version`. The PMS-140 deploy-sync gate then polled forever for a hash that the server could not advertise.

Resolve the metadata from git in a new "Resolve build metadata" step (fetch-depth: 0 was already set on checkout) and pass it as --build-arg in the buildx invocation. SOURCE_DATE_EPOCH comes from the commit's own timestamp so the build is reproducible against a given SHA; the wall-clock build date is the standard --utc --iso-8601 form.

The previous GIT_SHA arg was a no-op and is dropped.

#PMS-140
nrupard deleted branch fix/e2e-runner-toolcache 2026-06-05 16:50:32 +02:00
Sign in to join this conversation.
No reviewers
No labels
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
psa-systems/mokosh-server!97
No description provided.