Skip to content

lab11: Reproducible Builds of QuickNotes with Nix#1338

Open
1r444444 wants to merge 9 commits into
inno-devops-labs:mainfrom
1r444444:feature/lab11
Open

lab11: Reproducible Builds of QuickNotes with Nix#1338
1r444444 wants to merge 9 commits into
inno-devops-labs:mainfrom
1r444444:feature/lab11

Conversation

@1r444444

@1r444444 1r444444 commented Jul 5, 2026

Copy link
Copy Markdown

Summary

  • Task 1 (4 pts): flake.nix at repo root builds QuickNotes via buildGoModule; flake.lock pins nixpkgs to nixos-25.11 rev b6018f87 (2026-06-30); two independent nixos/nix Docker containers produce identical store hash sha256:0qd4klg5q3hn2malql089wdq1cm39ndclxbj10689vzdqwg82f62
  • Task 2 (4 pts): nix build .#docker produces a 20.8 MB OCI image via dockerTools.buildImage (nonroot UID 65532, port 8080); two independent builds produce identical sha256 b2f87593...; Lab 6 --no-cache builds differ (f2d220... vs 748f9b...)
  • Bonus (2 pts): .github/workflows/nix-repro.yml runs two parallel build jobs + a third that fails on digest mismatch; green/red/green run sequence demonstrated in fork CI

Deliverables

  • flake.nix + flake.lock at repo root
  • .github/workflows/nix-repro.yml — CI gate (both actions pinned by 40-char SHA)
  • submissions/lab11.md — full evidence + design questions a–j

CI runs (fork)

Test plan

  • nix build .#quicknotes succeeds and ./result/bin/quicknotes serves /health
  • nix build .#docker && docker load -i result loads image; sha256sum result matches between two runs
  • nix develop enters a shell with go, gopls, golangci-lint
  • CI workflow runs two parallel builds and asserts equal digests

1r444444 added 9 commits June 9, 2026 09:25
Signed-off-by: Irina <irina.bychkova06@mail.ru>
Signed-off-by: Irina <irina.bychkova06@mail.ru>
- flake.nix: buildGoModule for quicknotes binary, dockerTools.buildImage for OCI
- flake.lock: pins nixpkgs to nixos-25.11 rev b6018f87 (2026-06-30)
- nix-repro.yml: two-parallel-job CI gate that fails on digest mismatch
…urce

Temporarily adds a timestamp comment to app/main.go in Build B only,
causing the Nix src hash to differ so verify-repro catches the mismatch.
Reverts the intentional divergence introduced in the previous commit.
Both jobs now build identically; verify-repro should go green.
- docker: add extraCommands for seed.json and /tmp, set DATA_PATH/SEED_PATH
  env vars, use Nix store path in Entrypoint — container now actually runs
- nix-repro.yml: add permissions: contents: read; guard against empty digests
  to prevent vacuous CI pass
- submission: update sha256sum evidence and add docker run /health proof
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant