Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions public/Publish-AdfV2FromJson.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,6 @@ function Publish-AdfV2FromJson {
$targetAdf = Get-AzDataFactoryV2 -ResourceGroupName "$ResourceGroupName" -Name "$DataFactoryName" -ErrorAction:Ignore
if ($targetAdf) {
Write-Host "Azure Data Factory exists."
if ($opt.IncrementalDeployment -and !$DryRun.IsPresent) {
Write-Host "Loading Deployment State from Storage..."
$ds = Get-StateFromStorage -DataFactoryName $DataFactoryName -LocationUri $opt.IncrementalDeploymentStorageUri
}
}
else {
$msg = "Azure Data Factory instance does not exist."
Expand All @@ -175,13 +171,19 @@ function Publish-AdfV2FromJson {

if ($null -eq $targetAdf) {
Write-Host "ADFT0032: The process is exiting the function. Do fix the issue and run again."
return
return
}
}
else {
Write-Host "DRY RUN: Skipping ADF existence verification..."
}

# Load deployment state from storage for incremental deployment (needed for both DryRun and actual deployment)
if ($opt.IncrementalDeployment) {
Write-Host "Loading Deployment State from Storage..."
$ds = Get-StateFromStorage -DataFactoryName $DataFactoryName -LocationUri $opt.IncrementalDeploymentStorageUri
}

Write-Host "===================================================================================";
Write-Host "STEP: Reading Azure Data Factory from JSON files..."
$adf = Import-AdfFromFolder -FactoryName $DataFactoryName -RootFolder "$RootFolder"
Expand Down