Build inside the network

If an artifact runs inside a closed network, build it there too — building outside turns every fix into a guess.

Deep-dive
  • An Android app was meant to run inside a closed factory network, but it was built on an external machine outside that network.
  • The built artifact behaved differently inside the network than anything I could reproduce outside.
  • Each debug pass meant copying the artifact across the boundary by hand and guessing what the environmental difference was.
  • Root cause: building outside the target network gave no visibility into in-network failures, so debugging became blind iteration.
  • A single round of this could eat most of an afternoon from the manual transfer and guess cycle.
  • Fix: build inside the network it runs in, or run a reproducible pipeline targeting that network, so 'builds outside, runs inside' stops being a guessing loop.
Code
# build INSIDE the network the artifact runs in (or a pipeline targeting it)
# stop hand-carrying builds across the boundary and guessing
ssh build-host-inside-net 'cd app && ./gradlew assembleRelease'
# same env as runtime -> reproducible, not blind iteration
Say it (English)
  • ·I had to ship an Android app into a closed factory network, but I could only build it on a machine outside that network.
  • ·The artifact would behave differently inside than anything I could reproduce on the outside.
  • ·So every fix meant copying it across the boundary by hand and basically guessing what was different — one round could burn most of an afternoon.
  • ·The real problem was that I was building outside the environment it actually ran in, so I had no visibility into the failures.
  • ·The fix is to build inside the network it runs in, or have a reproducible pipeline that targets that network, instead of a guessing loop.
Push it further
  • Build inside the same network the artifact runs in, even if it means standing up a minimal build host in there.
  • If no in-network build host exists, set up a reproducible pipeline that targets that exact environment so outside builds match inside behavior.
  • Treat the network boundary as part of the build contract, not an afterthought — make the run environment reproducible before iterating.
  • Cut out manual hand-carry transfers that hide what's actually different between build and run environments.