DLM Automation 2

Publish-DlmDatabasePackage

Publish-DlmDatabasePackage

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

Syntax

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

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

Description

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

Parameters

-InputObject <RedGate.DLMAutomation.Compare.Domain.BuildArtifacts.IBuildArtifact>

An instance of a IBuildArtifact 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 Input true (ByValue)
Accept Wildcard Characters false

-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 Input false
Accept Wildcard Characters false

-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 Input false
Accept Wildcard Characters false

-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 Input false
Accept Wildcard Characters false

<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.Domain.BuildArtifacts.IBuildArtifact

    An instance of a IBuildArtifact 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:\Work\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 IBuildArtifact 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?