C# Class Kudu.Core.Deployment.DeploymentManager

Inheritance: IDeploymentManager
Mostra file Open project: projectkudu/kudu Class Usage Examples

Public Properties

Property Type Description
DeploymentScriptFileName string

Private Properties

Property Type Description
Build System.Threading.Tasks.Task
CleanBuild void
EnumerateResults IEnumerable
FailDeployment void
FinishDeployment void
GenerateTemporaryId string
GetActiveDeploymentManifestPath string
GetDeploymentManifestPath string
GetLogPath string
GetLoggerForFile IDetailedLogger
GetOrCreateStatusFile IDeploymentStatusFile
GetOutputPath string
GetPurgeFailedDeployments IEnumerable
GetPurgeObsoleteDeployments IEnumerable
GetPurgeTemporaryDeployments IEnumerable
GetResult DeployResult
GetRoot string
IsActive bool
MarkStatusComplete void
PreDeployment void
PurgeAndGetDeployments IEnumerable
PurgeDeployments IEnumerable
TrimId string
TryGetVsProjectId string
TryTouchWebConfig void
VerifyDeployment IDeploymentStatusFile

Public Methods

Method Description
CreateTemporaryChangeSet ( string authorName = null, string authorEmail = null, string message = null ) : ChangeSet
CreateTemporaryDeployment ( string statusText, ChangeSet &tempChangeSet, ChangeSet changeSet = null, string deployedBy = null ) : IDisposable
Delete ( string id ) : void
DeployAsync ( IRepository repository, ChangeSet changeSet, string deployer, bool clean, bool needFileUpdate = true ) : Task
DeploymentManager ( ISiteBuilderFactory builderFactory, IEnvironment environment, ITraceFactory traceFactory, IAnalytics analytics, IDeploymentSettingsManager settings, IDeploymentStatusManager status, IOperationLock deploymentLock, ILogger globalLogger, IWebHooksManager hooksManager, IFunctionManager functionManager ) : System
GetCachedDeploymentScriptPath ( IEnvironment environment ) : string
GetDeploymentScriptContent ( ) : string

Prepare a directory with the deployment script and .deployment file.

GetLogEntries ( string id ) : IEnumerable
GetLogEntryDetails ( string id, string entryId ) : IEnumerable
GetLogger ( string id ) : ILogger
GetResult ( string id ) : DeployResult
GetResults ( ) : IEnumerable

Private Methods

Method Description
Build ( Kudu.Core.SourceControl.ChangeSet changeSet, ITracer tracer, IDisposable deployStep, IFileFinder fileFinder, DeploymentAnalytics deploymentAnalytics ) : System.Threading.Tasks.Task

Builds and deploys a particular changeset. Puts all build artifacts in a deployments/{id}

CleanBuild ( ITracer tracer, string buildTempPath ) : void
EnumerateResults ( ) : IEnumerable
FailDeployment ( ITracer tracer, IDisposable deployStep, DeploymentAnalytics deploymentAnalytics, Exception ex ) : void
FinishDeployment ( string id, IDisposable deployStep ) : void

Runs post deployment steps. - Marks the active deployment - Sets the complete flag

GenerateTemporaryId ( int lenght = 8 ) : string
GetActiveDeploymentManifestPath ( ) : string
GetDeploymentManifestPath ( string id ) : string
GetLogPath ( string id, bool ensureDirectory = true ) : string

This function handles getting the path for the log file. If 'log.xml' exists then use that which will use XmlLogger, this is to support existing log files else use 'log.log' which will use TextLogger. Moving forward deployment will always use text logger. The logic to get the right logger is in GetLoggerForFile()

GetLoggerForFile ( string logPath ) : IDetailedLogger

use XmlLogger if the file ends with .xml Otherwise use StructuredTextLogger

GetOrCreateStatusFile ( ChangeSet changeSet, ITracer tracer, string deployer ) : IDeploymentStatusFile
GetOutputPath ( IEnvironment environment, IDeploymentSettingsManager perDeploymentSettings ) : string
GetPurgeFailedDeployments ( IEnumerable results ) : IEnumerable
GetPurgeObsoleteDeployments ( IEnumerable results ) : IEnumerable
GetPurgeTemporaryDeployments ( IEnumerable results ) : IEnumerable
GetResult ( string id, string activeDeploymentId, bool isDeploying ) : DeployResult
GetRoot ( string id, bool ensureDirectory = true ) : string
IsActive ( string id ) : bool
MarkStatusComplete ( IDeploymentStatusFile status, bool success ) : void
PreDeployment ( ITracer tracer ) : void
PurgeAndGetDeployments ( ) : IEnumerable
PurgeDeployments ( IEnumerable results ) : IEnumerable
TrimId ( string id ) : string
TryGetVsProjectId ( DeploymentContext context ) : string
TryTouchWebConfig ( DeploymentContext context ) : void
VerifyDeployment ( string id, bool isDeploying ) : IDeploymentStatusFile

Ensure the deployment is in a valid state.

Method Details

CreateTemporaryChangeSet() public static method

public static CreateTemporaryChangeSet ( string authorName = null, string authorEmail = null, string message = null ) : ChangeSet
authorName string
authorEmail string
message string
return ChangeSet

CreateTemporaryDeployment() public method

public CreateTemporaryDeployment ( string statusText, ChangeSet &tempChangeSet, ChangeSet changeSet = null, string deployedBy = null ) : IDisposable
statusText string
tempChangeSet ChangeSet
changeSet ChangeSet
deployedBy string
return IDisposable

Delete() public method

public Delete ( string id ) : void
id string
return void

DeployAsync() public method

public DeployAsync ( IRepository repository, ChangeSet changeSet, string deployer, bool clean, bool needFileUpdate = true ) : Task
repository IRepository
changeSet ChangeSet
deployer string
clean bool
needFileUpdate bool
return Task

DeploymentManager() public method

public DeploymentManager ( ISiteBuilderFactory builderFactory, IEnvironment environment, ITraceFactory traceFactory, IAnalytics analytics, IDeploymentSettingsManager settings, IDeploymentStatusManager status, IOperationLock deploymentLock, ILogger globalLogger, IWebHooksManager hooksManager, IFunctionManager functionManager ) : System
builderFactory ISiteBuilderFactory
environment IEnvironment
traceFactory ITraceFactory
analytics IAnalytics
settings IDeploymentSettingsManager
status IDeploymentStatusManager
deploymentLock IOperationLock
globalLogger ILogger
hooksManager IWebHooksManager
functionManager IFunctionManager
return System

GetCachedDeploymentScriptPath() public static method

public static GetCachedDeploymentScriptPath ( IEnvironment environment ) : string
environment IEnvironment
return string

GetDeploymentScriptContent() public method

Prepare a directory with the deployment script and .deployment file.
public GetDeploymentScriptContent ( ) : string
return string

GetLogEntries() public method

public GetLogEntries ( string id ) : IEnumerable
id string
return IEnumerable

GetLogEntryDetails() public method

public GetLogEntryDetails ( string id, string entryId ) : IEnumerable
id string
entryId string
return IEnumerable

GetLogger() public method

public GetLogger ( string id ) : ILogger
id string
return ILogger

GetResult() public method

public GetResult ( string id ) : DeployResult
id string
return DeployResult

GetResults() public method

public GetResults ( ) : IEnumerable
return IEnumerable

Property Details

DeploymentScriptFileName public_oe static_oe property

public static string DeploymentScriptFileName
return string