Skip to content
This repository has been archived by the owner on Jun 30, 2022. It is now read-only.

VA/Skill - Update azure deployment technique to address server side compile issues on deployment #1668

Merged
merged 1 commit into from
Jun 26, 2019
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,24 @@ if (Test-Path $zipPath) {
Remove-Item $zipPath -Force | Out-Null
}

# Compress source code
Get-ChildItem -Path "$($projFolder)" | Compress-Archive -DestinationPath "$($zipPath)" -Force | Out-Null

# Publish zip to Azure
Write-Host "> Publishing to Azure ..."
(az webapp deployment source config-zip `
--resource-group $resourceGroup `
--name $name `
--src $zipPath) 2>> $logFile | Out-Null
# Perform dotnet publish step ahead of zipping up
$publishFolder = $(Join-Path $projFolder 'bin\Release\netcoreapp2.2')
dotnet publish -c release -o $publishFolder -v q > $logFile

if($?)
{
# Compress source code
Get-ChildItem -Path "$($publishFolder)" | Compress-Archive -DestinationPath "$($zipPath)" -Force | Out-Null

# Publish zip to Azure
Write-Host "> Publishing to Azure ..." -ForegroundColor Green
(az webapp deployment source config-zip `
--resource-group $resourceGroup `
--name $name `
--src $zipPath) 2>> $logFile | Out-Null
}
else
{
Write-Host "! Could not deploy automatically to Azure. Review the log for more information." -ForegroundColor DarkRed
Write-Host "! Log: $($logFile)" -ForegroundColor DarkRed
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,24 @@ if (Test-Path $zipPath) {
Remove-Item $zipPath -Force | Out-Null
}

# Compress source code
Get-ChildItem -Path "$($projFolder)" | Compress-Archive -DestinationPath "$($zipPath)" -Force | Out-Null

# Publish zip to Azure
Write-Host "> Publishing to Azure ..."
(az webapp deployment source config-zip `
--resource-group $resourceGroup `
--name $name `
--src $zipPath) 2>> $logFile | Out-Null
# Perform dotnet publish step ahead of zipping up
$publishFolder = $(Join-Path $projFolder 'bin\Release\netcoreapp2.2')
dotnet publish -c release -o $publishFolder -v q > $logFile

if($?)
{
# Compress source code
Get-ChildItem -Path "$($publishFolder)" | Compress-Archive -DestinationPath "$($zipPath)" -Force | Out-Null

# Publish zip to Azure
Write-Host "> Publishing to Azure ..." -ForegroundColor Green
(az webapp deployment source config-zip `
--resource-group $resourceGroup `
--name $name `
--src $zipPath) 2>> $logFile | Out-Null
}
else
{
Write-Host "! Could not deploy automatically to Azure. Review the log for more information." -ForegroundColor DarkRed
Write-Host "! Log: $($logFile)" -ForegroundColor DarkRed
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,24 @@ if (Test-Path $zipPath) {
Remove-Item $zipPath -Force | Out-Null
}

# Compress source code
Get-ChildItem -Path "$($projFolder)" | Compress-Archive -DestinationPath "$($zipPath)" -Force | Out-Null

# Publish zip to Azure
Write-Host "> Publishing to Azure ..."
(az webapp deployment source config-zip `
--resource-group $resourceGroup `
--name $name `
--src $zipPath) 2>> $logFile | Out-Null
# Perform dotnet publish step ahead of zipping up
$publishFolder = $(Join-Path $projFolder 'bin\Release\netcoreapp2.2')
dotnet publish -c release -o $publishFolder -v q > $logFile

if($?)
{
# Compress source code
Get-ChildItem -Path "$($publishFolder)" | Compress-Archive -DestinationPath "$($zipPath)" -Force | Out-Null

# Publish zip to Azure
Write-Host "> Publishing to Azure ..." -ForegroundColor Green
(az webapp deployment source config-zip `
--resource-group $resourceGroup `
--name $name `
--src $zipPath) 2>> $logFile | Out-Null
}
else
{
Write-Host "! Could not deploy automatically to Azure. Review the log for more information." -ForegroundColor DarkRed
Write-Host "! Log: $($logFile)" -ForegroundColor DarkRed
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,24 @@ if (Test-Path $zipPath) {
Remove-Item $zipPath -Force | Out-Null
}

# Compress source code
Get-ChildItem -Path "$($projFolder)" | Compress-Archive -DestinationPath "$($zipPath)" -Force | Out-Null

# Publish zip to Azure
Write-Host "> Publishing to Azure ..."
(az webapp deployment source config-zip `
--resource-group $resourceGroup `
--name $name `
--src $zipPath) 2>> $logFile | Out-Null
# Perform dotnet publish step ahead of zipping up
$publishFolder = $(Join-Path $projFolder 'bin\Release\netcoreapp2.2')
dotnet publish -c release -o $publishFolder -v q > $logFile

if($?)
{
# Compress source code
Get-ChildItem -Path "$($publishFolder)" | Compress-Archive -DestinationPath "$($zipPath)" -Force | Out-Null

# Publish zip to Azure
Write-Host "> Publishing to Azure ..." -ForegroundColor Green
(az webapp deployment source config-zip `
--resource-group $resourceGroup `
--name $name `
--src $zipPath) 2>> $logFile | Out-Null
}
else
{
Write-Host "! Could not deploy automatically to Azure. Review the log for more information." -ForegroundColor DarkRed
Write-Host "! Log: $($logFile)" -ForegroundColor DarkRed
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,24 @@ if (Test-Path $zipPath) {
Remove-Item $zipPath -Force | Out-Null
}

# Compress source code
Get-ChildItem -Path "$($projFolder)" | Compress-Archive -DestinationPath "$($zipPath)" -Force | Out-Null

# Publish zip to Azure
Write-Host "> Publishing to Azure ..."
(az webapp deployment source config-zip `
--resource-group $resourceGroup `
--name $name `
--src $zipPath) 2>> $logFile | Out-Null
# Perform dotnet publish step ahead of zipping up
$publishFolder = $(Join-Path $projFolder 'bin\Release\netcoreapp2.2')
dotnet publish -c release -o $publishFolder -v q > $logFile

if($?)
{
# Compress source code
Get-ChildItem -Path "$($publishFolder)" | Compress-Archive -DestinationPath "$($zipPath)" -Force | Out-Null

# Publish zip to Azure
Write-Host "> Publishing to Azure ..." -ForegroundColor Green
(az webapp deployment source config-zip `
--resource-group $resourceGroup `
--name $name `
--src $zipPath) 2>> $logFile | Out-Null
}
else
{
Write-Host "! Could not deploy automatically to Azure. Review the log for more information." -ForegroundColor DarkRed
Write-Host "! Log: $($logFile)" -ForegroundColor DarkRed
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,24 @@ if (Test-Path $zipPath) {
Remove-Item $zipPath -Force | Out-Null
}

# Compress source code
Get-ChildItem -Path "$($projFolder)" | Compress-Archive -DestinationPath "$($zipPath)" -Force | Out-Null

# Publish zip to Azure
Write-Host "> Publishing to Azure ..."
(az webapp deployment source config-zip `
--resource-group $resourceGroup `
--name $name `
--src $zipPath) 2>> $logFile | Out-Null
# Perform dotnet publish step ahead of zipping up
$publishFolder = $(Join-Path $projFolder 'bin\Release\netcoreapp2.2')
dotnet publish -c release -o $publishFolder -v q > $logFile

if($?)
{
# Compress source code
Get-ChildItem -Path "$($publishFolder)" | Compress-Archive -DestinationPath "$($zipPath)" -Force | Out-Null

# Publish zip to Azure
Write-Host "> Publishing to Azure ..." -ForegroundColor Green
(az webapp deployment source config-zip `
--resource-group $resourceGroup `
--name $name `
--src $zipPath) 2>> $logFile | Out-Null
}
else
{
Write-Host "! Could not deploy automatically to Azure. Review the log for more information." -ForegroundColor DarkRed
Write-Host "! Log: $($logFile)" -ForegroundColor DarkRed
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,24 @@ if (Test-Path $zipPath) {
Remove-Item $zipPath -Force | Out-Null
}

# Compress source code
Get-ChildItem -Path "$($projFolder)" | Compress-Archive -DestinationPath "$($zipPath)" -Force | Out-Null

# Publish zip to Azure
Write-Host "> Publishing to Azure ..."
(az webapp deployment source config-zip `
--resource-group $resourceGroup `
--name $name `
--src $zipPath) 2>> $logFile | Out-Null
# Perform dotnet publish step ahead of zipping up
$publishFolder = $(Join-Path $projFolder 'bin\Release\netcoreapp2.2')
dotnet publish -c release -o $publishFolder -v q > $logFile

if($?)
{
# Compress source code
Get-ChildItem -Path "$($publishFolder)" | Compress-Archive -DestinationPath "$($zipPath)" -Force | Out-Null

# Publish zip to Azure
Write-Host "> Publishing to Azure ..." -ForegroundColor Green
(az webapp deployment source config-zip `
--resource-group $resourceGroup `
--name $name `
--src $zipPath) 2>> $logFile | Out-Null
}
else
{
Write-Host "! Could not deploy automatically to Azure. Review the log for more information." -ForegroundColor DarkRed
Write-Host "! Log: $($logFile)" -ForegroundColor DarkRed
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,24 @@ if (Test-Path $zipPath) {
Remove-Item $zipPath -Force | Out-Null
}

# Compress source code
Get-ChildItem -Path "$($projFolder)" | Compress-Archive -DestinationPath "$($zipPath)" -Force | Out-Null

# Publish zip to Azure
Write-Host "> Publishing to Azure ..."
(az webapp deployment source config-zip `
--resource-group $resourceGroup `
--name $name `
--src $zipPath) 2>> $logFile | Out-Null
# Perform dotnet publish step ahead of zipping up
$publishFolder = $(Join-Path $projFolder 'bin\Release\netcoreapp2.2')
dotnet publish -c release -o $publishFolder -v q > $logFile

if($?)
{
# Compress source code
Get-ChildItem -Path "$($publishFolder)" | Compress-Archive -DestinationPath "$($zipPath)" -Force | Out-Null

# Publish zip to Azure
Write-Host "> Publishing to Azure ..." -ForegroundColor Green
(az webapp deployment source config-zip `
--resource-group $resourceGroup `
--name $name `
--src $zipPath) 2>> $logFile | Out-Null
}
else
{
Write-Host "! Could not deploy automatically to Azure. Review the log for more information." -ForegroundColor DarkRed
Write-Host "! Log: $($logFile)" -ForegroundColor DarkRed
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,24 @@ if (Test-Path $zipPath) {
Remove-Item $zipPath -Force | Out-Null
}

# Compress source code
Get-ChildItem -Path "$($projFolder)" | Compress-Archive -DestinationPath "$($zipPath)" -Force | Out-Null

# Publish zip to Azure
Write-Host "> Publishing to Azure ..."
(az webapp deployment source config-zip `
--resource-group $resourceGroup `
--name $name `
--src $zipPath) 2>> $logFile | Out-Null
# Perform dotnet publish step ahead of zipping up
$publishFolder = $(Join-Path $projFolder 'bin\Release\netcoreapp2.2')
dotnet publish -c release -o $publishFolder -v q > $logFile

if($?)
{
# Compress source code
Get-ChildItem -Path "$($publishFolder)" | Compress-Archive -DestinationPath "$($zipPath)" -Force | Out-Null

# Publish zip to Azure
Write-Host "> Publishing to Azure ..." -ForegroundColor Green
(az webapp deployment source config-zip `
--resource-group $resourceGroup `
--name $name `
--src $zipPath) 2>> $logFile | Out-Null
}
else
{
Write-Host "! Could not deploy automatically to Azure. Review the log for more information." -ForegroundColor DarkRed
Write-Host "! Log: $($logFile)" -ForegroundColor DarkRed
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,24 @@ if (Test-Path $zipPath) {
Remove-Item $zipPath -Force | Out-Null
}

# Compress source code
Get-ChildItem -Path "$($projFolder)" | Compress-Archive -DestinationPath "$($zipPath)" -Force | Out-Null

# Publish zip to Azure
Write-Host "> Publishing to Azure ..."
(az webapp deployment source config-zip `
--resource-group $resourceGroup `
--name $name `
--src $zipPath) 2>> $logFile | Out-Null
# Perform dotnet publish step ahead of zipping up
$publishFolder = $(Join-Path $projFolder 'bin\Release\netcoreapp2.2')
dotnet publish -c release -o $publishFolder -v q > $logFile

if($?)
{
# Compress source code
Get-ChildItem -Path "$($publishFolder)" | Compress-Archive -DestinationPath "$($zipPath)" -Force | Out-Null

# Publish zip to Azure
Write-Host "> Publishing to Azure ..." -ForegroundColor Green
(az webapp deployment source config-zip `
--resource-group $resourceGroup `
--name $name `
--src $zipPath) 2>> $logFile | Out-Null
}
else
{
Write-Host "! Could not deploy automatically to Azure. Review the log for more information." -ForegroundColor DarkRed
Write-Host "! Log: $($logFile)" -ForegroundColor DarkRed
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,24 @@ if (Test-Path $zipPath) {
Remove-Item $zipPath -Force | Out-Null
}

# Compress source code
Get-ChildItem -Path "$($projFolder)" | Compress-Archive -DestinationPath "$($zipPath)" -Force | Out-Null

# Publish zip to Azure
Write-Host "> Publishing to Azure ..."
(az webapp deployment source config-zip `
--resource-group $resourceGroup `
--name $name `
--src $zipPath) 2>> $logFile | Out-Null
# Perform dotnet publish step ahead of zipping up
$publishFolder = $(Join-Path $projFolder 'bin\Release\netcoreapp2.2')
dotnet publish -c release -o $publishFolder -v q > $logFile

if($?)
{
# Compress source code
Get-ChildItem -Path "$($publishFolder)" | Compress-Archive -DestinationPath "$($zipPath)" -Force | Out-Null

# Publish zip to Azure
Write-Host "> Publishing to Azure ..." -ForegroundColor Green
(az webapp deployment source config-zip `
--resource-group $resourceGroup `
--name $name `
--src $zipPath) 2>> $logFile | Out-Null
}
else
{
Write-Host "! Could not deploy automatically to Azure. Review the log for more information." -ForegroundColor DarkRed
Write-Host "! Log: $($logFile)" -ForegroundColor DarkRed
}
Loading