From df46b93ae5a81ac556f15b4006eca51cfa425e3c Mon Sep 17 00:00:00 2001 From: Ryan Casperson Date: Fri, 6 Sep 2024 13:12:26 -0400 Subject: [PATCH] (test): run workflows --- .github/workflows/powershell-module-ci.yml | 13 ++-- .github/workflows/release-workflow.yml | 72 +++++++++---------- PowerShell/JumpCloud Module/Docs/JumpCloud.md | 2 +- PowerShell/JumpCloud Module/JumpCloud.psd1 | 64 ++++++++--------- PowerShell/ModuleChangelog.md | 16 +++++ 5 files changed, 86 insertions(+), 81 deletions(-) diff --git a/.github/workflows/powershell-module-ci.yml b/.github/workflows/powershell-module-ci.yml index 2b27c1bac..2c41e6ec6 100644 --- a/.github/workflows/powershell-module-ci.yml +++ b/.github/workflows/powershell-module-ci.yml @@ -1,22 +1,17 @@ name: PowerShell Module CI on: - pull_request: - # Sequence of patterns matched against refs/heads + push: branches: - - "master" - paths: - - "PowerShell/Deploy/**" - - "PowerShell/JumpCloud Module/**" - - "PowerShell/ModuleChangelog.md" - types: [opened, synchronize, reopened, labeled, unlabeled] + - RKT-2364-use-upload-secure-artifact + concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true jobs: Filter-Branch: runs-on: ubuntu-latest - if: contains(github.event.pull_request.labels.*.name, 'PowerShell Module') + # if: contains(github.event.pull_request.labels.*.name, 'PowerShell Module') steps: - run: echo "Building JumpCloud Module Event 'JumpCloudModule_'" Check-PR-Labels: diff --git a/.github/workflows/release-workflow.yml b/.github/workflows/release-workflow.yml index 90c23d763..08eacb017 100644 --- a/.github/workflows/release-workflow.yml +++ b/.github/workflows/release-workflow.yml @@ -1,18 +1,12 @@ name: Release and Publish PSModule on: - pull_request: - types: - - closed - paths: - - "PowerShell/Deploy/**" - - "PowerShell/JumpCloud Module/**" - - "PowerShell/ModuleChangelog.md" + push: branches: - - master + - RKT-2364-use-upload-secure-artifact jobs: Check-If-Merged: - if: github.event.pull_request.merged == true + # if: github.event.pull_request.merged == true runs-on: ubuntu-latest steps: - name: Check if Merged @@ -20,7 +14,7 @@ jobs: Filter-Branch: runs-on: ubuntu-latest - if: contains(github.event.pull_request.labels.*.name, 'PowerShell Module') + # if: contains(github.event.pull_request.labels.*.name, 'PowerShell Module') steps: - run: echo "Building JumpCloud Module Event 'JumpCloudModule_'" @@ -132,22 +126,22 @@ jobs: - name: Manual Approval for Release run: echo "Awaiting approval from required reviewers before continuing" - Draft-GH-Release: - needs: [Manual-Approval-Release] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Build Draft Release - run: | - VERSION=$(grep -Po '(\d+\.\d+\.\d+)' ${{ github.workspace }}/PowerShell/JumpCloud\ Module/JumpCloud.psd1) - TITLE="JumpCloud PowerShell Module v$VERSION" - CHANGELOG=$(cat ${{ github.workspace }}/PowerShell/ModuleChangelog.md |awk "/^## $VERSION/{ f = 1; next } /## [0-9]+.[0-9]+.[0-9]+/{ f = 0 } f") - TAG="v$VERSION" - BODY="$TITLE $CHANGELOG" + # Draft-GH-Release: + # needs: [Manual-Approval-Release] + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v4 + # - name: Build Draft Release + # run: | + # VERSION=$(grep -Po '(\d+\.\d+\.\d+)' ${{ github.workspace }}/PowerShell/JumpCloud\ Module/JumpCloud.psd1) + # TITLE="JumpCloud PowerShell Module v$VERSION" + # CHANGELOG=$(cat ${{ github.workspace }}/PowerShell/ModuleChangelog.md |awk "/^## $VERSION/{ f = 1; next } /## [0-9]+.[0-9]+.[0-9]+/{ f = 0 } f") + # TAG="v$VERSION" + # BODY="$TITLE $CHANGELOG" - (gh release view $TAG && echo "Release exists for $TAG") || gh release create $TAG --title "$TITLE" --notes "$BODY" --draft - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # (gh release view $TAG && echo "Release exists for $TAG") || gh release create $TAG --title "$TITLE" --notes "$BODY" --draft + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} Deploy-Nupkg: needs: [Manual-Approval-Release, Build-Nuspec-Nupkg] @@ -157,20 +151,20 @@ jobs: uses: actions/download-artifact@v4 with: name: jumpcloud-module-nupkg - - name: Publish - shell: pwsh - run: | - # add nuget source for PSGallery: - dotnet nuget add source "https://www.powershellgallery.com/api/v2/package" --name PSGallery - # get nupkg artifact: - $nupkgPath = (Get-ChildItem -Path:("./*.nupkg")).FullName - # test - $nupkgPath | Should -Exist - Write-Host "Nupkg Artifact Restored: $nupkgPath" - # nuget push from here: - dotnet nuget push $nupkgPath --source PSGallery --api-key $env:NuGetApiKey - env: - NuGetApiKey: ${{ secrets.NUGETAPIKEY }} + # - name: Publish + # shell: pwsh + # run: | + # # add nuget source for PSGallery: + # dotnet nuget add source "https://www.powershellgallery.com/api/v2/package" --name PSGallery + # # get nupkg artifact: + # $nupkgPath = (Get-ChildItem -Path:("./*.nupkg")).FullName + # # test + # $nupkgPath | Should -Exist + # Write-Host "Nupkg Artifact Restored: $nupkgPath" + # # nuget push from here: + # dotnet nuget push $nupkgPath --source PSGallery --api-key $env:NuGetApiKey + # env: + # NuGetApiKey: ${{ secrets.NUGETAPIKEY }} Cleanup-Cache: needs: Deploy-Nupkg diff --git a/PowerShell/JumpCloud Module/Docs/JumpCloud.md b/PowerShell/JumpCloud Module/Docs/JumpCloud.md index 2cdb89d4b..4f2b3eab2 100644 --- a/PowerShell/JumpCloud Module/Docs/JumpCloud.md +++ b/PowerShell/JumpCloud Module/Docs/JumpCloud.md @@ -2,7 +2,7 @@ Module Name: JumpCloud Module Guid: 31c023d1-a901-48c4-90a3-082f91b31646 Download Help Link: https://github.com/TheJumpCloud/support/wiki -Help Version: 2.13.1 +Help Version: 2.13.2 Locale: en-Us --- diff --git a/PowerShell/JumpCloud Module/JumpCloud.psd1 b/PowerShell/JumpCloud Module/JumpCloud.psd1 index e96f04f57..4ba73f585 100644 --- a/PowerShell/JumpCloud Module/JumpCloud.psd1 +++ b/PowerShell/JumpCloud Module/JumpCloud.psd1 @@ -12,7 +12,7 @@ RootModule = 'JumpCloud.psm1' # Version number of this module. -ModuleVersion = '2.13.1' +ModuleVersion = '2.13.2' # Supported PSEditions # CompatiblePSEditions = @() @@ -51,8 +51,8 @@ PowerShellVersion = '4.0' # ProcessorArchitecture = '' # Modules that must be imported into the global environment prior to importing this module -RequiredModules = @('JumpCloud.SDK.DirectoryInsights', - 'JumpCloud.SDK.V1', +RequiredModules = @('JumpCloud.SDK.DirectoryInsights', + 'JumpCloud.SDK.V1', 'JumpCloud.SDK.V2') # Assemblies that must be loaded prior to importing this module @@ -71,35 +71,35 @@ RequiredModules = @('JumpCloud.SDK.DirectoryInsights', # NestedModules = @() # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. -FunctionsToExport = 'Add-JCAssociation', 'Add-JCCommandTarget', 'Add-JCGsuiteMember', - 'Add-JCOffice365Member', 'Add-JCRadiusReplyAttribute', - 'Add-JCSystemGroupMember', 'Add-JCSystemUser', - 'Add-JCUserGroupMember', 'Backup-JCOrganization', 'Connect-JCOnline', - 'Copy-JCAssociation', 'Get-JCAdmin', 'Get-JCAssociation', - 'Get-JCBackup', 'Get-JCCloudDirectory', 'Get-JCCommand', - 'Get-JCCommandResult', 'Get-JCCommandTarget', 'Get-JCEvent', - 'Get-JCEventCount', 'Get-JCGroup', 'Get-JCOrganization', 'Get-JCPolicy', - 'Get-JCPolicyResult', 'Get-JCPolicyTargetGroup', - 'Get-JCPolicyTargetSystem', 'Get-JCRadiusReplyAttribute', - 'Get-JCRadiusServer', 'Get-JCScheduledUserstate', 'Get-JCSystem', - 'Get-JCSystemApp', 'Get-JCSystemGroupMember', 'Get-JCSystemInsights', - 'Get-JCSystemUser', 'Get-JCUser', 'Get-JCUserGroupMember', - 'Import-JCCommand', 'Import-JCMSPFromCSV', 'Import-JCUsersFromCSV', - 'Invoke-JCCommand', 'Invoke-JCDeployment', 'New-JCCommand', - 'New-JCDeploymentTemplate', 'New-JCImportTemplate', - 'New-JCMSPImportTemplate', 'New-JCPolicy', 'New-JCRadiusServer', - 'New-JCSystemGroup', 'New-JCUser', 'New-JCUserGroup', - 'Remove-JCAssociation', 'Remove-JCCommand', 'Remove-JCCommandResult', - 'Remove-JCCommandTarget', 'Remove-JCGsuiteMember', - 'Remove-JCOffice365Member', 'Remove-JCPolicy', - 'Remove-JCRadiusReplyAttribute', 'Remove-JCRadiusServer', - 'Remove-JCSystem', 'Remove-JCSystemGroup', - 'Remove-JCSystemGroupMember', 'Remove-JCSystemUser', 'Remove-JCUser', - 'Remove-JCUserGroup', 'Remove-JCUserGroupMember', - 'Send-JCPasswordReset', 'Set-JCCloudDirectory', 'Set-JCCommand', - 'Set-JCOrganization', 'Set-JCPolicy', 'Set-JCRadiusReplyAttribute', - 'Set-JCRadiusServer', 'Set-JCSettingsFile', 'Set-JCSystem', - 'Set-JCSystemUser', 'Set-JCUser', 'Set-JCUserGroupLDAP', +FunctionsToExport = 'Add-JCAssociation', 'Add-JCCommandTarget', 'Add-JCGsuiteMember', + 'Add-JCOffice365Member', 'Add-JCRadiusReplyAttribute', + 'Add-JCSystemGroupMember', 'Add-JCSystemUser', + 'Add-JCUserGroupMember', 'Backup-JCOrganization', 'Connect-JCOnline', + 'Copy-JCAssociation', 'Get-JCAdmin', 'Get-JCAssociation', + 'Get-JCBackup', 'Get-JCCloudDirectory', 'Get-JCCommand', + 'Get-JCCommandResult', 'Get-JCCommandTarget', 'Get-JCEvent', + 'Get-JCEventCount', 'Get-JCGroup', 'Get-JCOrganization', 'Get-JCPolicy', + 'Get-JCPolicyResult', 'Get-JCPolicyTargetGroup', + 'Get-JCPolicyTargetSystem', 'Get-JCRadiusReplyAttribute', + 'Get-JCRadiusServer', 'Get-JCScheduledUserstate', 'Get-JCSystem', + 'Get-JCSystemApp', 'Get-JCSystemGroupMember', 'Get-JCSystemInsights', + 'Get-JCSystemUser', 'Get-JCUser', 'Get-JCUserGroupMember', + 'Import-JCCommand', 'Import-JCMSPFromCSV', 'Import-JCUsersFromCSV', + 'Invoke-JCCommand', 'Invoke-JCDeployment', 'New-JCCommand', + 'New-JCDeploymentTemplate', 'New-JCImportTemplate', + 'New-JCMSPImportTemplate', 'New-JCPolicy', 'New-JCRadiusServer', + 'New-JCSystemGroup', 'New-JCUser', 'New-JCUserGroup', + 'Remove-JCAssociation', 'Remove-JCCommand', 'Remove-JCCommandResult', + 'Remove-JCCommandTarget', 'Remove-JCGsuiteMember', + 'Remove-JCOffice365Member', 'Remove-JCPolicy', + 'Remove-JCRadiusReplyAttribute', 'Remove-JCRadiusServer', + 'Remove-JCSystem', 'Remove-JCSystemGroup', + 'Remove-JCSystemGroupMember', 'Remove-JCSystemUser', 'Remove-JCUser', + 'Remove-JCUserGroup', 'Remove-JCUserGroupMember', + 'Send-JCPasswordReset', 'Set-JCCloudDirectory', 'Set-JCCommand', + 'Set-JCOrganization', 'Set-JCPolicy', 'Set-JCRadiusReplyAttribute', + 'Set-JCRadiusServer', 'Set-JCSettingsFile', 'Set-JCSystem', + 'Set-JCSystemUser', 'Set-JCUser', 'Set-JCUserGroupLDAP', 'Update-JCModule', 'Update-JCMSPFromCSV', 'Update-JCUsersFromCSV' # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. diff --git a/PowerShell/ModuleChangelog.md b/PowerShell/ModuleChangelog.md index a19c0f544..8c9e43f1f 100644 --- a/PowerShell/ModuleChangelog.md +++ b/PowerShell/ModuleChangelog.md @@ -1,3 +1,19 @@ +## 2.13.2 + + +Release Date: August 20, 2024 + +#### RELEASE NOTES + +``` +TEST - DO NOT MERGE +``` + +#### FEATURES: + +* Get-JCAdmin - Returns administrators in your organization + * MSP/MTP tenants can query multiple organizations or individual organizations + ## 2.13.1 Release Date: August 20, 2024