Update build scripts and tests so that repository settings are copied dynamically from the build. See gh-42333