mirror of
https://github.com/netbirdio/netbird.git
synced 2026-10-01 19:19:07 +02:00
[infrastructure] Let a suite outside this repo use the e2e harness (#7176)
e2e/harness documents itself as feature-agnostic, but three details assumed the caller lives in this repo, so the terraform provider's acceptance suite would otherwise carry a second harness for the same product. repoRoot took the first module root above the working directory as the Docker build context, which from another module is the caller's own root, with no combined/Dockerfile.multistage in it. It now requires that ancestor to be this module, and otherwise asks the go tool for the source: for a dependent, the extracted directory of the version it pins, so the server matches the client library it was compiled against. That lookup uses -mod=readonly, since automatic vendor mode otherwise reports an empty Dir. Geolocation was disabled unconditionally. Agent-network ingest does not use it, but location-based posture checks need the database, and a rule management cannot evaluate fails rather than passing. StartClient pinned one network alias and set no hostname, so a second agent could not start and a peer's name was arbitrary. Management records that hostname, making it the peer's name in the API. The client entrypoint is copied with an explicit mode: git tracks it 100755, but the module cache extracts 0444, so a dependent's build produced a container exiting with "permission denied". Adds CombinedOption, WithGeolocation, WithServerEnv, ClientOption and WithClientName.
This commit is contained in:
@@ -20,5 +20,9 @@ ENV NETBIRD_BIN="/usr/local/bin/netbird" \
|
||||
NB_ENABLE_CAPTURE="false" \
|
||||
NB_ENTRYPOINT_SERVICE_TIMEOUT="30"
|
||||
ENTRYPOINT [ "/usr/local/bin/netbird-entrypoint.sh" ]
|
||||
COPY client/netbird-entrypoint.sh /usr/local/bin/netbird-entrypoint.sh
|
||||
# --chmod because the build context is not always a git checkout. A suite in
|
||||
# another module builds from this module's extracted copy in the module cache,
|
||||
# where every file is 0444 — the cache drops the executable bit git records — and
|
||||
# a bare COPY then produces an entrypoint the runtime cannot exec.
|
||||
COPY --chmod=0755 client/netbird-entrypoint.sh /usr/local/bin/netbird-entrypoint.sh
|
||||
COPY --from=builder /out/netbird /usr/local/bin/netbird
|
||||
|
||||
Reference in New Issue
Block a user