SQL Change Automation 4

Publish-DatabaseBuildArtifact

Publishes a database build artifact to a NuGet feed or to DLM Dashboard.

Syntax

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

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

Description

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

Parameters

-InputObject <RedGate.Versioning.Automation.Compare.Domain.BuildArtifacts.IBuildArtifact>

An instance of a IBuildArtifact object to be published.

This object is produced by the New-DatabaseBuildArtifact and Import-DatabaseBuildArtifact 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 build artifact 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 build artifact 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.Versioning.Automation.Compare.Domain.BuildArtifacts.IBuildArtifact

    An instance of a IBuildArtifact object to be published.

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

Return values

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

  • None

Examples

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

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

This example shows how to use the Publish-DatabaseBuildArtifact cmdlet to publish a build artifact object produced by the New-DatabaseBuildArtifact cmdlet to a NuGet feed.

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

$buildArtifactPath = "c:\Work\buildArtifacts\MyDatabase.1.0.0.nupkg"
$buildArtifact = $buildArtifactPath | Import-DatabaseBuildArtifact
$buildArtifact | Publish-DatabaseBuildArtifact -NuGetFeedUrl http://localhost:4000/nuget/packages -NuGetApiKey ed6d7c98-9847-4599-b5a8-323f215b5c89

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

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

$scriptsFolder = "C:\Work\scripts"
$validatedProject = $scriptsFolder | Invoke-DatabaseBuild
$buildArtifact = $validatedProject | New-DatabaseBuildArtifact -PackageId MyDatabase -PackageVersion 1.0.0
$buildArtifact | Publish-DatabaseBuildArtifact -DlmDashboardUrl http://localhost:19528

This example shows how to use the Publish-DatabaseBuildArtifact cmdlet to publish a database build artifact object to DLM Dashboard.


Didn't find what you were looking for?