Compare commits

..

21 Commits

Author SHA1 Message Date
Andy Jordan f665242c1b Move installation of test modules to bootstrapping (#132)
So we can get this working on OneBranch.
2026-02-19 18:14:20 -08:00
Andy Jordan 8d7e4303d3 Update build and release pipeline (#131) 2026-02-19 17:00:39 -08:00
Steve Lee 820ac1a06e Update to v2.0.8 and backport two fixes (#130) 2025-12-04 13:13:30 -08:00
Andrew 79d47ceed9 Fixed Invoke-DscResource error when a class-based resource module path contains a space (#112) 2023-05-13 11:34:20 -07:00
Andrew 727085ecaa Fixed link in v2 changelog 2023-02-27 13:53:37 -08:00
Andrew a935614790 Added v2 changelog 2023-02-27 13:48:07 -08:00
Andrew 7c063aed9d Updated Sbom task parameters 2023-02-24 11:39:47 -08:00
Andrew b83ba2ccc0 Updated EsrpSign parameters 2023-02-24 10:28:36 -08:00
Andrew 316773dfe6 release pipeline - updated machine pool 2023-02-23 20:46:55 -08:00
Andrew 11b3bd0fdb Updated version to v2.0.6 2023-02-23 20:35:27 -08:00
Andrew 4af8841d74 Added SBOM generation and changed image to PSMMS2019-Secure (#69) 2023-02-23 20:32:43 -08:00
Andrew ad361bfe4b Update release pipeline for 1ES (#61) 2023-02-23 20:32:26 -08:00
Andrew 08b5f4de0e Release pipeline updates for 1ES (#63) 2023-02-23 20:31:17 -08:00
Andrew f142525bc7 Updated version to v2.0.6 2023-02-23 20:00:37 -08:00
Andrew a9182cf60e Add ImplementationDetail member only when the member does not already exist 2023-02-23 19:59:36 -08:00
Andrew 68cfed18c9 Remove duplicate result resources from Get-DSCResourcesModules 2023-02-23 19:54:34 -08:00
Steve Lee 3ae4b6afda Change ErrorAction to Ignore so that the error doesn't show up in $Error (#93) 2023-02-23 19:51:42 -08:00
Andrew 4777a3ed77 Remove PSDesiredStateConfiguration.InvokeDscResource experimental feature. (#52) 2023-02-23 19:49:35 -08:00
Andrew 85eeda51a6 Updating CI and Release pipelines with latest Compliance (#43) 2023-02-23 19:40:46 -08:00
bagajjal 70dad1f41e support embedded resource (#38) 2023-02-23 19:37:28 -08:00
Travis Plunk 1cb7076792 Fix CI issues (#40) 2023-02-23 19:36:28 -08:00
30 changed files with 467 additions and 1192 deletions
+10
View File
@@ -0,0 +1,10 @@
{
"instanceUrl": "https://msazure.visualstudio.com",
"projectName": "One",
"areaPath": "One\\MGMT\\Compute\\Powershell\\Powershell\\PowerShell Core",
"notificationAliases": [
"andschwa@microsoft.com",
"slee@microsoft.com"
],
"codebaseName": "PSDSC_202502"
}
+45
View File
@@ -0,0 +1,45 @@
name: CI Tests
on:
push:
branches: [ v2 ]
pull_request:
branches: [ v2 ]
jobs:
ci:
name: pester
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install PSResources
run: ./tools/installPSResources.ps1
shell: pwsh
- name: Build
run: ./build.ps1 -Build
shell: pwsh
- name: Test
run: ./build.ps1 -Test
shell: pwsh
- name: Package
run: ./build.ps1 -Publish
shell: pwsh
- name: Upload build artifacts
uses: actions/upload-artifact@v4
if: always()
with:
name: PSDesiredStateConfiguration-package
path: out/**/*.nupkg
- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: PSDesiredStateConfiguration-tests
path: out/testResults.xml
@@ -0,0 +1,155 @@
trigger:
- main
schedules:
- cron: '18 11 * * 5'
displayName: Weekly CodeQL
branches:
include:
- main
always: true
parameters:
- name: debug
displayName: Enable debug output
type: boolean
default: false
- name: OfficialBuild
displayName: Use Official OneBranch template
type: boolean
default: true
- name: Release
displayName: Generate a release
type: boolean
default: false
variables:
system.debug: ${{ parameters.debug }}
BuildConfiguration: Release
WindowsContainerImage: onebranch.azurecr.io/windows/ltsc2022/vse2022:latest
OneBranchTemplate: ${{ iif(parameters.OfficialBuild, 'v2/OneBranch.Official.CrossPlat.yml@templates', 'v2/OneBranch.NonOfficial.CrossPlat.yml@templates') }}
resources:
repositories:
- repository: templates
type: git
name: OneBranch.Pipelines/GovernedTemplates
ref: refs/heads/main
extends:
# https://aka.ms/obpipelines/templates
template: ${{ variables.OneBranchTemplate }}
parameters:
globalSdl: # https://aka.ms/obpipelines/sdl
asyncSdl:
enabled: true
forStages: [build]
featureFlags:
EnableCDPxPAT: false
WindowsHostVersion:
Version: 2022
Network: KS3
release:
category: NonAzure
stages:
- stage: build
jobs:
- job: main
displayName: Build package
pool:
type: windows
variables:
ob_outputDirectory: $(Build.SourcesDirectory)/out
steps:
- pwsh: |
$manifest = Import-PowerShellDataFile ./src/PSDesiredStateConfiguration/PSDesiredStateConfiguration.psd1
$version = $manifest.ModuleVersion
Write-Output "##vso[task.setvariable variable=version;isOutput=true]$version"
name: package
displayName: Get version from module manifest
- task: onebranch.pipeline.version@1
displayName: Set OneBranch version
inputs:
system: Custom
customVersion: $(package.version)
- pwsh: ./tools/installPSResources.ps1 -PSRepository CFS
displayName: Install PSResources
- pwsh: ./build.ps1 -Clean -Build -Test
displayName: Build
- task: onebranch.pipeline.signing@1
displayName: Sign 1st-party files
inputs:
command: sign
signing_profile: external_distribution
search_root: $(Build.SourcesDirectory)/out
files_to_sign: |
**/*.psd1;
**/*.psm1;
- pwsh: ./build.ps1 -Publish
displayName: Package module
- task: onebranch.pipeline.signing@1
displayName: Sign NuGet package
inputs:
command: sign
signing_profile: external_distribution
search_root: $(Build.SourcesDirectory)/out
files_to_sign: |
*.nupkg
- stage: release
dependsOn: build
condition: and(succeeded(), ${{ eq(parameters.Release, true) }})
variables:
ob_release_environment: ${{ iif(parameters.OfficialBuild, 'Production', 'Test') }}
version: $[ stageDependencies.build.main.outputs['package.version'] ]
jobs:
- job: github
displayName: Publish draft to GitHub
pool:
type: release
templateContext:
inputs:
- input: pipelineArtifact
artifactName: drop_build_main
steps:
- task: GitHubRelease@1
displayName: Create GitHub release
inputs:
gitHubConnection: GitHub
repositoryName: PowerShell/PSDesiredStateConfiguration
target: main
assets: $(Pipeline.Workspace)/PSDesiredStateConfiguration.$(version).nupkg
tagSource: userSpecifiedTag
tag: $(version)
isDraft: true
addChangeLog: false
releaseNotesSource: inline
releaseNotesInline: "<!-- TODO: Generate release notes on GitHub! -->"
- job: validation
displayName: Manual validation
pool:
type: server
timeoutInMinutes: 1440
steps:
- task: ManualValidation@0
displayName: Wait 24 hours for validation
inputs:
notifyUsers: $(Build.RequestedForEmail)
instructions: Please validate the release and then publish it!
timeoutInMinutes: 1440
- job: publish
dependsOn: validation
displayName: Publish to PowerShell Gallery
pool:
type: release
templateContext:
inputs:
- input: pipelineArtifact
artifactName: drop_build_main
steps:
- task: NuGetCommand@2
displayName: Publish module to PowerShell Gallery
inputs:
command: push
packagesToPush: $(Pipeline.Workspace)/PSDesiredStateConfiguration.$(version).nupkg
nuGetFeedType: external
publishFeedCredentials: PowerShellGallery
-78
View File
@@ -1,78 +0,0 @@
name: Build-$(System.PullRequest.PullRequestNumber)-$(Date:yyyyMMdd)$(Rev:.rr)
trigger:
# Batch merge builds together while a merge build is running
batch: true
branches:
include:
- master
pr:
branches:
include:
- master
- feature-*
paths:
exclude:
- /.dependabot/*
- /.poshchan/*
- /.github/**/*
- /.vscode/**/*
- /.vsts-ci/misc-analysis.yml
- /tools/**/*
- .editorconfig
- .gitattributes
- .gitignore
- /docs/**/*
- /CHANGELOG.md
- /CONTRIBUTING.md
- /README.md
- /LICENSE.txt
- /CODE_OF_CONDUCT.md
stages:
- stage: Build
displayName: Build PowerShell Package
jobs:
- job: BuildPkg
displayName: Build Package
pool:
vmImage: windows-2019
steps:
- template: templates/ci-build.yml
- pwsh: |
Write-Verbose "BUILD_OUTPUT_PATH- $env:BUILD_OUTPUT_PATH" -Verbose
Write-Verbose "SIGNED_OUTPUT_PATH- $env:SIGNED_OUTPUT_PATH" -Verbose
Copy-Item $env:BUILD_OUTPUT_PATH $env:SIGNED_OUTPUT_PATH -Recurse -Force
displayName: Build Signing Placeholder
- pwsh: |
$(Build.SourcesDirectory)/build.ps1 -Publish -Signed
displayName: Publish
timeoutInMinutes: 10
- stage: Test
displayName: Test Package
jobs:
- template: templates/ci-test.yml
parameters:
jobName: TestPkgWin
displayName: PowerShell Core on Windows
imageName: windows-2019
# Not supported on Windows PowerShell per PSD1
# - template: test.yml
# parameters:
# jobName: TestPkgWinPS
# displayName: Windows PowerShell on Windows
# imageName: windows-2019
# powershellExecutable: powershell
- template: templates/ci-test.yml
parameters:
jobName: TestPkgUbuntu16
displayName: PowerShell Core on Ubuntu 16.04
imageName: ubuntu-16.04
- template: templates/ci-test.yml
parameters:
jobName: TestPkgWinMacOS
displayName: PowerShell Core on macOS
imageName: macOS-10.14
-150
View File
@@ -1,150 +0,0 @@
name: $(BuildDefinitionName)_$(date:yyMM).$(date:dd)$(rev:rrr)
trigger:
batch: true
branches:
include:
- master
paths:
exclude:
- /.dependabot/*
- /.poshchan/*
- /.github/**/*
- /.vscode/**/*
- /.vsts-ci/misc-analysis.yml
- /tools/**/*
- .editorconfig
- .gitattributes
- .gitignore
- /docs/**/*
- /CHANGELOG.md
- /CONTRIBUTING.md
- /README.md
- /LICENSE.txt
- /CODE_OF_CONDUCT.md
stages:
- stage: Build
displayName: Build PowerShell Package
jobs:
- job: BuildPkg
displayName: Build Package
pool:
name: 'Package ES CodeHub Lab E'
steps:
- powershell: |
$powerShellPath = Join-Path -Path $env:AGENT_TEMPDIRECTORY -ChildPath 'powershell'
Invoke-WebRequest -Uri https://raw.githubusercontent.com/PowerShell/PowerShell/master/tools/install-powershell.ps1 -outfile ./install-powershell.ps1
./install-powershell.ps1 -Destination $powerShellPath
$vstsCommandString = "vso[task.setvariable variable=PATH]$powerShellPath;$env:PATH"
Write-Host "sending " + $vstsCommandString
Write-Host "##$vstsCommandString"
displayName: Install PowerShell Core
- task: PkgESSetupBuild@10
displayName: 'Package ES - Setup Build'
inputs:
productName: PSDesiredStateConfiguration
- template: templates/shouldsign.yml
- powershell: |
Get-ChildItem -Path env:
displayName: Capture environment
condition: succeededOrFailed()
- template: templates/ci-build.yml
- powershell: |
Write-Verbose "BUILD_OUTPUT_PATH- $env:BUILD_OUTPUT_PATH" -Verbose
Write-Verbose "SIGNED_OUTPUT_PATH- $env:SIGNED_OUTPUT_PATH" -Verbose
Copy-Item $env:BUILD_OUTPUT_PATH $env:SIGNED_OUTPUT_PATH -Recurse -Force
displayName: Copy unsigned files first
- task: PkgESCodeSign@10
displayName: 'CodeSign tools/releaseBuild/signing.xml'
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
inputs:
signConfigXml: tools/releaseBuild/signing.xml
inPathRoot: '$(BUILD_OUTPUT_PATH)'
outPathRoot: '$(SIGNED_OUTPUT_PATH)'
condition: and(succeeded(), eq(variables['SHOULD_SIGN'], 'true'))
- task: PowerShell@1
displayName: 'Create catalog file'
inputs:
scriptType: inlineScript
inlineScript: |
$signedDir = "$env:SIGNED_OUTPUT_PATH\PSDesiredStateConfiguration"
New-FileCatalog -CatalogFilePath "$env:SIGNED_OUTPUT_PATH\PSDesiredStateConfiguration\PSDesiredStateConfiguration.cat" -Path "$signedDir"
- task: PkgESCodeSign@10
displayName: 'CodeSign tools/releaseBuild/FileCatalogSigning.xml'
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
inputs:
signConfigXml: tools/releaseBuild/FileCatalogSigning.xml
inPathRoot: '$(SIGNED_OUTPUT_PATH)'
outPathRoot: '$(SIGNED_OUTPUT_PATH)'
condition: and(succeeded(), eq(variables['SHOULD_SIGN'], 'true'))
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
displayName: 'Component Detection'
- task: AntiMalware@3
inputs:
InputType: 'Basic'
ScanType: 'CustomScan'
FileDirPath: '$(SIGNED_OUTPUT_PATH)'
EnableServices: false
SupportLogOnError: false
TreatSignatureUpdateFailureAs: 'Warning'
SignatureFreshness: 'UpToDate'
TreatStaleSignatureAs: 'Error'
- task: PoliCheck@1
condition: succeededOrFailed()
inputs:
targetType: F
optionsFC: 0
optionsXS: 0
optionsPE: '1|2|3|4'
optionsHMENABLE: 0
optionsFTPATH: '$(Build.SourcesDirectory)\tools\terms\FileTypeSet.xml'
- task: CredScan@2
condition: succeededOrFailed()
# Publish results as artifacts
- task: PublishSecurityAnalysisLogs@3
condition: succeededOrFailed()
inputs:
ArtifactName: 'CodeAnalysisLogs'
ArtifactType: 'Container'
# Publish to TSA server
# - task: TSAUpload@1
# condition: succeededOrFailed()
# continueOnError: true
# inputs:
# tsaVersion: 'TsaV2'
# codebase: 'Existing'
# tsaEnvironment: 'PROD'
# codeBaseName: 'PSDesiredStateConfiguration_20190828'
# uploadAPIScan: false
# uploadBinSkim: false
# uploadCredScan: true
# uploadFortifySCA: false
# uploadFxCop: false
# uploadModernCop: false
# uploadPoliCheck: true
# uploadPREfast: false
# uploadRoslyn: false
# uploadTSLint: false
# uploadAsync: true
- pwsh: |
$(Build.SourcesDirectory)/build.ps1 -Publish -Signed
displayName: Publish
timeoutInMinutes: 10
-19
View File
@@ -1,19 +0,0 @@
name: PR-$(System.PullRequest.PullRequestNumber)-$(Date:yyyyMMdd)$(Rev:.rr)
trigger:
# Batch merge builds together while a merge build is running
batch: true
branches:
include:
- master
pr:
branches:
include:
- master
resources:
- repo: self
clean: true
jobs:
- template: templates/credscan.yml
-16
View File
@@ -1,16 +0,0 @@
steps:
- pwsh: |
Install-Module -Name "platyPS","Pester" -Force
displayName: Install dependencies
timeoutInMinutes: 10
- pwsh: |
Install-Module -Name "PSScriptAnalyzer" -RequiredVersion 1.18.0 -Force
displayName: Install PSScriptAnalyzer
timeoutInMinutes: 10
- pwsh: |
Install-Module -Name PSPackageProject -Force
displayName: Install PSPackageProject module
timeoutInMinutes: 10
- pwsh: |
$(Build.SourcesDirectory)/build.ps1 -Build
displayName: Build
-112
View File
@@ -1,112 +0,0 @@
parameters:
jobName: TestPkgWin
imageName: windows-2019
displayName: PowerShell Core on Windows
powershellExecutable: pwsh
jobs:
- job: ${{ parameters.jobName }}
pool:
vmImage: ${{ parameters.imageName }}
displayName: ${{ parameters.displayName }}
steps:
- ${{ parameters.powershellExecutable }}: |
if($IsMacOs)
{
brew update
brew cask install powershell-preview
sudo ln -s -f /usr/local/microsoft/powershell/7-preview/pwsh /usr/local/bin/pwsh
}
elseif($IsLinux)
{
sudo apt-get update
sudo apt-get install powershell-preview
sudo ln -s /opt/microsoft/powershell/7-preview/pwsh /usr/local/bin/pwsh
}
elseif($IsWindows)
{
Invoke-WebRequest -Uri https://raw.githubusercontent.com/PowerShell/PowerShell/master/tools/install-powershell.ps1 -outfile ./install-powershell.ps1
./install-powershell.ps1 -AddToPath -Preview -Destination C:\powershell-preview
$vstsCommandString = "vso[task.setvariable variable=PATH]C:\powershell-preview;$env:PATH"
Write-Host "sending " + $vstsCommandString
Write-Host "##$vstsCommandString"
}
displayName: Setup PowerShell preview
- ${{ parameters.powershellExecutable }}: |
$PSVersionTable
$vstsCommandString = "vso[task.setvariable variable=PSHOME]$pshome"
Write-Host "sending " + $vstsCommandString
Write-Host "##$vstsCommandString"
displayName: Capture PowerShellVersion
- ${{ parameters.powershellExecutable }}: |
dir env:PATH
displayName: Capture Path
- ${{ parameters.powershellExecutable }}: |
Get-PSRepository
displayName: Capture PSRepository
- ${{ parameters.powershellExecutable }}: |
Install-Module -Name "platyPS","Pester" -Force
displayName: Install dependencies
timeoutInMinutes: 10
- ${{ parameters.powershellExecutable }}: |
Install-Module -Name "PSScriptAnalyzer" -RequiredVersion 1.18.0 -Force
displayName: Install dependencies
timeoutInMinutes: 10
- ${{ parameters.powershellExecutable }}: |
Install-Module -Name PSPackageProject -Force
displayName: Install PSPackageProject module
- task: DownloadBuildArtifacts@0
displayName: 'Download artifacts'
inputs:
buildType: current
downloadType: specific
itemPattern: '**/*.nupkg'
downloadPath: '$(System.ArtifactsDirectory)'
- ${{ parameters.powershellExecutable }}: |
$sourceName = 'pspackageproject-local-repo'
Register-PSRepository -Name $sourceName -SourceLocation '$(System.ArtifactsDirectory)' -ErrorAction Ignore
$config = Get-PSPackageProjectConfiguration
$buildOutputPath = $config.BuildOutputPath
$null = New-Item -ItemType Directory -Path $buildOutputPath -Verbose
$moduleName = $config.ModuleName
Save-Module -Repository $sourceName -Name $moduleName -Path $config.BuildOutputPath
displayName: Extract product artifact
timeoutInMinutes: 10
- ${{ parameters.powershellExecutable }}: |
Invoke-PSPackageProjectTest -Type Functional
displayName: Execute functional tests - InvokeDscResource Disabled
errorActionPreference: continue
- ${{ parameters.powershellExecutable }}: |
$configFolder = split-path $PROFILE
$configPath = Join-Path $configFolder -ChildPath powershell.config.json
copy-Item $(Build.SourcesDirectory)/assets/powershell.config.json $configPath
displayName: Enable ExperimentalFeature
errorActionPreference: continue
- ${{ parameters.powershellExecutable }}: |
Invoke-PSPackageProjectTest -Type Functional
displayName: Execute functional tests - InvokeDscResource Enabled
errorActionPreference: continue
- ${{ parameters.powershellExecutable }}: |
Invoke-PSPackageProjectTest -Type StaticAnalysis
displayName: Execute static analysis tests
errorActionPreference: continue
condition: succeededOrFailed()
- ${{ parameters.powershellExecutable }}: |
Unregister-PSRepository -Name 'pspackageproject-local-repo' -ErrorAction Ignore
displayName: Unregister temporary PSRepository
condition: always()
timeoutInMinutes: 10
-31
View File
@@ -1,31 +0,0 @@
parameters:
pool: 'Hosted VS2017'
jobName: 'credscan'
displayName: Secret Scan
jobs:
- job: ${{ parameters.jobName }}
pool:
name: ${{ parameters.pool }}
displayName: ${{ parameters.displayName }}
steps:
- powershell: Write-Host "##vso[build.updatebuildnumber]$env:BUILD_SOURCEBRANCHNAME-$env:BUILD_SOURCEVERSION-$((get-date).ToString("yyyyMMddhhmmss"))"
displayName: Set Build Name for Non-PR
condition: ne(variables['Build.Reason'], 'PullRequest')
- task: securedevelopmentteam.vss-secure-development-tools.build-task-credscan.CredScan@2
displayName: 'Scan for secrets'
inputs:
debugMode: false
- task: securedevelopmentteam.vss-secure-development-tools.build-task-publishsecurityanalysislogs.PublishSecurityAnalysisLogs@2
displayName: 'Publish Secret Scan Logs to Build Artifacts'
continueOnError: true
- task: securedevelopmentteam.vss-secure-development-tools.build-task-postanalysis.PostAnalysis@1
displayName: 'Check for failures'
inputs:
CredScan: true
ToolLogsNotFoundAction: Error
-17
View File
@@ -1,17 +0,0 @@
steps:
- powershell: |
$shouldSign = $true
if($env:BUILD_REASON -ne 'Manual')
{
$shouldSign = $false
}
if($env:SKIP_SIGNING -eq 'Yes')
{
$shouldSign = $false
}
$vstsCommandString = "vso[task.setvariable variable=SHOULD_SIGN]$($shouldSign.ToString().ToLowerInvariant())"
Write-Host ("sending " + $vstsCommandString)
Write-Host "##$vstsCommandString"
displayName: 'Set SHOULD_SIGN Variable'
+3
View File
@@ -0,0 +1,3 @@
# Changelogs
* [v2 changelog](v2.md)
+28
View File
@@ -0,0 +1,28 @@
# v2 Changelog
## [v2.0.8]
- Fixed an issue with array parameters is key-value pairs (#128).
- ConvertTo-MOFInstance: Include resource properties with empty array value (#127)
## [v2.0.7]
### Main changes
- Fixed Invoke-DscResource error when a class-based resource module path contains a space.
[v2.0.7]: https://www.powershellgallery.com/packages/PSDesiredStateConfiguration/2.0.7
## [v2.0.6]
### Main changes
- Fixed `PathSeparator` bug in Get-DSCResourceModules.
- Changed `PSDesiredStateConfiguration.InvokeDscResource` from experimental to permanently enabled feature.
- Changed `ErrorAction` to `Ignore` so that the error doesn't show up in `$Error`.
- Removed duplicate result resources from `Get-DSCResourcesModules`.
- Add `ImplementationDetail` member to results only when the member does not already exist.
- Updated v2 Release pipeline with latest Compliance requirements.
- Added SBOM generation that is now released with v2 module.
[v2.0.6]: https://www.powershellgallery.com/packages/PSDesiredStateConfiguration/2.0.6
+21
View File
@@ -0,0 +1,21 @@
MIT License
Copyright (c) Microsoft Corporation.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE
-1
View File
@@ -1 +0,0 @@
{"ExperimentalFeatures":["PSCommandNotFoundSuggestion","PSForEachObjectParallel","PSImplicitRemotingBatching","Microsoft.PowerShell.Utility.PSDebugRunspaceWithBreakpoints","PSDesiredStateConfiguration.InvokeDscResource"]}
-19
View File
@@ -1,19 +0,0 @@
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
trigger:
- master
pool:
vmImage: 'ubuntu-latest'
steps:
- script: echo Hello, world!
displayName: 'Run a one-line script'
- script: |
echo Add other tasks to build, test, and deploy your project.
echo See https://aka.ms/yaml
displayName: 'Run a multi-line script'
+40 -57
View File
@@ -1,7 +1,6 @@
# Copyright (c) Microsoft Corporation. All rights reserved. # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License. # Licensed under the MIT License.
# Do NOT edit this file. Edit dobuild.ps1
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidUsingWriteHost", "")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidUsingWriteHost", "")]
param ( param (
[Parameter(ParameterSetName="build")] [Parameter(ParameterSetName="build")]
@@ -15,9 +14,6 @@ param (
[Parameter(ParameterSetName="publish")] [Parameter(ParameterSetName="publish")]
[switch] [switch]
$Publish, $Publish,
[Parameter(ParameterSetName="publish")]
[switch]
$Signed,
[Parameter(ParameterSetName="build")] [Parameter(ParameterSetName="build")]
[switch] [switch]
@@ -37,34 +33,15 @@ param (
$TestInvokeDscResource $TestInvokeDscResource
) )
$config = Get-PSPackageProjectConfiguration -ConfigPath $PSScriptRoot # Build configuration
$script:ModuleName = "PSDesiredStateConfiguration"
$script:ModuleName = $config.ModuleName $script:SrcPath = Join-Path (Join-Path $PSScriptRoot "src") $ModuleName
$script:SrcPath = $config.SourcePath $script:OutDirectory = Join-Path $PSScriptRoot "out"
$script:OutDirectory = $config.BuildOutputPath $script:Culture = "en-US"
$script:SignedDirectory = $config.SignedOutputPath $script:HelpPath = Join-Path $PSScriptRoot "help"
$script:TestPath = $config.TestPath
$script:ModuleRoot = $PSScriptRoot
$script:Culture = $config.Culture
$script:HelpPath = $config.HelpPath
if ($env:TF_BUILD) {
$vstsCommandString = "vso[task.setvariable variable=BUILD_OUTPUT_PATH]$OutDirectory"
Write-Host ("sending " + $vstsCommandString)
Write-Host "##$vstsCommandString"
$vstsCommandString = "vso[task.setvariable variable=SIGNED_OUTPUT_PATH]$SignedDirectory"
Write-Host ("sending " + $vstsCommandString)
Write-Host "##$vstsCommandString"
}
. $PSScriptRoot\dobuild.ps1 . $PSScriptRoot\dobuild.ps1
if ( ! ( Get-Module -ErrorAction SilentlyContinue PSPackageProject) ) {
Install-Module PSPackageProject
}
if ($Clean -and (Test-Path $OutDirectory)) if ($Clean -and (Test-Path $OutDirectory))
{ {
Remove-Item -Force -Recurse $OutDirectory -ErrorAction Stop -Verbose Remove-Item -Force -Recurse $OutDirectory -ErrorAction Stop -Verbose
@@ -81,42 +58,48 @@ else
if ($Build.IsPresent) if ($Build.IsPresent)
{ {
$sb = (Get-Item Function:DoBuild).ScriptBlock DoBuild
Invoke-PSPackageProjectBuild -BuildScript $sb -SkipPublish
} }
if ($Publish.IsPresent) if ($Publish.IsPresent)
{ {
Invoke-PSPackageProjectPublish -Signed:$Signed.IsPresent DoPackage
} }
if ( $TestInvokeDscResource.IsPresent ) { if ($Test.IsPresent) {
$backupName = $null Import-Module Pester -MinimumVersion 5.0.0
try { Import-Module $PSScriptRoot\out\PSDesiredStateConfiguration\PSDesiredStateConfiguration.psd1
$configFolder = split-path $PROFILE
$configPath = Join-Path $configFolder -ChildPath powershell.config.json
if(Test-Path ~/.config/powershell/powershell.config.json)
{
$backupName = Join-Path $configFolder -ChildPath "powershell.config-((Get-Date).ToString('yyyyMMddHHmm')).json"
Copy-Item $configPath $backupName -force
}
copy-Item $PSScriptRoot/assets/powershell.config.json $configPath $testPath = Join-Path $PSScriptRoot "test"
Invoke-PSPackageProjectTest -Type $TestType $config = [PesterConfiguration]::Default
} $config.Run.Path = $testPath
finally { $config.Run.Exit = $false
remove-item $configPath $config.TestResult.Enabled = $true
if($backupName) $config.TestResult.OutputPath = Join-Path $OutDirectory "testResults.xml"
{ $config.Output.Verbosity = "Detailed"
Copy-Item $backupName $configPath -force
}
}
}
if ( $Test.IsPresent ) { Write-Verbose -Verbose "Running tests from: $testPath"
Invoke-PSPackageProjectTest -Type $TestType $result = Invoke-Pester -Configuration $config
if ($result.FailedCount -gt 0) {
throw "$($result.FailedCount) test(s) failed"
}
} }
if ($UpdateHelp.IsPresent) { if ($UpdateHelp.IsPresent) {
Add-PSPackageProjectCmdletHelp -ProjectRoot $ModuleRoot -ModuleName $ModuleName -Culture $Culture # Build help using platyPS
$docsPath = Join-Path $PSScriptRoot "help"
$markdownDocsPath = Join-Path $docsPath "en-US"
$outputDocsPath = Join-Path $OutModule "en-US"
if (-not (Get-Module -ListAvailable platyPS)) {
Write-Verbose -Verbose "platyPS module not found, installing"
Install-Module -Force -Name platyPS -Scope CurrentUser
}
Import-Module platyPS -Verbose:$false
if (-not (Test-Path $outputDocsPath)) {
$null = New-Item -Type Directory -Path $outputDocsPath -Force
}
$null = New-ExternalHelp -Path $markdownDocsPath -OutputPath $outputDocsPath -Force
} }
+21 -42
View File
@@ -1,48 +1,27 @@
# Copyright (c) Microsoft Corporation. All rights reserved. # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. # Licensed under the MIT License.
#####################################################
# Do NOT edit anything outside the DoBuild function.
# You can define functions inside the scope of DoBuild.
#####################################################
<#
.DESCRIPTION
Implement build and packaging of the package and place the output $OutDirectory/$ModuleName
#>
function DoBuild function DoBuild
{ {
Write-Verbose -Verbose -Message "Starting DoBuild" Write-Verbose -Verbose -Message "Running DoBuild to layout module at: '${OutDirectory}/${ModuleName}'"
Copy-Item "${SrcPath}/*" "${OutDirectory}/${ModuleName}" -Recurse
Write-Verbose -Verbose -Message "Copying module files to '${OutDirectory}/${ModuleName}'" Copy-Item -Recurse "${HelpPath}/${Culture}" "${OutDirectory}/${ModuleName}"
# copy psm1 and psd1 files }
copy-item "${SrcPath}/*" "${OutDirectory}/${ModuleName}" -Recurse
# function DoPackage
{
# copy help try {
Write-Verbose -Verbose -Message "Copying help files to '${OutDirectory}/${ModuleName}'" $repoName = [guid]::NewGuid().ToString()
copy-item -Recurse "${HelpPath}/${Culture}" "${OutDirectory}/${ModuleName}" $modulePath = Join-Path $OutDirectory $ModuleName
$null = Register-PSRepository -Name $repoName -InstallationPolicy Trusted -SourceLocation $OutDirectory
if ( Test-Path "${SrcPath}/code" ) {
Write-Verbose -Verbose -Message "Building assembly and copying to '${OutDirectory}/${ModuleName}'" Write-Verbose -Verbose -Message "Publishing module from: '$modulePath'"
# build code and place it in the staging location Publish-Module -Path $modulePath -Repository $repoName
try {
Push-Location "${SrcPath}/code" $nupkgPath = (Get-ChildItem -Path $OutDirectory -Filter "$ModuleName*.nupkg" | Select-Object -First 1).FullName
$result = dotnet publish Write-Verbose -Verbose -Message "Created package: $nupkgPath"
copy-item "bin/Debug/netstandard2.0/publish/${ModuleName}.dll" "${OutDirectory}/${ModuleName}" }
} finally {
catch { Unregister-PSRepository -Name $repoName
$result | ForEach-Object { Write-Warning $_ } }
Write-Error "dotnet build failed"
}
finally {
Pop-Location
}
}
else {
Write-Verbose -Verbose -Message "No code to build in '${SrcPath}/code'"
}
## Add build and packaging here
Write-Verbose -Verbose -Message "Ending DoBuild"
} }
-17
View File
@@ -1,17 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata minClientVersion="3.4">
<id>PSDesiredStateConfiguration</id>
<version>2.0</version>
<title>PSDesiredStateConfiguration</title>
<authors>Microsoft</authors>
<owners>microsoft,powershell</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Provides pre-built PSDesiredStateConfiguration module for PowerShell.</description>
<summary></summary>
<copyright>© Microsoft Corporation. All rights reserved.</copyright>
<contentFiles>
<files include="**/*" buildAction="None" copyToOutput="true" flatten="false" />
</contentFiles>
</metadata>
</package>
-9
View File
@@ -1,9 +0,0 @@
{
"HelpPath": "help",
"ModuleName": "PSDesiredStateConfiguration",
"BuildOutputPath": "out",
"SignedOutputPath": "signed",
"SourcePath": "src/PSDesiredStateConfiguration",
"TestPath": "test",
"Culture": "en-US"
}
@@ -9,7 +9,7 @@
RootModule = 'PSDesiredStateConfiguration.psm1' RootModule = 'PSDesiredStateConfiguration.psm1'
# Version number of this module. # Version number of this module.
moduleVersion = '2.0.5' moduleVersion = '2.0.8'
# Supported PSEditions # Supported PSEditions
CompatiblePSEditions = @('Core') CompatiblePSEditions = @('Core')
@@ -100,13 +100,11 @@ HelpInfoURI = 'https://go.microsoft.com/fwlink/?linkid=2113535'
PrivateData = @{ PrivateData = @{
PSData = @{ PSData = @{
ExperimentalFeatures = @( Tags = @('PSDesiredStateConfiguration',
@{ 'Linux',
Name = 'PSDesiredStateConfiguration.InvokeDscResource' 'Mac',
Description = "Enables the Invoke-DscResource cmdlet and related features." 'Windows')
} ProjectUri = 'https://github.com/PowerShell/PSDesiredStateConfiguration'
)
}
} }
}
} }
@@ -66,13 +66,12 @@ data LocalizedData
ImportDscResourceWarningForInbuiltResource=The configuration '{0}' is loading one or more built-in resources without explicitly importing associated modules. Add Import-DscResource -ModuleName 'PSDesiredStateConfiguration' to your configuration to avoid this message. ImportDscResourceWarningForInbuiltResource=The configuration '{0}' is loading one or more built-in resources without explicitly importing associated modules. Add Import-DscResource -ModuleName 'PSDesiredStateConfiguration' to your configuration to avoid this message.
PasswordTooLong=An error occurred during encryption of a password in node '{0}'. Most likely the password entered is too long to be encrypted using the selected certificate. Please either use a shorter password or select a certificate with a larger key. PasswordTooLong=An error occurred during encryption of a password in node '{0}'. Most likely the password entered is too long to be encrypted using the selected certificate. Please either use a shorter password or select a certificate with a larger key.
PsDscRunAsCredentialNotSupport=The 'PsDscRunAsCredential' property is not currently support when using Invoke-DscResource. PsDscRunAsCredentialNotSupport=The 'PsDscRunAsCredential' property is not currently support when using Invoke-DscResource.
EmbeddedResourcesNotSupported=Embedded resources are not support on Linux or macOS. Please see https://aka.ms/PSCoreDSC for more details.
'@ '@
} }
Set-StrictMode -Off Set-StrictMode -Off
# In case localized resource is not available we revert back to English as defined in LocalizedData section so ignore the error instead of showing it to user. # In case localized resource is not available we revert back to English as defined in LocalizedData section so ignore the error instead of showing it to user.
Import-LocalizedData -BindingVariable LocalizedData -FileName PSDesiredStateConfiguration.Resource.psd1 -ErrorAction SilentlyContinue Import-LocalizedData -BindingVariable LocalizedData -FileName PSDesiredStateConfiguration.Resource.psd1 -ErrorAction Ignore
Import-Module $PSScriptRoot/helpers/DscResourceInfo.psm1 Import-Module $PSScriptRoot/helpers/DscResourceInfo.psm1
@@ -510,7 +509,7 @@ function ConvertTo-MOFInstance
$targetTypeName = $PropertyTypes[$p.Name].TypeConstraint $targetTypeName = $PropertyTypes[$p.Name].TypeConstraint
# see if the target type is an array # see if the target type is an array
$asArray = $p.Name -eq 'DependsOn' -or $targetTypeName -match 'Array' $asArray = $p.Name -eq 'DependsOn' -or $targetTypeName -match 'Array' -or ((-not [string]::IsNullOrEmpty($targetTypeName)) -and $targetTypeName.EndsWith('[]'))
# Convert the CIM typename to the appropriate .NET type to use # Convert the CIM typename to the appropriate .NET type to use
# to convert the input object into an appropriately encoded string # to convert the input object into an appropriately encoded string
@@ -672,10 +671,7 @@ function ConvertTo-MOFInstance
} }
else else
{ {
if ($targetTypeName -notmatch 'Array' -or $p.Value.Count) $p.Name + ' = ' + (stringify -value $p.Value -asArray $asArray -targetType $targetType ) + ";`n"
{
$p.Name + ' = ' + (stringify -value $p.Value -asArray $asArray -targetType $targetType ) + ";`n"
}
} }
} }
} }
@@ -1905,10 +1901,6 @@ function Configuration
return $moduleInfos return $moduleInfos
} }
if ( $IsMacOS -or $IsLinux ) {
Write-Warning -Message $LocalizedData.EmbeddedResourcesNotSupported
}
try try
{ {
Write-Debug -Message "BEGIN CONFIGURATION '$Name' PROCESSING: OutputPath: '$OutputPath'" Write-Debug -Message "BEGIN CONFIGURATION '$Name' PROCESSING: OutputPath: '$OutputPath'"
@@ -3684,7 +3676,7 @@ function New-DscChecksum
} }
# If the Force parameter was not specified and the hash file already exists for the current file, log this, and skip this file # If the Force parameter was not specified and the hash file already exists for the current file, log this, and skip this file
if (!$Force -and (Get-Item -Path $fileOutpath -ErrorAction SilentlyContinue)) if (!$Force -and (Get-Item -Path $fileOutpath -ErrorAction Ignore))
{ {
Write-Log -Message ($LocalizedData.CheckSumFileExists -f $fileOutpath) Write-Log -Message ($LocalizedData.CheckSumFileExists -f $fileOutpath)
continue continue
@@ -3842,7 +3834,7 @@ function ReadEnvironmentFile
function Get-DSCResourceModules function Get-DSCResourceModules
{ {
$listPSModuleFolders = $env:PSModulePath.Split(":") $listPSModuleFolders = $env:PSModulePath.Split([IO.Path]::PathSeparator)
$dscModuleFolderList = [System.Collections.Generic.HashSet[System.String]]::new() $dscModuleFolderList = [System.Collections.Generic.HashSet[System.String]]::new()
foreach ($folder in $listPSModuleFolders) foreach ($folder in $listPSModuleFolders)
@@ -4013,9 +4005,11 @@ function Get-DscResource
(!$_.IsReservedKeyword) -and ($null -ne $_.ResourceName) -and !(IsHiddenResource $_.ResourceName) -and (![bool]$Module -or ($_.ImplementingModule -like $ModuleString)) (!$_.IsReservedKeyword) -and ($null -ne $_.ResourceName) -and !(IsHiddenResource $_.ResourceName) -and (![bool]$Module -or ($_.ImplementingModule -like $ModuleString))
} }
$dscResourceNames = $keywords.keyword
$Resources += $keywords | $Resources += $keywords |
ForEach-Object -Process { ForEach-Object -Process {
GetResourceFromKeyword -keyword $_ -patterns $patterns -modules $modules GetResourceFromKeyword -keyword $_ -patterns $patterns -modules $modules -dscResourceNames $dscResourceNames
} | } |
Where-Object -FilterScript { Where-Object -FilterScript {
$_ -ne $null $_ -ne $null
@@ -4050,7 +4044,7 @@ function Get-DscResource
End End
{ {
$Resources = $Resources | Sort-Object -Property Module, Name $Resources = $Resources | Sort-Object -Property Module, Name -Unique
foreach ($resource in $Resources) foreach ($resource in $Resources)
{ {
# return formatted string if required # return formatted string if required
@@ -4088,9 +4082,11 @@ function GetResourceFromKeyword
$patterns, $patterns,
[Parameter(Mandatory)] [Parameter(Mandatory)]
[System.Management.Automation.PSModuleInfo[]] [System.Management.Automation.PSModuleInfo[]]
$modules $modules,
[Parameter(Mandatory)]
[Object[]]
$dscResourceNames
) )
$implementationDetail = 'ScriptBased' $implementationDetail = 'ScriptBased'
# Find whether $name follows the pattern # Find whether $name follows the pattern
@@ -4141,7 +4137,8 @@ function GetResourceFromKeyword
$schemaToProcess = $classesFromSchema | ForEach-Object -Process { $schemaToProcess = $classesFromSchema | ForEach-Object -Process {
if(($_.CimSystemProperties.ClassName -ieq $keyword.ResourceName) -and ($_.CimSuperClassName -ieq 'OMI_BaseResource')) if(($_.CimSystemProperties.ClassName -ieq $keyword.ResourceName) -and ($_.CimSuperClassName -ieq 'OMI_BaseResource'))
{ {
if ([ExperimentalFeature]::IsEnabled("PSDesiredStateConfiguration.InvokeDscResource")) $member = Get-Member -InputObject $_ -MemberType NoteProperty -Name 'ImplementationDetail'
if ($null -eq $member)
{ {
$_ | Add-Member -MemberType NoteProperty -Name 'ImplementationDetail' -Value $implementationDetail -PassThru $_ | Add-Member -MemberType NoteProperty -Name 'ImplementationDetail' -Value $implementationDetail -PassThru
} }
@@ -4199,7 +4196,7 @@ function GetResourceFromKeyword
# add properties # add properties
$keyword.Properties.Values | ForEach-Object -Process { $keyword.Properties.Values | ForEach-Object -Process {
AddDscResourceProperty $resource $_ AddDscResourceProperty $resource $_ $dscResourceNames
} }
# sort properties # sort properties
@@ -4211,10 +4208,8 @@ function GetResourceFromKeyword
Ascending = $true Ascending = $true
} }
$resource.UpdateProperties($updatedProperties) $resource.UpdateProperties($updatedProperties)
if ([ExperimentalFeature]::IsEnabled("PSDesiredStateConfiguration.InvokeDscResource"))
{ $resource | Add-Member -MemberType NoteProperty -Name 'ImplementationDetail' -Value $implementationDetail
$resource | Add-Member -MemberType NoteProperty -Name 'ImplementationDetail' -Value $implementationDetail
}
return $resource return $resource
} }
@@ -4291,7 +4286,9 @@ function AddDscResourceProperty
[Microsoft.PowerShell.DesiredStateConfiguration.DscResourceInfo] [Microsoft.PowerShell.DesiredStateConfiguration.DscResourceInfo]
$dscresource, $dscresource,
[Parameter(Mandatory)] [Parameter(Mandatory)]
$property $property,
[Parameter(Mandatory)]
$dscResourceNames
) )
$convertTypeMap = @{ $convertTypeMap = @{
@@ -4315,6 +4312,11 @@ function AddDscResourceProperty
else else
{ {
$Type = [System.Management.Automation.LanguagePrimitives]::ConvertTypeNameToPSTypeName($property.TypeConstraint) $Type = [System.Management.Automation.LanguagePrimitives]::ConvertTypeNameToPSTypeName($property.TypeConstraint)
if ([string]::IsNullOrEmpty($Type)) {
$dscResourceNames | ForEach-Object -Process {
if (($property.TypeConstraint -eq $_) -or ($property.TypeConstraint -eq ($_ + "[]"))) { $Type = "[$($property.TypeConstraint)]" }
}
}
} }
if ($null -ne $property.ValueMap) if ($null -ne $property.ValueMap)
@@ -4641,7 +4643,6 @@ Export-ModuleMember -Function Get-DscResource, Configuration
function Invoke-DscResource function Invoke-DscResource
{ {
[Experimental("PSDesiredStateConfiguration.InvokeDscResource", "Show")]
[CmdletBinding(HelpUri = '')] [CmdletBinding(HelpUri = '')]
param ( param (
[Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory)] [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory)]
@@ -4692,10 +4693,6 @@ function Invoke-DscResource
ThrowError -ExceptionName 'System.ArgumentException' -ExceptionMessage $errorMessage -ExceptionObject $exception -ErrorId 'InvalidResourceSpecification,Invoke-DscResource' -ErrorCategory InvalidArgument ThrowError -ExceptionName 'System.ArgumentException' -ExceptionMessage $errorMessage -ExceptionObject $exception -ErrorId 'InvalidResourceSpecification,Invoke-DscResource' -ErrorCategory InvalidArgument
} }
if ( @($resource.Properties | Where-Object { $_.PropertyType -eq '' }).Count -gt 0 -and ($IsMacOS -or $IsLinux)) {
Write-Warning -Message $LocalizedData.EmbeddedResourcesNotSupported
}
[Microsoft.PowerShell.DesiredStateConfiguration.DscResourceInfo] $resource = $resource[0] [Microsoft.PowerShell.DesiredStateConfiguration.DscResourceInfo] $resource = $resource[0]
if($resource.ImplementedAs -ne 'PowerShell') if($resource.ImplementedAs -ne 'PowerShell')
{ {
@@ -4749,7 +4746,7 @@ function Invoke-DscClassBasedResource
$iss = [System.Management.Automation.Runspaces.InitialSessionState]::CreateDefault2() $iss = [System.Management.Automation.Runspaces.InitialSessionState]::CreateDefault2()
$powershell = [PowerShell]::Create($iss) $powershell = [PowerShell]::Create($iss)
$script = @" $script = @"
using module $path using module "$path"
Write-Host -Message ([$type]::new | out-string) Write-Host -Message ([$type]::new | out-string)
return [$type]::new() return [$type]::new()
+67 -71
View File
@@ -1,40 +1,24 @@
# Copyright (c) Microsoft Corporation. All rights reserved. # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. # Licensed under the MIT License.
Function Install-ModuleIfMissing {
param(
[parameter(Mandatory)]
[String]
$Name,
[version]
$MinimumVersion,
[switch]
$SkipPublisherCheck,
[switch]
$Force
)
$module = Get-Module -Name $Name -ListAvailable -ErrorAction Ignore | Sort-Object -Property Version -Descending | Select-Object -First 1 BeforeDiscovery {
Function global:Test-IsInvokeDscResourceEnable {
if (!$module -or $module.Version -lt $MinimumVersion) { return ($PSVersionTable.PSVersion.Major -ge 7)
Write-Verbose "Installing module '$Name' ..." -Verbose
Install-Module -Name $Name -Force -SkipPublisherCheck:$SkipPublisherCheck.IsPresent
} }
} }
Function Test-IsInvokeDscResourceEnable { Describe "Test PSDesiredStateConfiguration" {
return [ExperimentalFeature]::IsEnabled("PSDesiredStateConfiguration.InvokeDscResource")
}
Describe "Test PSDesiredStateConfiguration" -tags CI {
Context "Module loading" { Context "Module loading" {
BeforeAll { BeforeAll {
Function BeCommand { Function BeCommand {
[CmdletBinding()] [CmdletBinding()]
Param( Param(
[object[]] $ActualValue, $ActualValue,
[string] $CommandName, [string] $CommandName,
[string] $ModuleName, [string] $ModuleName,
[switch]$Negate [switch]$Negate,
[string]$Because,
$CallerSessionState
) )
$failure = if ($Negate) { $failure = if ($Negate) {
@@ -82,7 +66,6 @@ Describe "Test PSDesiredStateConfiguration" -tags CI {
BeforeAll { BeforeAll {
$origProgress = $global:ProgressPreference $origProgress = $global:ProgressPreference
$global:ProgressPreference = 'SilentlyContinue' $global:ProgressPreference = 'SilentlyContinue'
Install-ModuleIfMissing -Name PSDscResources
$testCases = @( $testCases = @(
@{ @{
TestCaseName = 'case mismatch in resource name' TestCaseName = 'case mismatch in resource name'
@@ -113,7 +96,7 @@ Describe "Test PSDesiredStateConfiguration" -tags CI {
Set-ItResult -Pending -Because "Will only find script from PSDesiredStateConfiguration without modulename" Set-ItResult -Pending -Because "Will only find script from PSDesiredStateConfiguration without modulename"
} }
if ($IsLinux) { if (-not $IsWindows) {
Set-ItResult -Pending -Because "https://github.com/PowerShell/PSDesiredStateConfiguration/issues/26" Set-ItResult -Pending -Because "https://github.com/PowerShell/PSDesiredStateConfiguration/issues/26"
} }
@@ -132,7 +115,7 @@ Describe "Test PSDesiredStateConfiguration" -tags CI {
it "should be able to get <Name> from <ModuleName> - <TestCaseName>" -TestCases $testCases { it "should be able to get <Name> from <ModuleName> - <TestCaseName>" -TestCases $testCases {
param($Name, $ModuleName, $PendingBecause) param($Name, $ModuleName, $PendingBecause)
if ($IsLinux) { if (-not $IsWindows) {
Set-ItResult -Pending -Because "https://github.com/PowerShell/PSDesiredStateConfiguration/issues/26" Set-ItResult -Pending -Because "https://github.com/PowerShell/PSDesiredStateConfiguration/issues/26"
} }
@@ -157,10 +140,6 @@ Describe "Test PSDesiredStateConfiguration" -tags CI {
$origProgress = $global:ProgressPreference $origProgress = $global:ProgressPreference
$global:ProgressPreference = 'SilentlyContinue' $global:ProgressPreference = 'SilentlyContinue'
Install-ModuleIfMissing -Name PSDscResources -Force
# Install PowerShellGet only if PowerShellGet 2.2.1 or newer does not exist
Install-ModuleIfMissing -Name PowerShellGet -MinimumVersion '2.2.1'
$module = Get-Module PowerShellGet -ListAvailable | Sort-Object -Property Version -Descending | Select-Object -First 1 $module = Get-Module PowerShellGet -ListAvailable | Sort-Object -Property Version -Descending | Select-Object -First 1
$psGetModuleSpecification = @{ModuleName = $module.Name; ModuleVersion = $module.Version.ToString() } $psGetModuleSpecification = @{ModuleName = $module.Name; ModuleVersion = $module.Version.ToString() }
@@ -234,7 +213,7 @@ Describe "Test PSDesiredStateConfiguration" -tags CI {
it "should be able to get <Name> from <ModuleName> - <TestCaseName>" -TestCases $testCases { it "should be able to get <Name> from <ModuleName> - <TestCaseName>" -TestCases $testCases {
param($Name, $ModuleName, $PendingBecause) param($Name, $ModuleName, $PendingBecause)
if ($IsLinux) { if (-not $IsWindows) {
Set-ItResult -Pending -Because "https://github.com/PowerShell/PSDesiredStateConfiguration/issues/12 and https://github.com/PowerShell/PowerShellGet/pull/529" Set-ItResult -Pending -Because "https://github.com/PowerShell/PSDesiredStateConfiguration/issues/12 and https://github.com/PowerShell/PowerShellGet/pull/529"
} }
@@ -268,7 +247,6 @@ Describe "Test PSDesiredStateConfiguration" -tags CI {
BeforeAll { BeforeAll {
$origProgress = $global:ProgressPreference $origProgress = $global:ProgressPreference
$global:ProgressPreference = 'SilentlyContinue' $global:ProgressPreference = 'SilentlyContinue'
Install-ModuleIfMissing -Name XmlContentDsc -Force
$classTestCases = @( $classTestCases = @(
@{ @{
TestCaseName = 'Good case' TestCaseName = 'Good case'
@@ -335,11 +313,6 @@ Describe "Test PSDesiredStateConfiguration" -tags CI {
BeforeAll { BeforeAll {
$origProgress = $global:ProgressPreference $origProgress = $global:ProgressPreference
$global:ProgressPreference = 'SilentlyContinue' $global:ProgressPreference = 'SilentlyContinue'
$module = Get-InstalledModule -Name PsDscResources -ErrorAction Ignore
if ($module) {
Write-Verbose "removing PSDscResources, tests will re-install..." -Verbose
Uninstall-Module -Name PsDscResources -AllVersions -Force
}
} }
AfterAll { AfterAll {
@@ -367,26 +340,22 @@ Describe "Test PSDesiredStateConfiguration" -tags CI {
} }
) )
Install-ModuleIfMissing -Name PowerShellGet -Force -SkipPublisherCheck -MinimumVersion '2.2.1'
Install-ModuleIfMissing -Name xWebAdministration
$module = Get-Module PowerShellGet -ListAvailable | Sort-Object -Property Version -Descending | Select-Object -First 1 $module = Get-Module PowerShellGet -ListAvailable | Sort-Object -Property Version -Descending | Select-Object -First 1
$psGetModuleSpecification = @{ModuleName = $module.Name; ModuleVersion = $module.Version.ToString() } $psGetModuleSpecification = @{ModuleName = $module.Name; ModuleVersion = $module.Version.ToString() }
} }
it "Set method should work" -Skip:(!(Test-IsInvokeDscResourceEnable)) { it "Set method should work" -Skip:(!(Test-IsInvokeDscResourceEnable)) {
if (!$IsLinux) { if ($env:TF_BUILD -eq 'true') {
$result = Invoke-DscResource -Name PSModule -ModuleName $psGetModuleSpecification -Method set -Property @{ Set-ItResult -Skipped -Because "cannot install PSDscResources module during tests in Azure DevOps"
Name = 'PsDscResources'
InstallationPolicy = 'Trusted'
}
} }
else {
# workraound because of https://github.com/PowerShell/PowerShellGet/pull/529 $result = Invoke-DscResource -Name PSModule -ModuleName $psGetModuleSpecification -Method set -Property @{
Install-ModuleIfMissing -Name PsDscResources -Force Name = 'PSDscResources'
InstallationPolicy = 'Trusted'
} }
$result.RebootRequired | Should -BeFalse $result.RebootRequired | Should -BeFalse
$module = Get-module PsDscResources -ListAvailable $module = Get-module PSDscResources -ListAvailable
$module | Should -Not -BeNullOrEmpty -Because "Resource should have installed module" $module | Should -Not -BeNullOrEmpty -Because "Resource should have installed module"
} }
it 'Set method should return RebootRequired=<expectedResult> when $global:DSCMachineStatus = <value>' -Skip:(!(Test-IsInvokeDscResourceEnable)) -TestCases $dscMachineStatusCases { it 'Set method should return RebootRequired=<expectedResult> when $global:DSCMachineStatus = <value>' -Skip:(!(Test-IsInvokeDscResourceEnable)) -TestCases $dscMachineStatusCases {
@@ -403,18 +372,30 @@ Describe "Test PSDesiredStateConfiguration" -tags CI {
} }
it "Test method should return false" -Skip:(!(Test-IsInvokeDscResourceEnable)) { it "Test method should return false" -Skip:(!(Test-IsInvokeDscResourceEnable)) {
if ($env:TF_BUILD -eq 'true') {
Set-ItResult -Skipped -Because "cannot install PSDscResources module during tests in Azure DevOps"
}
$result = Invoke-DscResource -Name Script -ModuleName PSDscResources -Method Test -Property @{TestScript = { Write-Output 'test'; return $false }; GetScript = { return @{ } }; SetScript = { return } } $result = Invoke-DscResource -Name Script -ModuleName PSDscResources -Method Test -Property @{TestScript = { Write-Output 'test'; return $false }; GetScript = { return @{ } }; SetScript = { return } }
$result | Should -Not -BeNullOrEmpty $result | Should -Not -BeNullOrEmpty
$result.InDesiredState | Should -BeFalse -Because "Test method return false" $result.InDesiredState | Should -BeFalse -Because "Test method return false"
} }
it "Test method should return true" -Skip:(!(Test-IsInvokeDscResourceEnable)) { it "Test method should return true" -Skip:(!(Test-IsInvokeDscResourceEnable)) {
if ($env:TF_BUILD -eq 'true') {
Set-ItResult -Skipped -Because "cannot install PSDscResources module during tests in Azure DevOps"
}
$result = Invoke-DscResource -Name Script -ModuleName PSDscResources -Method Test -Property @{TestScript = { Write-Verbose 'test'; return $true }; GetScript = { return @{ } }; SetScript = { return } } $result = Invoke-DscResource -Name Script -ModuleName PSDscResources -Method Test -Property @{TestScript = { Write-Verbose 'test'; return $true }; GetScript = { return @{ } }; SetScript = { return } }
$result | Should -BeTrue -Because "Test method return true" $result | Should -BeTrue -Because "Test method return true"
} }
it "Test method should return true with moduleSpecification" -Skip:(!(Test-IsInvokeDscResourceEnable)) { it "Test method should return true with moduleSpecification" -Skip:(!(Test-IsInvokeDscResourceEnable)) {
$module = get-module PsDscResources -ListAvailable if ($env:TF_BUILD -eq 'true') {
Set-ItResult -Skipped -Because "cannot install PSDscResources module during tests in Azure DevOps"
}
$module = get-module PSDscResources -ListAvailable
$moduleSpecification = @{ModuleName = $module.Name; ModuleVersion = $module.Version.ToString() } $moduleSpecification = @{ModuleName = $module.Name; ModuleVersion = $module.Version.ToString() }
$result = Invoke-DscResource -Name Script -ModuleName $moduleSpecification -Method Test -Property @{TestScript = { Write-Verbose 'test'; return $true }; GetScript = { return @{ } }; SetScript = { return } } $result = Invoke-DscResource -Name Script -ModuleName $moduleSpecification -Method Test -Property @{TestScript = { Write-Verbose 'test'; return $true }; GetScript = { return @{ } }; SetScript = { return } }
$result | Should -BeTrue -Because "Test method return true" $result | Should -BeTrue -Because "Test method return true"
@@ -422,32 +403,48 @@ Describe "Test PSDesiredStateConfiguration" -tags CI {
it "Invalid moduleSpecification" -Skip:(!(Test-IsInvokeDscResourceEnable)) { it "Invalid moduleSpecification" -Skip:(!(Test-IsInvokeDscResourceEnable)) {
Set-ItResult -Pending -Because "https://github.com/PowerShell/PSDesiredStateConfiguration/issues/17" Set-ItResult -Pending -Because "https://github.com/PowerShell/PSDesiredStateConfiguration/issues/17"
$moduleSpecification = @{ModuleName = 'PsDscResources'; ModuleVersion = '99.99.99.993' } $moduleSpecification = @{ModuleName = 'PSDscResources'; ModuleVersion = '99.99.99.993' }
{ {
Invoke-DscResource -Name Script -ModuleName $moduleSpecification -Method Test -Property @{TestScript = { Write-Host 'test'; return $true }; GetScript = { return @{ } }; SetScript = { return } } -ErrorAction Stop Invoke-DscResource -Name Script -ModuleName $moduleSpecification -Method Test -Property @{TestScript = { Write-Host 'test'; return $true }; GetScript = { return @{ } }; SetScript = { return } } -ErrorAction Stop
} | } |
Should -Throw -ErrorId 'InvalidResourceSpecification,Invoke-DscResource' -ExpectedMessage 'Invalid Resource Name ''Script'' or module specification.' Should -Throw -ErrorId 'InvalidResourceSpecification,Invoke-DscResource' -ExpectedMessage 'Invalid Resource Name ''Script'' or module specification.'
} }
it "Resource with embedded resource not supported and a warning should be produced" { it "Test an embedded DSC resource" {
if (!(Test-IsInvokeDscResourceEnable)) { if (!(Test-IsInvokeDscResourceEnable)) {
Set-ItResult -Skipped -Because "Feature not enabled" Set-ItResult -Skipped -Because "Feature not enabled"
} }
if (!$IsMacOS) { if ($env:TF_BUILD -eq 'true') {
Set-ItResult -Skipped -Because "Not applicable on Windows and xWebAdministration resources don't load on linux" Set-ItResult -Skipped -Because "cannot install PSDscResources module during tests in Azure DevOps"
} }
try { $resourceName="TestRes"
Invoke-DscResource -Name xWebSite -ModuleName 'xWebAdministration' -Method Test -Property @{TestScript = 'foobar' } -ErrorAction Stop -WarningVariable warnings $moduleName="TestEmbeddedDSCResource"
} $embObj = @(New-Object -TypeName psobject -Property @{embclassprop="property1"})
catch{
#this will fail too, but that is nat what we are testing...
}
$warnings.Count | Should -Be 1 -because "There should be 1 warning on macOS and Linux" Install-Module -Name $moduleName -Force
$warnings[0] | Should -Match 'embedded resources.*not support'
$resource = Get-DscResource -Name $resourceName -Module $moduleName -ErrorAction Stop
$resource | Should -Not -BeNullOrEmpty
$resource.Name | Should -Be $resourceName
$methodName="Test"
$result = Invoke-DscResource -Name $resourceName -ModuleName $moduleName -Method $methodName -Property @{embclassobj=$embObj;propName="property1"}
$result.InDesiredState | Should -BeTrue
$result = Invoke-DscResource -Name $resourceName -ModuleName $moduleName -Method $methodName -Property @{embclassobj=$embObj;propName="property2"}
$result.InDesiredState | Should -BeFalse
$methodName="Get"
$result = Invoke-DscResource -Name $resourceName -ModuleName $moduleName -Method $methodName -Property @{embclassobj=$embObj;propName="property1"}
$result.propName | Should -Be "property1"
$result = Invoke-DscResource -Name $resourceName -ModuleName $moduleName -Method $methodName -Property @{embclassobj=$embObj;propName="property2"}
$result.propName | Should -Not -Be "property1"
$methodName="Set"
$result = Invoke-DscResource -Name $resourceName -ModuleName $moduleName -Method $methodName -Property @{embclassobj=$embObj;propName="property1"}
$result | Should -Not -BeNullOrEmpty
$result.RebootRequired | Should -BeFalse
} }
it "Using PsDscRunAsCredential should say not supported" -Skip:(!(Test-IsInvokeDscResourceEnable)) { it "Using PsDscRunAsCredential should say not supported" -Skip:(!(Test-IsInvokeDscResourceEnable)) {
@@ -478,17 +475,21 @@ Describe "Test PSDesiredStateConfiguration" -tags CI {
} }
it "Get method should work" -Skip:(!(Test-IsInvokeDscResourceEnable)) { it "Get method should work" -Skip:(!(Test-IsInvokeDscResourceEnable)) {
if ($IsLinux) { if ($env:TF_BUILD -eq 'true') {
Set-ItResult -Skipped -Because "cannot install PSDscResources module during tests in Azure DevOps"
}
if (-not $IsWindows) {
Set-ItResult -Pending -Because "https://github.com/PowerShell/PSDesiredStateConfiguration/issues/12 and https://github.com/PowerShell/PowerShellGet/pull/529" Set-ItResult -Pending -Because "https://github.com/PowerShell/PSDesiredStateConfiguration/issues/12 and https://github.com/PowerShell/PowerShellGet/pull/529"
} }
$result = Invoke-DscResource -Name PSModule -ModuleName $psGetModuleSpecification -Method Get -Property @{ Name = 'PsDscResources' } $result = Invoke-DscResource -Name PSModule -ModuleName $psGetModuleSpecification -Method Get -Property @{ Name = 'PSDscResources' }
$result | Should -Not -BeNullOrEmpty $result | Should -Not -BeNullOrEmpty
$result.Author | Should -BeLike 'Microsoft*' $result.Author | Should -BeLike 'Microsoft*'
$result.InstallationPolicy | Should -BeOfType [string] $result.InstallationPolicy | Should -BeOfType [string]
$result.Guid | Should -BeOfType [Guid] $result.Guid | Should -BeOfType [Guid]
$result.Ensure | Should -Be 'Present' $result.Ensure | Should -Be 'Present'
$result.Name | Should -be 'PsDscResources' $result.Name | Should -be 'PSDscResources'
$result.Description | Should -BeLike 'This*DSC*' $result.Description | Should -BeLike 'This*DSC*'
$result.InstalledVersion | should -BeOfType [Version] $result.InstalledVersion | should -BeOfType [Version]
$result.ModuleBase | Should -BeLike '*PSDscResources*' $result.ModuleBase | Should -BeLike '*PSDscResources*'
@@ -498,10 +499,6 @@ Describe "Test PSDesiredStateConfiguration" -tags CI {
} }
Context "Class Based Resources" { Context "Class Based Resources" {
BeforeAll {
Install-ModuleIfMissing -Name XmlContentDsc -Force
}
AfterAll { AfterAll {
$Global:ProgressPreference = $origProgress $Global:ProgressPreference = $origProgress
} }
@@ -533,4 +530,3 @@ Describe "Test PSDesiredStateConfiguration" -tags CI {
} }
} }
} }
+7 -7
View File
@@ -1,18 +1,18 @@
# Copyright (c) Microsoft Corporation. All rights reserved. # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. # Licensed under the MIT License.
Describe "DSC MOF Compilation" -tags "CI" { Describe "DSC MOF Compilation" {
BeforeAll { BeforeAll {
$module = Get-Module PowerShellGet -ListAvailable | Sort-Object -Property Version -Descending | Select-Object -First 1 $module = Get-Module PowerShellGet -ListAvailable | Sort-Object -Property Version -Descending | Select-Object -First 1
$psGetModuleVersion = $module.Version.ToString() $psGetModuleVersion = $module.Version.ToString()
if (!$env:DSC_HOME)
{
Import-Module PSDesiredStateConfiguration
}
} }
It "Should be able to compile a MOF using PSModule resource" { It "Should be able to compile a MOF using PSModule resource" {
if ($IsLinux) { if ($env:GITHUB_ACTIONS -eq 'true' -or $env:TF_BUILD -eq 'true') {
Set-ItResult -Skipped -Because "does not work in CI"
}
if (-not $IsWindows) {
Set-ItResult -Pending -Because "https://github.com/PowerShell/PowerShellGet/pull/529" Set-ItResult -Pending -Because "https://github.com/PowerShell/PowerShellGet/pull/529"
} }
@@ -24,7 +24,7 @@ Describe "DSC MOF Compilation" -tags "CI" {
Node "localhost" { Node "localhost" {
PSModule f1 PSModule f1
{ {
Name = 'PsDscResources' Name = 'PSDscResources'
InstallationPolicy = 'Trusted' InstallationPolicy = 'Trusted'
} }
} }
+36
View File
@@ -0,0 +1,36 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
param(
[ValidateSet("PSGallery", "CFS")]
[string]$PSRepository = "PSGallery"
)
if ($PSRepository -eq "CFS" -and -not (Get-PSResourceRepository -Name CFS -ErrorAction SilentlyContinue)) {
Register-PSResourceRepository -Name CFS -Uri "https://pkgs.dev.azure.com/powershell/PowerShell/_packaging/PowerShellGalleryMirror/nuget/v3/index.json"
}
# NOTE: Due to a bug in Install-PSResource with upstream feeds, we have to
# request an exact version. Otherwise, if a newer version is available in the
# upstream feed, it will fail to install any version at all.
Install-PSResource -Verbose -TrustRepository -RequiredResource @{
platyPS = @{
version = "0.14.2"
repository = $PSRepository
}
Pester = @{
version = "5.7.1"
repository = $PSRepository
}
PSDscResources = @{
version = "2.12.0.0"
repository = $PSRepository
}
XmlContentDsc = @{
version = "0.0.1"
repository = $PSRepository
}
xWebAdministration = @{
version = "3.3.0"
repository = $PSRepository
}
}
@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<SignConfigXML>
<job platform="" configuration="" dest="__OUTPATHROOT__" jobname="PSDesiredStateConfiguration Catalog" approvers="vigarg;gstolt">
<file src="__INPATHROOT__\PSDesiredStateConfiguration\PSDesiredStateConfiguration.cat" signType="AuthenticodeFormer" dest="__OUTPATHROOT__\PSDesiredStateConfiguration\PSDesiredStateConfiguration.cat" />
</job>
</SignConfigXML>
@@ -1,100 +0,0 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
param(
[Parameter(Mandatory)]
[string] $Path,
[string[]] $AuthenticodeDualFiles,
[string[]] $AuthenticodeFiles,
[string[]] $NuPkgFiles,
[string[]] $MacDeveloperFiles,
[string[]] $LinuxFiles,
[Parameter(Mandatory)]
[string] $rootPath
)
$resolvedRootPath = (Resolve-Path $rootPath).ProviderPath
if ((!$AuthenticodeDualFiles -or $AuthenticodeDualFiles.Count -eq 0) -and
(!$AuthenticodeFiles -or $AuthenticodeFiles.Count -eq 0) -and
(!$NuPkgFiles -or $NuPkgFiles.Count -eq 0) -and
(!$MacDeveloperFiles -or $MacDeveloperFiles.Count -eq 0) -and
(!$LinuxFiles -or $LinuxFiles.Count -eq 0))
{
throw "At least one file must be specified"
}
function New-Attribute
{
param(
[Parameter(Mandatory)]
[string]$Name,
[Parameter(Mandatory)]
[object]$Value,
[Parameter(Mandatory)]
[System.Xml.XmlElement]$Element
)
$attribute = $signingXml.CreateAttribute($Name)
$attribute.Value = $value
$null = $fileElement.Attributes.Append($attribute)
}
function New-FileElement
{
param(
[Parameter(Mandatory)]
[string]$File,
[Parameter(Mandatory)]
[string]$SignType,
[Parameter(Mandatory)]
[System.Xml.XmlDocument]$XmlDoc,
[Parameter(Mandatory)]
[System.Xml.XmlElement]$Job
)
if(Test-Path -Path $file)
{
$name = Split-Path -Leaf -Path $File
$fileElement = $XmlDoc.CreateElement("file")
$src = $file.replace($resolvedRootPath,'__INPATHROOT__\')
$dest = $file.replace($resolvedRootPath,'__OUTPATHROOT__\')
New-Attribute -Name 'src' -value $src -Element $fileElement
New-Attribute -Name 'signType' -value $SignType -Element $fileElement
New-Attribute -Name 'dest' -value $dest -Element $fileElement
$null = $job.AppendChild($fileElement)
}
else
{
Write-Warning -Message "Skipping $SignType; $File because it does not exist"
}
}
[xml]$signingXml = get-content (Join-Path -Path $PSScriptRoot -ChildPath 'packagesigning.xml')
$job = $signingXml.SignConfigXML.job
foreach($file in $AuthenticodeDualFiles)
{
New-FileElement -File $file -SignType 'AuthenticodeDual' -XmlDoc $signingXml -Job $job
}
foreach($file in $AuthenticodeFiles)
{
New-FileElement -File $file -SignType 'AuthenticodeFormer' -XmlDoc $signingXml -Job $job
}
foreach($file in $NuPkgFiles)
{
New-FileElement -File $file -SignType 'NuGet' -XmlDoc $signingXml -Job $job
}
foreach ($file in $MacDeveloperFiles) {
New-FileElement -File $file -SignType 'MacDeveloper' -XmlDoc $signingXml -Job $job
}
foreach ($file in $LinuxFiles) {
New-FileElement -File $file -SignType 'LinuxPack' -XmlDoc $signingXml -Job $job
}
$null = new-item -Path $path -ItemType file -Force
$savePath = (Resolve-Path $Path).ProviderPath
$signingXml.Save($savePath)
-6
View File
@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- template used by generatePackageSigning.ps1 -->
<SignConfigXML>
<job platform="" configuration="" dest="__OUTPATHROOT__\signed" jobname="PSDesiredStateConfiguration module" approvers="vigarg;gstolt">
</job>
</SignConfigXML>
-9
View File
@@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- template used by generatePackageSigning.ps1 -->
<SignConfigXML>
<job platform="" configuration="" dest="__OUTPATHROOT__\signed" jobname="PSDesiredStateConfiguration module" approvers="vigarg;gstolt">
<file src="__INPATHROOT__\PSDesiredStateConfiguration/helpers/DscResourceInfo.psm1" signType="AuthenticodeFormer" dest="__OUTPATHROOT__\PSDesiredStateConfiguration/helpers/DscResourceInfo.psm1" />
<file src="__INPATHROOT__\PSDesiredStateConfiguration/PSDesiredStateConfiguration.psd1" signType="AuthenticodeFormer" dest="__OUTPATHROOT__\PSDesiredStateConfiguration/PSDesiredStateConfiguration.psd1" />
<file src="__INPATHROOT__\PSDesiredStateConfiguration/PSDesiredStateConfiguration.psm1" signType="AuthenticodeFormer" dest="__OUTPATHROOT__\PSDesiredStateConfiguration/PSDesiredStateConfiguration.psm1" />
</job>
</SignConfigXML>
-379
View File
@@ -1,379 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<xmldata>
<PckFileTypes TotalTypes="35" TotalExts="198" UnsupportedFilesOnly="False">
<Type ID="0" Check="1">
<Name>Pure Text Files</Name>
<Extensions>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.txt</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.des</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.pwd</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.asm</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.cmd</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.ini</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.poc</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.pwt</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.hpj</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.sql</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.inf</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.log</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.def</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.url</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.bat</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.aspx</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.idl</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.sys</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.resources</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.strings</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.md</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.yml</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.yaml</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.spelling</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.gitignore</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.gitattributes</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.gitmodules</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.csv</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.tsv</Ext>
</Extensions>
</Type>
<Type ID="1" Check="1">
<Name>CodeFiles</Name>
<Extensions>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.frm</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.inc</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.cpp</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.cls</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.c</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.hpp</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.vbs</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.java</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.cs</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.cxx</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.h</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.jav</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.bas</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.hxx</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.js</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.pl</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.rc</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.vb</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.json</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.resjson</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.fs</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.fsi</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.fsx</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.m</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.psm1</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.config</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.ps1</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.psd1</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.cmake</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.sh</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.cshtml</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.plist</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.mof</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.mc</Ext>
</Extensions>
</Type>
<Type ID="2" Check="1">
<Name>XML Files</Name>
<Extensions>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.xml</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.hxa</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.hxk</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.hxl</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.xsl</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.hxc</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.hxt</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.hxm</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.resx</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.hxe</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.hxf</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.hxv</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.acctb</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.accfl</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.xaml</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.ttml</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.ddue</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.sln</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.props</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.ps1xml</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.csproj</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.xsd</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.svg</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.clixml</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.nuspec</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.cdxml</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.manifest</Ext>
</Extensions>
</Type>
<Type ID="3" Check="1">
<Name>Microsoft Word Documents</Name>
<Extensions>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.doc</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.dot</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.wiz</Ext>
</Extensions>
</Type>
<Type ID="4" Check="1">
<Name>Microsoft Access Database Compatible</Name>
<Extensions>
<Ext Check="0" UseCustomParser="0" DllPath="" ClassName="">.mdb</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.mda</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.mde</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.mpd</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.mdt</Ext>
</Extensions>
</Type>
<Type ID="5" Check="1">
<Name>Microsoft PowerPoint Presentation</Name>
<Extensions>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.ppt</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.pot</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.pps</Ext>
</Extensions>
</Type>
<Type ID="6" Check="1">
<Name>Microsoft Publisher Files</Name>
<Extensions>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.pub</Ext>
</Extensions>
</Type>
<Type ID="7" Check="1">
<Name>Microsoft Excel Workbooks</Name>
<Extensions>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.xls</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.xlt</Ext>
</Extensions>
</Type>
<Type ID="8" Check="1">
<Name>Pure Binary Files</Name>
<Extensions>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.com</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.bin</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.tlb</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.drv</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.fon</Ext>
<Ext Check="0" UseCustomParser="0" DllPath="" ClassName="">.blg</Ext>
<Ext Check="0" UseCustomParser="0" DllPath="" ClassName="">.gif</Ext>
<Ext Check="0" UseCustomParser="0" DllPath="" ClassName="">.png</Ext>
<Ext Check="0" UseCustomParser="0" DllPath="" ClassName="">.icns</Ext>
<Ext Check="0" UseCustomParser="0" DllPath="" ClassName="">.ico</Ext>
<Ext Check="0" UseCustomParser="0" DllPath="" ClassName="">.bmp</Ext>
<Ext Check="0" UseCustomParser="0" DllPath="" ClassName="">.pfx</Ext>
</Extensions>
</Type>
<Type ID="9" Check="1">
<Name>Localization resource databases</Name>
<Extensions>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.edb</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.lcl</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.xlf</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.xliff</Ext>
</Extensions>
</Type>
<Type ID="10" Check="1">
<Name>Microsoft Project Files</Name>
<Extensions>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.mpp</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.mpt</Ext>
</Extensions>
</Type>
<Type ID="11" Check="1">
<Name>Microsoft Visio Files</Name>
<Extensions>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.vsd</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.vdx</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.vss</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.vst</Ext>
</Extensions>
</Type>
<Type ID="12" Check="1">
<Name>Windows Installer databases</Name>
<Extensions>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.msi</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.msm</Ext>
</Extensions>
</Type>
<Type ID="13" Check="1">
<Name>Zip Files</Name>
<Extensions>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.zip</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.accdt</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.axtr</Ext>
</Extensions>
</Type>
<Type ID="14" Check="1">
<Name>Cabinet / MS Compression Files</Name>
<Extensions>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.cab</Ext>
</Extensions>
</Type>
<Type ID="15" Check="1">
<Name>Table driven IME lexicons</Name>
<Extensions>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.mb</Ext>
</Extensions>
</Type>
<Type ID="16" Check="1">
<Name>IME ( IMD ) Files</Name>
<Extensions>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.imd</Ext>
</Extensions>
</Type>
<Type ID="17" Check="1">
<Name>TrueType Font Files</Name>
<Extensions>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.ttf</Ext>
</Extensions>
</Type>
<Type ID="18" Check="1">
<Name>Microsoft Outlook Mail Files</Name>
<Extensions>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.msg</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.oft</Ext>
</Extensions>
</Type>
<Type ID="19" Check="1">
<Name>HTML Help 2.0 Files / InfoTech5.x Storage System Files</Name>
<Extensions>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.its</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.hxh</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.hxr</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.hxw</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.hxi</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.hxs</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.hxq</Ext>
</Extensions>
</Type>
<Type ID="20" Check="1">
<Name>Adobe Acrobat PDF Files</Name>
<Extensions>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.pdf</Ext>
</Extensions>
</Type>
<Type ID="21" Check="1">
<Name>HTML Files / Web Page</Name>
<Extensions>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.htm</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.dtd</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.hhk</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.htw</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.asp</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.htc</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.htx</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.html</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.hhc</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.css</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.stm</Ext>
</Extensions>
</Type>
<Type ID="22" Check="1">
<Name>Rich Text Files</Name>
<Extensions>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.rtf</Ext>
</Extensions>
</Type>
<Type ID="23" Check="1">
<Name>Windows 3.x Write Files</Name>
<Extensions>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.wri</Ext>
</Extensions>
</Type>
<Type ID="24" Check="1">
<Name>MHTML Files</Name>
<Extensions>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.eml</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.nws</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.mht</Ext>
</Extensions>
</Type>
<Type ID="25" Check="1">
<Name>Word 2007 Files</Name>
<Extensions>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.docx</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.docm</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.dotx</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.dotm</Ext>
</Extensions>
</Type>
<Type ID="26" Check="1">
<Name>Excel 2007 Files</Name>
<Extensions>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.xlsx</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.xlsm</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.xltx</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.xltm</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.xlsb</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.xlam</Ext>
</Extensions>
</Type>
<Type ID="27" Check="1">
<Name>Power Point 2007 Files</Name>
<Extensions>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.pptx</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.pptm</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.potx</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.potm</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.ppsx</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.ppsm</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.ppam</Ext>
</Extensions>
</Type>
<Type ID="28" Check="1">
<Name>Access 2007 Files</Name>
<Extensions>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.accdb</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.accde</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.accdr</Ext>
</Extensions>
</Type>
<Type ID="29" Check="1">
<Name>Win32/64-based executable (image) Files</Name>
<Extensions>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.exe</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.dll</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.ocx</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.scr</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.acm</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.rll</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.cpl</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.mui</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.ax</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.ime</Ext>
</Extensions>
</Type>
<Type ID="30" Check="1">
<Name>HTML Help 1.0 Files</Name>
<Extensions>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.chm</Ext>
</Extensions>
</Type>
<Type ID="31" Check="1">
<Name>LocStudio lsg</Name>
<Extensions>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.lsg</Ext>
</Extensions>
</Type>
<Type ID="32" Check="1">
<Name>Microsoft Office OneNote Files</Name>
<Extensions>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.one</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.onepkg</Ext>
</Extensions>
</Type>
<Type ID="33" Check="1">
<Name>Custom Parsers</Name>
<Extensions>
</Extensions>
</Type>
<Type ID="34" Check="1">
<Name>Visio 2011 Files</Name>
<Extensions>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.vstx</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.vsdx</Ext>
<Ext Check="1" UseCustomParser="0" DllPath="" ClassName="">.vssx</Ext>
</Extensions>
</Type>
</PckFileTypes>
</xmldata>
-7
View File
@@ -1,7 +0,0 @@
&$PSScriptRoot/build.ps1 -Build -Clean
Write-Verbose -Message "Updating signing.xml ..." -Verbose
$files = @(Get-ChildItem $PSScriptRoot/out/*.ps* -Recurse | Select-Object -ExpandProperty FullName)
&$PSScriptRoot/tools/releaseBuild/generatePackgeSigning.ps1 -AuthenticodeFiles $files -path $PSScriptRoot/tools/releaseBuild/signing.xml -rootPath $PSScriptRoot/out/
Write-Verbose -Message "Done ..." -Verbose
# Make sure the file ends with an empty line
Add-Content -value '' -Path $PSScriptRoot/tools/releaseBuild/signing.xml