{{ message }}
Repository navigation
Commit 3fb51ae
authored
ci: route devbox/Nix package resolution through Artifactory (#1302)
All supply-chain vectors are required to go through Artifactory's
scanning/curation proxy, not just npm - this repo's devbox/Nix
packages (nodejs, yarn-berry, jq, cocoapods, etc.) were still being
fetched straight from cache.nixos.org, unfiltered.
Adopts the same mechanism already shipped in segmentio/ajs-renderer
(#515): upstream devbox hardcodes cache.nixos.org as its fetchClosure
source and ignores any override, so a patched devbox binary is built
from source (same patch ajs-renderer uses - devbox's own
DEVBOX_NIX_BINARY_CACHE override, proposed upstream at
jetify-com/devbox#2891, not yet merged) and installed over whatever
devbox-install-action just put on PATH, immediately after every
existing "Install devbox" step in ci.yml and release.yml.
ajs-renderer's version of this involves a whole custom CI base Docker
image, an apt-installed nix-bin, and a disabled flake registry -
that complexity exists specifically to work around Twilio Buildkite's
locked-down egress. GitHub Actions runners have open internet, so
none of that bootstrap is needed here - just the patch + nix.conf
substituter + DEVBOX_NIX_BINARY_CACHE.
Verified locally before pushing:
- the patch applies cleanly to devbox 0.16.0, the version this repo's
own devbox.lock nixpkgs-unstable pin (afce96367b) already provides
- the patched expression actually builds (nix build --impure --expr),
and the resulting binary's compiled string table contains
DEVBOX_NIX_BINARY_CACHE, confirming the patch compiled in rather
than silently no-op'ing
NOT verified (needs a real CI run, flagging explicitly rather than
claiming more confidence than earned):
- whether segmentio's GitHub-Actions-OIDC-authenticated identity (or
anonymous access) can actually reach
https://otk.artifactory.twilio.com/artifactory/remote-nix-cache-nixos
- this is a different Artifactory repo than the npm proxy, onboarded
separately, and I found no IPD doc confirming general segmentio
access to it the way trusted_builds covers npm
- whether that substituter actually serves the specific package/version
closures devbox.lock resolves (nodejs 22, yarn-berry, cocoapods, jq,
treefmt, nixfmt, shfmt) - if any are missing, that job falls back to
a local build instead of a hard failure, but will be much slower1 parent 0f4dbda commit 3fb51ae
4 files changed
Lines changed: 214 additions & 0 deletions
File tree
- .github
- actions/devbox-artifactory-cache
- workflows
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
| |||
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
| 44 | + | |
| 45 | + | |
42 | 46 | | |
43 | 47 | | |
44 | 48 | | |
| |||

0 commit comments