Skip to content

Commit ed7bc9f

Browse files
committed
Merge branch 'reference-doc-sshdconfig' of https://github.com/Gijsreyn/operation-methods into reference-doc-sshdconfig
2 parents 598a6fe + fa1b824 commit ed7bc9f

File tree

649 files changed

+76064
-2478
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

649 files changed

+76064
-2478
lines changed

.github/workflows/rust.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: Rust
22

33
on:
44
push:
5-
branches: [ "main", "release/v3.0.0", "release/v3.1" ]
5+
branches: [ "main", "release/*" ]
66
pull_request:
7-
branches: [ "main", "release/v3.0.0", "release/v3.1" ]
7+
branches: [ "main", "release/*" ]
88
paths-ignore:
99
- "docs/**"
1010
- "*.md"

.pipelines/DSC-Official.yml

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,10 @@ extends:
133133
variables:
134134
ob_outputDirectory: '$(Build.ArtifactStagingDirectory)'
135135
ob_sdl_tsa_configFile: '$(Build.SourcesDirectory)\DSC\.config\tsaoptions.json'
136-
ob_sdl_sbom_enabled: true
137-
ob_signing_setup_enabled: true
138-
ob_sdl_codeql_compiled_enabled: true
136+
ob_sdl_sbom_enabled: false
137+
ob_signing_setup_enabled: false
138+
ob_sdl_codeql_compiled_enabled: false
139+
ob_restore_phase: true
139140
pool:
140141
type: windows
141142
steps:
@@ -152,17 +153,39 @@ extends:
152153
Copy-Item "$(Pipeline.Workspace)/drop_BuildAndSign_BuildWin_x64/*.msix" ./bin/msix -Verbose
153154
Copy-Item "$(Pipeline.Workspace)/drop_BuildAndSign_BuildWin_arm64/*.msix" ./bin/msix -Verbose
154155
./build.ps1 -PackageType msixbundle
155-
Copy-Item ./bin/*.msixbundle "$(ob_outputDirectory)"
156+
Copy-Item "$(Build.SourcesDirectory)/DSC/bin/*.msixbundle" "$(ob_outputDirectory)"
156157
displayName: 'Create msixbundle'
157158
condition: succeeded()
159+
160+
- job: SignMsixBundle
161+
dependsOn: CreateMsixBundle
162+
variables:
163+
ob_outputDirectory: '$(Build.ArtifactStagingDirectory)'
164+
ob_sdl_sbom_enabled: false
165+
ob_signing_setup_enabled: true
166+
ob_sdl_codeql_compiled_enabled: false
167+
pool:
168+
type: windows
169+
steps:
170+
- task: DownloadPipelineArtifact@2
171+
inputs:
172+
buildType: 'current'
173+
artifact: drop_BuildAndSign_CreateMsixBundle
174+
itemPattern: |
175+
**/*.msixbundle
176+
targetPath: '$(Build.ArtifactStagingDirectory)/downloads'
177+
displayName: Download MsixBundle
158178
- task: onebranch.pipeline.signing@1
159179
displayName: Sign MsixBundle
160180
condition: succeeded()
161181
inputs:
162182
command: 'sign'
163-
signing_profile: $(MSIXProfile)
183+
signing_profile: 'Dynamic-WINMSAPP1ST'
164184
files_to_sign: '*.msixbundle'
165-
search_root: '$(ob_outputDirectory)'
185+
search_root: '$(Build.ArtifactStagingDirectory)/downloads'
186+
- pwsh: |
187+
Copy-Item "$(Build.ArtifactStagingDirectory)/downloads/*.msixbundle" "$(ob_outputDirectory)"
188+
displayName: 'Copy MsixBundle to output directory'
166189
167190
- job: BuildLinuxMusl
168191
dependsOn: SetPackageVersion

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ changes since the last release, see the [diff on GitHub][unreleased].
121121
- Added support for extensions to DSC. You can now use the `dsc extension list` command to
122122
enumerate available extensions. DSC now supports a single extension capability, `discover`, which
123123
returns JSON objects indicating where to find DSC resource manifests that aren't in the `PATH` or
124-
`DSC_PATH`, as with resources installed as Appx packages.
124+
`DSC_RESOURCE_PATH`, as with resources installed as Appx packages.
125125

126126
Now when DSC performs discovery, it recursively discovers extensions and resources on the system.
127127

@@ -135,7 +135,7 @@ changes since the last release, see the [diff on GitHub][unreleased].
135135
- [#760][#760]
136136
- [#762][#762]
137137

138-
- Addes support for passing parameters to the `dsc config` commands from stdin. You can pass
138+
- Adds support for passing parameters to the `dsc config` commands from stdin. You can pass
139139
_either_ the configuration document or parameters file contents to the command from stdin, but
140140
not both. This enables securely passing sensitive parameters to DSC without writing them to a
141141
file or defining them as an environment variable.

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Please read the rest of this document to ensure a smooth contribution process.
2929
You can contribute to documentation either in the `docs` folder of this repository
3030
or in the [PowerShell-Docs-DSC](https://github.com/MicrosoftDocs/PowerShell-Docs-DSC/) repository.
3131

32-
> [!INFO]
32+
> [!NOTE]
3333
> Documentation contributed to the `docs` folder in this repository is periodically synced to the [PowerShell-Docs-DSC](https://github.com/MicrosoftDocs/PowerShell-Docs-DSC/) repository.
3434
3535
### Contributing to documentation related to maintaining or contributing to the DSC project

build.ps1

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,13 @@ $filesForWindowsPackage = @(
6060
'RunCommandOnSet.dsc.resource.json',
6161
'RunCommandOnSet.exe',
6262
'sshdconfig.exe',
63-
'sshdconfig.dsc.resource.json',
63+
'sshd-windows.dsc.resource.json',
64+
'sshd_config.dsc.resource.json',
6465
'windowspowershell.dsc.resource.json',
6566
'wmi.dsc.resource.json',
6667
'wmi.resource.ps1',
68+
'wmiAdapter.psd1',
69+
'wmiAdapter.psm1',
6770
'windows_baseline.dsc.yaml',
6871
'windows_inventory.dsc.yaml'
6972
)
@@ -87,7 +90,7 @@ $filesForLinuxPackage = @(
8790
'RunCommandOnSet.dsc.resource.json',
8891
'runcommandonset',
8992
'sshdconfig',
90-
'sshdconfig.dsc.resource.json'
93+
'sshd_config.dsc.resource.json'
9194
)
9295

9396
$filesForMacPackage = @(
@@ -109,7 +112,7 @@ $filesForMacPackage = @(
109112
'RunCommandOnSet.dsc.resource.json',
110113
'runcommandonset',
111114
'sshdconfig',
112-
'sshdconfig.dsc.resource.json'
115+
'sshd_config.dsc.resource.json'
113116
)
114117

115118
# the list of files other than the binaries which need to be executable
@@ -172,6 +175,27 @@ if ($null -ne $packageType) {
172175
$BuildToolsPath = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC"
173176

174177
& $rustup default stable
178+
179+
## Test if Node is installed
180+
## Skipping upgrade as users may have a specific version they want to use
181+
if (!(Get-Command 'node' -ErrorAction Ignore)) {
182+
Write-Verbose -Verbose "Node.js not found, installing..."
183+
if (!$IsWindows) {
184+
if (Get-Command 'brew' -ErrorAction Ignore) {
185+
brew install node@24
186+
} else {
187+
Write-Warning "Homebrew not found, please install Node.js manually"
188+
}
189+
}
190+
else {
191+
if (Get-Command 'winget' -ErrorAction Ignore) {
192+
Write-Verbose -Verbose "Using winget to install Node.js"
193+
winget install OpenJS.NodeJS --accept-source-agreements --accept-package-agreements --source winget --silent
194+
} else {
195+
Write-Warning "winget not found, please install Node.js manually"
196+
}
197+
}
198+
}
175199
}
176200

177201
if (!$SkipBuild -and !$SkipLinkCheck -and $IsWindows -and !(Get-Command 'link.exe' -ErrorAction Ignore)) {

docs/reference/cli/config/export.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,18 @@ dsc config export [Options] --input <INPUT>
3131
cat <FILE> | dsc config export [Options] --file -
3232
```
3333

34+
### Configuration document from file with parameters from stdin
35+
36+
```sh
37+
cat <PARAMETERS_FILE> | dsc config --parameters-file - export [Options] --file <FILE>
38+
```
39+
40+
### Configuration document from option string with parameters from stdin
41+
42+
```sh
43+
cat <PARAMETERS_FILE> | dsc config --parameters-file - export [Options] --input <INPUT>
44+
```
45+
3446
## Description
3547

3648
The `export` subcommand generates a configuration document that includes every instance of a set of

docs/reference/cli/config/get.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,18 @@ dsc config get [Options] --input <INPUT>
3131
cat <FILE> | dsc config get [Options] --file -
3232
```
3333

34+
### Configuration document from file with parameters from stdin
35+
36+
```sh
37+
cat <PARAMETERS_FILE> | dsc config --parameters-file - get [Options] --file <FILE>
38+
```
39+
40+
### Configuration document from option string with parameters from stdin
41+
42+
```sh
43+
cat <PARAMETERS_FILE> | dsc config --parameters-file - get [Options] --input <INPUT>
44+
```
45+
3446
## Description
3547

3648
The `get` subcommand returns the actual state of the resource instances in a configuration

docs/reference/cli/config/index.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@ for that parameter.
7878

7979
This option is mutually exclusive with the `--parameters` option.
8080

81+
Starting with DSC version 3.1.0, you can pass the parameters data to a subcommand over stdin. When
82+
you do, you must pass the configuration document as an input string or the path to a file on the
83+
system. You can't pass both the parameters file and the configuration document to a command from
84+
stdin.
85+
8186
For more information about defining parameters in a configuration document, see
8287
[DSC Configuration document parameter schema][06]. For more information about using parameters in
8388
configuration document, see the [parameters function reference][07].

docs/reference/cli/config/set.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,19 @@ dsc config set [Options] --input <INPUT>
3131
cat <FILE> | dsc config set [Options] --file -
3232
```
3333

34+
### Configuration document from file with parameters from stdin
35+
36+
```sh
37+
cat <PARAMETERS_FILE> | dsc config --parameters-file - set [Options] --file <FILE>
38+
```
39+
40+
### Configuration document from option string with parameters from stdin
41+
42+
```sh
43+
cat <PARAMETERS_FILE> | dsc config --parameters-file - set [Options] --input <INPUT>
44+
```
45+
46+
3447
## Description
3548

3649
The `set` subcommand enforces the desired state of the resource instances in a configuration

docs/reference/cli/config/test.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,18 @@ dsc config test [Options] --input <INPUT>
3131
cat <FILE> | dsc config test [Options] --file -
3232
```
3333

34+
### Configuration document from file with parameters from stdin
35+
36+
```sh
37+
cat <PARAMETERS_FILE> | dsc config --parameters-file - test [Options] --file <FILE>
38+
```
39+
40+
### Configuration document from option string with parameters from stdin
41+
42+
```sh
43+
cat <PARAMETERS_FILE> | dsc config --parameters-file - test [Options] --input <INPUT>
44+
```
45+
3446
## Description
3547

3648
The `test` subcommand verifies whether the resource instances in a configuration document are in

0 commit comments

Comments
 (0)