Skip to content

Commit

Permalink
trying the start-process command#4
Browse files Browse the repository at this point in the history
  • Loading branch information
catelleempei-eaton committed Aug 21, 2024
1 parent 1426c2c commit d2540ea
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/coverity-client.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

- name: Write license to file
run: |
if [ ! -z "${{ secrets.COVERITY_LICENSE }}" ]; then echo "${{ secrets.COVERITY_LICENSE }}" | base64 -d > pwd/license.dat ; else exit 1; fi
if [ ! -z "${{ secrets.COVERITY_LICENSE }}" ]; then echo "${{ secrets.COVERITY_LICENSE }}" | base64 -d > images/windows/scripts/build/license.dat ; else exit 1; fi
- name: Authentication on Azure
run: |
Expand Down
30 changes: 18 additions & 12 deletions images/windows/templates/windows-2022-coverity-base.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -234,19 +234,19 @@ source "azure-arm" "image" {
build {
sources = ["source.azure-arm.image"]

provisioner "powershell" {
inline = ["New-Item -Path ${var.image_folder} -ItemType Directory -Force"]
}
# provisioner "powershell" {
# inline = ["New-Item -Path ${var.image_folder} -ItemType Directory -Force"]
# }

provisioner "file" {
destination = "${var.image_folder}\\"
sources = [
# "${path.root}/../assets",
"${path.root}/../scripts",
"${path.root}/../license.dat",
# "${path.root}/../toolsets"
]
}
# provisioner "file" {
# destination = "${var.image_folder}\\"
# sources = [
# # "${path.root}/../assets",
# "${path.root}/../scripts",
# "${path.root}/../license.dat",
# # "${path.root}/../toolsets"
# ]
# }

# provisioner "file" {
# destination = "${var.image_folder}\\scripts\\docs-gen\\"
Expand Down Expand Up @@ -287,6 +287,12 @@ build {
# inline = ["bcdedit.exe /set TESTSIGNING ON"]
# }

provisioner "powershell" {
inline = [
"Write-Output 'Applying license...'",
"C:\image\scripts\build\license.dat"
]
}
# provisioner "powershell" {
# environment_vars = ["IMAGE_VERSION=${var.image_version}", "IMAGE_OS=${var.image_os}", "AGENT_TOOLSDIRECTORY=${var.agent_tools_directory}", "IMAGEDATA_FILE=${var.imagedata_file}", "IMAGE_FOLDER=${var.image_folder}"]
# execution_policy = "unrestricted"
Expand Down

0 comments on commit d2540ea

Please sign in to comment.