Cut 4960 eu tenant support#715
Merged
Merged
Conversation
Expanded the JCEnvironment parameter to accept 'EU' and 'US' values, updated help message, and added corresponding URL base path for the EU region. This allows users to connect to JumpCloud organizations in the EU region.
Added detailed PowerShell code formatting options to .vscode/settings.json, including whitespace, brace, indentation, and alias correction preferences for improved code consistency and readability.
Introduces a new 'JCEnvironment' section to the settings file to support EU-based organizations. Updates the module banner message to inform users about EU environment support and relevant configuration commands.
Changed region values from 'US' to 'STANDARD' and updated help messages and default values accordingly. Improved environment variable assignment and ensured compatibility with new region naming conventions.
Get-JCReport now checks the JCEnvironment variable and uses the EU API endpoint for report artifact retrieval if set to 'EU'. This improves compatibility for organizations hosted in the EU region.
Added checks to verify JCEnvironment.location changes in addition to parallelOverride. Ensures both settings are properly updated and tested in Set-JCSettingsFile.
Changed the environment location comparison from 'US' to 'STANDARD' in Connect-JCOnline.ps1 to align with updated environment naming conventions.
…Cloud/support into CUT-4960_EUTenantSupport
Replaces dynamic assignment of JCEnvironment Location with a static value of 'STANDARD' in New-JCSettingsFile.ps1. This simplifies the logic and ensures consistent default behavior.
The JCEnvironment value in the generated config file now reflects the JCEnvironment environment variable if set, defaulting to 'STANDARD' otherwise. This allows for dynamic configuration based on environment settings.
Updated Connect-JCOnline.ps1 to set PSDefaultParameterValues in the global scope for API and Console hosts. Also switched to using $env:JCEnvironment in the environment switch statement for consistency.
Refactored environment variable assignment to prioritize JCConfig.JCEnvironment.Location when not 'STANDARD'. Added fallback logic for setting JCEnvironment to 'STANDARD' if no value is provided, improving reliability and clarity in environment configuration.
Introduces PESTER_EU_APIKEY and PESTER_EU_ORGID as environment variables in the PowerShell module CI workflow. These are set as global variables for use in the CI process, supporting EU-specific testing or deployment.
Introduced a new test context for EU organization scenarios, verifying connection using EU-specific API key and Org ID parameters. Also standardized conditional statements to use lowercase 'if', 'elseif', and 'else' for consistency.
Separated JCEnvironment location change tests into a dedicated test case and added assertions for both environment and global variables. This improves clarity and coverage of the Set-JCSettingsFile functionality.
Adds logic to set the JumpCloud API base path according to the JCEnvironment environment variable, defaulting to EU or US endpoints as appropriate if JCUrlBasePath is not set.
Eliminated the check for JCAPIKEY and the forced Connect-JCOnline call in the begin block of Set-JCSettingsFile, streamlining initialization logic.
…oud/support into CUT-4960_EUTenantSupport
jworkmanjc
requested changes
Dec 2, 2025
jworkmanjc
approved these changes
Dec 3, 2025
kmaranionjc
approved these changes
Dec 3, 2025
Contributor
kmaranionjc
left a comment
There was a problem hiding this comment.
Looks good on my end. Great work here!
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.
Issues
What does this solve?
This pull request focuses on improving consistency, clarity, and maintainability across the CI workflow, editor configuration, and PowerShell scripts. The most significant changes include standardizing naming conventions, specifying dependency versions, enhancing support for EU testing, updating editor and formatting settings, and refactoring PowerShell scripts for better readability and reliability.
Main Changes:
-JCEnvironmentparam toConnect-JCOnlineandSet-JCSettingsFilefunctions to allow for admins to change their environment from 'STANDARD' to 'EU'JCEnvironment.LocationvalueOther Changes:
CI Workflow and Dependency Management:
DependanciestoDependenciesthroughout the.github/workflows/powershell-module-ci.ymlfile, including job names, cache keys, and dependencies lists. This improves clarity and consistency in the CI pipeline. [1] [2] [3] [4] [5] [6] [7] [8] [9]JumpCloud.SDK.V1,JumpCloud.SDK.V2, andJumpCloud.SDK.DirectoryInsightsmodules fromlatestto0.1.1, ensuring reproducible builds and reducing risk of breaking changes from upstream updates.EU Testing Support:
PESTER_EU_APIKEY,PESTER_EU_ORGID) and corresponding PowerShell global variables to enable Pester testing for EU organizations, expanding test coverage. [1] [2]Editor and Formatting Configuration:
.vscode/settings.jsonto use the correctcSpell.enabledFileTypesformat and added extensive PowerShell formatting options, improving code quality and consistency for contributors. [1] [2]PowerShell Script Refactoring:
Build-HelpFiles.ps1to use consistent lowercase keywords (param,try,catch,if,switch,foreach,default), added status output for help file generation steps, and enabled PlatyPS logging for better traceability and error handling. [1] [2] [3] [4] [5] [6] [7] [8] [9]jcapiToSupportSync.ps1to exclude additional unwanted parameters (apiHost,consoleHost), and standardized PowerShell keyword casing for better readability and maintainability. [1] [2] [3]Is there anything particularly tricky?
How should this be tested?