diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 94e88051128..8ff708ab7a4 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -37,19 +37,16 @@ jobs: $psqldir = (([System.IO.Path]::GetDirectoryName([System.IO.Path]::GetDirectoryName($psqlPath)))) $cfgdir = Join-Path -Path $psqldir -ChildPath data $cfgpath = Join-Path -Path $cfgdir -ChildPath "pg_hba.conf" - Write-Output "Getting network info" - Get-NetIPAddress | Format-Table + # Write-Output "Getting network info" + # Get-NetIPAddress | Format-Table Write-Output "Existing pg_hba.conf:" type $cfgpath - Write-Output "Writing to pg_hba config at: $cfgpath" - Set-Content "$cfgpath" "host all all ::1/128 trust" - Add-Content "$cfgpath" "host all all 127.0.0.1/32 trust" - $serviceName = (Get-CimInstance Win32_Service -Filter "Name LIKE 'postgresql-%'").Name - # the service name is "postgresql-x64-10", conveniently it's both the display name and the actual name - Write-Output "Looking up $serviceName" - Get-Service $serviceName - Write-Output "Restarting $serviceName" - Restart-Service $serviceName + # Write-Output "Writing to pg_hba config at: $cfgpath" + # Set-Content "$cfgpath" "host all all ::1/128 trust" + # Add-Content "$cfgpath" "host all all 127.0.0.1/32 trust" + $serviceName = Get-Service -Name postgresql* + Set-Service -InputObject $serviceName -StartupType Automatic + Start-Service -InputObject $serviceName createdb.exe -U postgres dbt psql.exe -U postgres -c "CREATE ROLE root WITH PASSWORD 'password';"