Repository navigation
Conversation
Provide a reproducible repo-managed environment so agents can run the module, test suite, and linter end to end: - .cursor/Dockerfile: Ubuntu 24.04 base with PowerShell 7, net-snmp, and the Linux networking tools (iproute2, net-tools) the discovery wizard shells out to. - .cursor/install.sh: idempotent bootstrap that installs Pester (>= 5) and PSScriptAnalyzer for the current user and validates the module manifest. - .cursor/environment.json: wires the Dockerfile build and install step, running as the ubuntu user. Co-authored-by: jacob <jacob@jacobrakai.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a reproducible, repo-managed Cloud Agent development environment so agents can run the
NetDiagram-PSmodule, its Pester test suite, and the PSScriptAnalyzer linter end to end without manual setup.The repository had no environment configuration; a fresh VM ships without PowerShell or the networking tools the discovery wizard depends on. This change captures the full toolchain in version control.
What was added
.cursor/Dockerfile— Ubuntu 24.04 base image with:snmpwalk)ip) and net-tools (arp) — the Linux networking tools the quick-start wizard shells out to for interface/route/neighbor discovery.cursor/install.sh— idempotent bootstrap that installs Pester (>= 5.0.0) and PSScriptAnalyzer for the current user (only when missing) and validates the module manifest..cursor/environment.json— wires the Dockerfile build and install step, running as theubuntuuser.Validation
Verified on the VM before committing:
./tests/run-tests.sh(Pester)Test-ModuleManifestPSScriptAnalyzer -Severity Errorexamples/New-NetworkDiagram.ps1)172.30.0.2/24, gateway, DNS; generates diagramImport-Inventory→Export-DrawIO/Export-Mermaid/Export-NetBox)install.shidempotenceFresh built-environment verification
A draft environment build ran the install step against a clean checkout (exit 0), then a fresh Cloud Agent booted from that build and re-ran every check:
7.6.6/5.9.4/iproute2-6.1.0//usr/sbin/arp6.2.0/1.25.0Test-ModuleManifest./tests/run-tests.shRendered output
The generated
.drawioopened and rendered correctly in diagrams.net (subnet containers with router/switch/server/workstation and an IPv6 router):Generated NetDiagram-PS draw.io network diagram rendered in diagrams.net
Notes
>= 5.0.0floor); the suite runs clean under it..cursor/environment.json), so it takes precedence over any dashboard-managed environment and activates automatically for agents on this branch (and onmainonce merged) — no dashboard Save required.To show artifacts inline, enable in settings.