Skip to content

Commit

Permalink
Remove the planpath from the init because it breaks some scenarios
Browse files Browse the repository at this point in the history
  • Loading branch information
pgroene committed Jul 26, 2019
1 parent 61e2200 commit c3d7ec0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 19 deletions.
4 changes: 2 additions & 2 deletions Xpirit-Vsts-Release-Terraform/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"author": "Peter Groenewegen - Xpirit",
"version": {
"Major": 2,
"Minor": 3,
"Patch": 2
"Minor": 4,
"Patch": 0
},
"demands": [ "azureps" ],
"minimumAgentVersion": "1.95.0",
Expand Down
17 changes: 1 addition & 16 deletions Xpirit-Vsts-Release-Terraform/terraform.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -139,22 +139,7 @@ function Initialize-Terraform
$arguments = $remoteStateArguments + " $($defaultArgs.Trim())"
}

$plandir = (Get-VstsInput -Name PlanPath)

if (-not ([string]::IsNullOrEmpty($plandir))){
if (-not ((Get-Item $plandir) -is [System.IO.DirectoryInfo])){
if (Test-Path -Path $plandir){
$plandir = (Get-Item $plandir).Directory.FullName
}
else {
Write-Host "##vso[task.logissue type=warning;] PlanPath contains an invalid path/file"
}
}
}

$args = "$arguments $plandir".Trim()

Invoke-VstsTool -FileName terraform -arguments "init $args"
Invoke-VstsTool -FileName terraform -arguments "init $arguments"

if ($LASTEXITCODE)
{
Expand Down
2 changes: 1 addition & 1 deletion extension-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifestVersion": 1,
"id": "PeterGroenewegen-Xpirit-Vsts-Release-Terraform",
"name": "Terraform",
"version": "2.3.2",
"version": "2.4.0",
"publisher": "petergroenewegen",
"public": true,
"targets": [
Expand Down

0 comments on commit c3d7ec0

Please sign in to comment.