This commit is contained in:
fabiohaifa 2022-01-20 16:21:33 -03:00
Родитель 2d3d7c2357
Коммит 4071a7552b
1 изменённых файлов: 4 добавлений и 2 удалений

Просмотреть файл

@ -187,9 +187,11 @@ function CreateAzDevOpsRepoEnviorment {
[Argument]::AssertIsNotNull("RepoConfiguration", $RepoConfiguration)
$orgURI = $RepoConfiguration.AzureDevOpsOrganizationURI + "/"
Write-Host "Creating enviorment on branch $Branch" -ForegroundColor Green
Write-Host "Project " $RepoConfiguration.AzureDevOpsProject -ForegroundColor Green
Write-Host "Organization " $RepoConfiguration.AzureDevOpsOrganization -ForegroundColor Green
Write-Host "Organization " $orgURI -ForegroundColor Green
$envBody = @{
name = $env
@ -199,7 +201,7 @@ function CreateAzDevOpsRepoEnviorment {
Set-Content -Path $infile -Value ($envBody | ConvertTo-Json)
az devops invoke `
--area distributedtask --resource environments `
--route-parameters project=$RepoConfiguration.AzureDevOpsProject --org $RepoConfiguration.AzureDevOpsOrganization `
--route-parameters project=$RepoConfiguration.AzureDevOpsProject --org $orgURI `
--http-method POST --in-file $infile `
--api-version "6.0-preview"
rm $infile -f