DLM Automation

Publish-DlmDatabasePackage

Publish-DlmDatabasePackage

Publishes a database package to a NuGet feed or to DLM Dashboard.

Syntax

Publish-DlmDatabasePackage [-InputObject] <DatabasePackage> -NuGetFeedUrl <string> [-NuGetApiKey <string>] [<CommonParameters>]

Publish-DlmDatabasePackage [-InputObject] <DatabasePackage> -DlmDashboardUrl <string> [<CommonParameters>]

Description

The Publish-DlmDatabasePackage cmdlet publishes a DatabasePackage object produced by the New-DlmDatabasePackage cmdlet to a specified NuGet feed or to DLM Dashboard.

Parameters

-InputObject <RedGate.DLMAutomation.Compare.Packaging.DatabasePackage>

An instance of a DatabasePackage object to be published.

This object is produced by the New-DlmDatabasePackage and Import-DlmDatabasePackage cmdlets.

Aliases None
Required?true
Position?0
Default Value None
Accept Pipeline Inputtrue (ByValue)
Accept Wildcard Charactersfalse

-NuGetFeedUrl <System.String>

The NuGet feed that the database package will be published to.

This must be valid URL for a NuGet feed.

You can't use this parameter in addition to the DlmDashboardUrl parameter.

Aliases None
Required?true
Position?named
Default Value None
Accept Pipeline Inputfalse
Accept Wildcard Charactersfalse

-NuGetApiKey <System.String>

The API key for the NuGet server.

You can't use this parameter in addition to the DlmDashboardUrl parameter.

Aliases None
Required?false
Position?named
Default Value None
Accept Pipeline Inputfalse
Accept Wildcard Charactersfalse

-DlmDashboardUrl <System.String>

The URL, including port number, to the instance of DLM Dashboard that the database package will be published to.

You can't use this parameter in addition to the NuGetFeedUrl and NuGetApiKey parameters.

Aliases None
Required?true
Position?named
Default Value None
Accept Pipeline Inputfalse
Accept Wildcard Charactersfalse

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see http://technet.microsoft.com/en-us/library/hh847884.aspx.

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • RedGate.DLMAutomation.Compare.Packaging.DatabasePackage

    An instance of a DatabasePackage object to be published.

    This object is produced by the New-DlmDatabasePackage and Import-DlmDatabasePackage cmdlets.

Return values

The output type is the type of the objects that the cmdlet emits.

  • None

Examples

---------- EXAMPLE 1 ----------

$scriptsFolder = "C:\Work\scripts"
$validatedSchema = $scriptsFolder | Invoke-DlmDatabaseSchemaValidation
$databasePackage = $validatedSchema | New-DlmDatabasePackage -PackageId MyDatabase -PackageVersion 1.0.0
$databasePackage | Publish-DlmDatabasePackage -NuGetFeedUrl http://localhost:4000/nuget/packages -NuGetApiKey ed6d7c98-9847-4599-b5a8-323f215b5c89

This example shows how to use the Publish-DlmDatabasePackage cmdlet to publish a database package object produced by the New-DlmDatabasePackage cmdlet to a NuGet feed.

---------- EXAMPLE 2 ----------

$databasePackagePath = "c:\packages\MyDatabase.1.0.0.nupkg"
$databasePackage = $databasePackagePath | Import-DlmDatabasePackage
$databasePackage | Publish-DlmDatabasePackage -NuGetFeedUrl http://localhost:4000/nuget/packages -NuGetApiKey ed6d7c98-9847-4599-b5a8-323f215b5c89

This example shows how to publish a database package file to a NuGet feed. The Import-DlmDatabasePackage cmdlet creates an instance of a DatabasePackage object, which is then used as the input for the Publish-DlmDatabasePackage cmdlet.

---------- EXAMPLE 3 ----------

$scriptsFolder = "C:\Work\scripts"
$validatedSchema = $scriptsFolder | Invoke-DlmDatabaseSchemaValidation
$databasePackage = $validatedSchema | New-DlmDatabasePackage -PackageId MyDatabase -PackageVersion 1.0.0
$databasePackage | Publish-DlmDatabasePackage -DlmDashboardUrl http://localhost:19528

This example shows how to use the Publish-DlmDatabasePackage cmdlet to publish a database package object to DLM Dashboard.


Didn't find what you were looking for?