-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GA: add verify compile step to windows test
- Loading branch information
1 parent
ee07cf3
commit 5954df2
Showing
5 changed files
with
38 additions
and
5 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
$ErrorActionPreference = "Stop" | ||
$SALAMI_REPO_DIRECTORY = $args[0] | ||
|
||
New-Item -ItemType Directory -Force -Path .\salami | ||
New-Item -ItemType Directory -Force -Path .\terraform | ||
Copy-Item "${SALAMI_REPO_DIRECTORY}\.github\scripts\verify-compile\s3_bucket.sami" -Destination .\salami\s3_bucket.sami | ||
Copy-Item "${SALAMI_REPO_DIRECTORY}\.github\scripts\verify-compile\salami.yaml" -Destination .\salami.yaml | ||
|
||
salami compile | ||
|
||
if (!(Test-Path -Path .\terraform\s3_bucket.tf)) { | ||
Write-Host "Error: terraform\s3_bucket.tf does not exist" | ||
exit 1 | ||
} | ||
|
||
if (!(Compare-Object (Get-Content .\terraform\s3_bucket.tf) (Get-Content "${SALAMI_REPO_DIRECTORY}\.github\scripts\verify-compile\s3_bucket.tf") -Quiet)) { | ||
Write-Host "Error: terraform\s3_bucket.tf and ${SALAMI_REPO_DIRECTORY}\.github\scripts\verify-compile\s3_bucket.tf are not the same" | ||
|
||
Write-Host "Contents of terraform\s3_bucket.tf:" | ||
Get-Content .\terraform\s3_bucket.tf | ||
|
||
Write-Host "Contents of ${SALAMI_REPO_DIRECTORY}\.github\scripts\verify-compile\s3_bucket.tf:" | ||
Get-Content "${SALAMI_REPO_DIRECTORY}\.github\scripts\verify-compile\s3_bucket.tf" | ||
|
||
exit 1 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters