Skip to content

Commit ec168f6

Browse files
Copilotmazhelez
andcommitted
Fix custom delivery script parameters documentation
Co-authored-by: mazhelez <[email protected]>
1 parent 6f3cc17 commit ec168f6

File tree

1 file changed

+36
-4
lines changed

1 file changed

+36
-4
lines changed

Scenarios/DeliveryTargets.md

Lines changed: 36 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -247,15 +247,47 @@ Example custom delivery script:
247247
```powershell
248248
# .github/DeliverToCustomFeed.ps1
249249
Param(
250-
[string] $artifacts,
251-
[string] $deliveryTarget,
252-
[string] $deliveryContext
250+
[Parameter(Mandatory = $true)]
251+
[HashTable] $parameters
253252
)
254253
254+
# Extract parameters
255+
$project = $parameters.project
256+
$projectName = $parameters.projectName
257+
$type = $parameters.type
258+
$appsFolder = $parameters.appsFolder
259+
$testAppsFolder = $parameters.testAppsFolder
260+
$dependenciesFolder = $parameters.dependenciesFolder
261+
$appsFolders = $parameters.appsFolders
262+
$testAppsFolders = $parameters.testAppsFolders
263+
$dependenciesFolders = $parameters.dependenciesFolders
264+
255265
# Custom delivery logic here
256-
Write-Host "Delivering to custom feed: $deliveryTarget"
266+
Write-Host "Delivering project '$project' (type: $type) to custom feed"
267+
if ($appsFolder) {
268+
Write-Host "Apps folder: $appsFolder"
269+
# Process apps in $appsFolder
270+
}
257271
```
258272

273+
#### Supported Parameters
274+
275+
Your custom delivery script receives a hash table with the following parameters:
276+
277+
| Parameter | Type | Description |
278+
|-----------|------|-------------|
279+
| `project` | string | Project path (escaped for artifact naming) |
280+
| `projectName` | string | Project name (sanitized for use in paths) |
281+
| `type` | string | Delivery type: "CD" (Continuous Delivery) or "Release" |
282+
| `appsFolder` | string | Path to folder containing app files (.app) |
283+
| `testAppsFolder` | string | Path to folder containing test app files (if available) |
284+
| `dependenciesFolder` | string | Path to folder containing dependency files (if available) |
285+
| `appsFolders` | string[] | Array of paths to all apps folders from different build modes |
286+
| `testAppsFolders` | string[] | Array of paths to all test app folders from different build modes |
287+
| `dependenciesFolders` | string[] | Array of paths to all dependency folders from different build modes |
288+
289+
> **Note:** The folder parameters (`*Folder`) may be `$null` if no artifacts of that type were found. The plural versions (`*Folders`) contain arrays of all matching folders across different build modes.
290+
259291
### Branch-Specific Delivery
260292

261293
Configure different delivery targets for different branches:

0 commit comments

Comments
 (0)