Invoke D365AzureDevOpsNugetPush - FH-Inway/d365fo.tools GitHub Wiki
Push a package / nuget to Azure DevOps
Invoke-D365AzureDevOpsNugetPush [[-Path] <String>] [[-Source] <String>] [[-LogPath] <String>]
[-ShowOriginalProgress] [-OutputCommandOnly] [-EnableException] [<CommonParameters>]
Push a package / nuget to an Azure DevOps feed
Invoke-D365AzureDevOpsNugetPush -Path "c:\temp\d365fo.tools\microsoft.dynamics.ax.application.devalm.buildxpp.10.0.605.10014.nupkg" -Source "Contoso"
This will push the package / nuget to the Azure DevOps feed. The file that will be pushed / uploaded is identified by the Path "c:\temp\d365fo.tools\microsoft.dynamics.ax.application.devalm.buildxpp.10.0.605.10014.nupkg". The request will be going to the Azure DevOps instance that is registered with the Source (Name) "Contoso" via the nuget.exe tool.
Path to the package / nuget that you want to push to the Azure DevOps feed
Type: String
Parameter Sets: (All)
Aliases: PackagePath
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The logical name for the nuget source / connection that you want to use while pushing the package / nuget
This requires you to register the nuget source, by hand, using the nuget.exe tool directly
Base command to use: .\nuget sources add -Name "D365FO" -Source "https://pkgs.dev.azure.com/Contoso/DynamicsFnO/_packaging/D365Packages/NuGet/v3/index.json" -username "[email protected]" -password "uVWw43FLzaWk9H2EDguXMVYD3DaWj3aHBL6bfZkc21cmkwoK8X78"
Please note that the password is in fact a personal access token and NOT your real password
The value specified for Name in the nuget sources command, is the value to supply for Source for this cmdlet
Type: String
Parameter Sets: (All)
Aliases: NugetSource, Destination
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The path where the log file(s) will be saved
When running without the ShowOriginalProgress parameter, the log files will be the standard output and the error output from the underlying tool executed
Type: String
Parameter Sets: (All)
Aliases: LogDir
Required: False
Position: 3
Default value: $(Join-Path -Path $Script:DefaultTempPath -ChildPath "Logs\Nuget")
Accept pipeline input: False
Accept wildcard characters: False
Instruct the cmdlet to show the standard output in the console
Default is $false which will silence the standard output
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
Instruct the cmdlet to only output the command that you would have to execute by hand
Will include full path to the executable and the needed parameters based on your selection
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
This parameters disables user-friendly warnings and enables the throwing of exceptions This is less user friendly, but allows catching exceptions in calling scripts
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Author: Mötz Jensen (@Splaxi)