Skip to content

Commit

Permalink
Unable to Import PowerSTIG 4.4.0 Due to cyclic dependency Error (#617)
Browse files Browse the repository at this point in the history
* removed vmware.vspheredsc as a dependency because all of its required dependencies are loaded

* updated module load process for VMware modules

* updated build.yaml

* updated test

* Updated tests

* removed stop error action

* updated formating

* updated based on failing hqrm

* updated module  helper

* moved helper module

* updated location of module helper

* reduced vmware.VsphereDSC version

* updated build.yaml

* updated data file

* update module version schema

* updated based on testing

* Update changelog

* Update based on PR feedback
  • Loading branch information
erjenkin committed May 19, 2020
1 parent 5c80778 commit 865327c
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 20 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## [Unreleased]

* Fixed [#616](https://github.com/microsoft/PowerStig/issues/616): Unable to Import PowerSTIG 4.4.0 Due to cyclic dependency Error
* Update PowerSTIG to use Azure Pipelines and DSC Community based build logic: [#600](https://github.com/microsoft/PowerStig/issues/600)
* Update PowerSTIG to parse/convert the Vmware Vsphere 6.5 STIG V1R3: [#604](https://github.com/microsoft/PowerStig/issues/604)

Expand Down
7 changes: 7 additions & 0 deletions Tests/Integration/Module/PowerStig.Integration.tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,11 @@ Describe "$moduleName module" {
$compare.Count | Should Be 0
}
}

Context 'Import PowerSTIG should not throw' {

It "Should not throw and error" {
{Import-Module PowerSTIG} | Should -Not -Throw
}
}
}
26 changes: 13 additions & 13 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -234,19 +234,19 @@ Begin
}
}
InvokeBuild = 'latest'
PSScriptAnalyzer = 'latest'
Pester = 'latest'
Plaster = 'latest'
ModuleBuilder = '1.0.0'
ChangelogManagement = 'latest'
Sampler = '0.104.0'
xDSCResourceDesigner = 'latest'
PSPKI = 'latest'
MarkdownLinkCheck = 'latest'
'DscResource.Test' = 'latest'
'DscResource.AnalyzerRules' = 'latest'
'powershell-yaml' = 'latest'
InvokeBuild = 'latest'
PSScriptAnalyzer = 'latest'
Pester = 'latest'
Plaster = 'latest'
ModuleBuilder = '1.0.0'
ChangelogManagement = 'latest'
Sampler = '0.104.0'
xDSCResourceDesigner = 'latest'
PSPKI = 'latest'
MarkdownLinkCheck = 'latest'
'DscResource.Test' = 'latest'
'DscResource.AnalyzerRules' = 'latest'
'powershell-yaml' = 'latest'
# The modules below are dynamically inserted from the Begin block of .\build.ps1
'@
Expand Down
14 changes: 7 additions & 7 deletions source/PowerStig.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Description = 'The PowerStig module provides a set of PowerShell classes to acce
2. Ignoring a single or entire class of rules (auto-documenting)
3. Organizational settings to address STIG rules that have allowable ranges.
This module is intended to be used by additional automation as a lightweight portable database to audit and enforce the parsed STIG data.'
This module is intended to be used by additional automation as a lightweight portable database to audit and enforce the parsed STIG data.'

# Minimum version of the Windows PowerShell engine required by this module
PowerShellVersion = '5.1'
Expand All @@ -48,13 +48,13 @@ RequiredModules = @(
@{ModuleName = 'WindowsDefenderDsc'; ModuleVersion = '1.0.0.0'},
@{ModuleName = 'xDnsServer'; ModuleVersion = '1.11.0.0'},
@{ModuleName = 'xWebAdministration'; ModuleVersion = '2.5.0.0'}
@{ModuleName = 'VMware.VimAutomation.Sdk'; ModuleVersion = '12.0.0.15939651'}
@{ModuleName = 'VMware.VimAutomation.Sdk'; ModuleVersion = '12.0.0.15939651'},
@{ModuleName = 'VMware.VimAutomation.Common'; ModuleVersion = '12.0.0.15939652'}
@{ModuleName = 'VMware.Vim'; ModuleVersion ='7.0.0.15939650'}
@{ModuleName = 'VMware.VimAutomation.Cis.Core'; ModuleVersion = '12.0.0.15939657'}
@{ModuleName = 'VMware.VimAutomation.Core'; ModuleVersion = '12.0.0.15939655'}
@{ModuleName = 'VMware.VimAutomation.Storage'; ModuleVersion = '12.0.0.15939648'}
@{ModuleName = 'VMware.VimAutomation.Vds'; ModuleVersion = '12.0.0.15940185'}
@{ModuleName = 'VMware.Vim'; ModuleVersion ='7.0.0.15939650'},
@{ModuleName = 'VMware.VimAutomation.Cis.Core'; ModuleVersion = '12.0.0.15939657'},
@{ModuleName = 'VMware.VimAutomation.Core'; ModuleVersion = '12.0.0.15939655'},
@{ModuleName = 'VMware.VimAutomation.Storage'; ModuleVersion = '11.5.0.14901686'},
@{ModuleName = 'VMware.VimAutomation.Vds'; ModuleVersion = '11.2.0.12483615'},
@{ModuleName = 'Vmware.vSphereDsc'; ModuleVersion = '2.1.0.58'}
)

Expand Down

0 comments on commit 865327c

Please sign in to comment.