Skip to content

Commit

Permalink
19904 [REGRESSION]: PackerBuild task fails with: unknown configuratio…
Browse files Browse the repository at this point in the history
…n key: (#19928)
  • Loading branch information
PhilipsonJoseph authored May 30, 2024
1 parent f71558d commit 2410102
Show file tree
Hide file tree
Showing 58 changed files with 127 additions and 127 deletions.
16 changes: 8 additions & 8 deletions Tasks/PackerBuildV1/Tests/L0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -442,8 +442,8 @@ describe('PackerBuild Suite V1', function() {
assert(tr.stderr.length == 0 || tr.errorIssues.length, 'should not have written to stderr');
assert(tr.succeeded, 'task should have succeeded');
assert(tr.stdout.indexOf("loc_mock_DownloadingPackerRequired") != -1, "should show message that packer will be downloaded");
assert(tr.stdout.indexOf("Downloading packer from url: https://releases.hashicorp.com/packer/1.2.4/packer_1.2.4_windows_amd64.zip") != -1, "should download from correct url");
assert(tr.stdout.indexOf("downloading from url https://releases.hashicorp.com/packer/1.2.4/packer_1.2.4_windows_amd64.zip to F:\\somedir\\tempdir\\100\\packer.zip") != -1, "should download to correct staging dir");
assert(tr.stdout.indexOf("Downloading packer from url: https://releases.hashicorp.com/packer/1.5.4/packer_1.5.4_windows_amd64.zip") != -1, "should download from correct url");
assert(tr.stdout.indexOf("downloading from url https://releases.hashicorp.com/packer/1.5.4/packer_1.5.4_windows_amd64.zip to F:\\somedir\\tempdir\\100\\packer.zip") != -1, "should download to correct staging dir");
assert(tr.stdout.indexOf("extracting from zip F:\\somedir\\tempdir\\100\\packer.zip to F:\\somedir\\tempdir\\100\\packer") != -1, "should extract from and to correct path");
assert(tr.stdout.indexOf("Packer path to be used by task: F:\\somedir\\tempdir\\100\\packer\\packer.exe") != -1, "should show message that packer will be downloaded");
assert(tr.stdout.indexOf("##vso[task.setvariable variable=imageUri;isOutput=false;issecret=false;]https://bishalpackerimages.blob.core.windows.net/system/Microsoft.Compute/Images/packer/packer-osDisk.e2e08a75-2d73-49ad-97c2-77f8070b65f5.vhd") != -1, "image uri output variable not set");
Expand All @@ -464,8 +464,8 @@ describe('PackerBuild Suite V1', function() {
assert(tr.stderr.length == 0 || tr.errorIssues.length, 'should not have written to stderr');
assert(tr.succeeded, 'task should have succeeded');
assert(tr.stdout.indexOf("loc_mock_DownloadingPackerRequired") != -1, "should show message that packer will be downloaded");
assert(tr.stdout.indexOf("Downloading packer from url: https://releases.hashicorp.com/packer/1.2.4/packer_1.2.4_windows_amd64.zip") != -1, "should download from correct url");
assert(tr.stdout.indexOf("downloading from url https://releases.hashicorp.com/packer/1.2.4/packer_1.2.4_windows_amd64.zip to F:\\somedir\\tempdir\\100\\packer.zip") != -1, "should download to correct staging dir");
assert(tr.stdout.indexOf("Downloading packer from url: https://releases.hashicorp.com/packer/1.5.4/packer_1.5.4_windows_amd64.zip") != -1, "should download from correct url");
assert(tr.stdout.indexOf("downloading from url https://releases.hashicorp.com/packer/1.5.4/packer_1.5.4_windows_amd64.zip to F:\\somedir\\tempdir\\100\\packer.zip") != -1, "should download to correct staging dir");
assert(tr.stdout.indexOf("extracting from zip F:\\somedir\\tempdir\\100\\packer.zip to F:\\somedir\\tempdir\\100\\packer") != -1, "should extract from and to correct path");
assert(tr.stdout.indexOf("Packer path to be used by task: F:\\somedir\\tempdir\\100\\packer\\packer.exe") != -1, "should show message that packer will be downloaded");
assert(tr.stdout.indexOf("##vso[task.setvariable variable=imageUri;isOutput=false;issecret=false;]https://bishalpackerimages.blob.core.windows.net/system/Microsoft.Compute/Images/packer/packer-osDisk.e2e08a75-2d73-49ad-97c2-77f8070b65f5.vhd") != -1, "image uri output variable not set");
Expand Down Expand Up @@ -669,8 +669,8 @@ describe('PackerBuild Suite V1', function() {
assert(tr.stderr.length == 0 || tr.errorIssues.length, 'should not have written to stderr');
assert(tr.succeeded, 'task should have succeeded');
assert(tr.stdout.indexOf("loc_mock_DownloadingPackerRequired") != -1, "should show message that packer will be downloaded");
assert(tr.stdout.indexOf("Downloading packer from url: https://releases.hashicorp.com/packer/1.2.4/packer_1.2.4_linux_amd64.zip") != -1, "should download from correct url");
assert(tr.stdout.indexOf("downloading from url https://releases.hashicorp.com/packer/1.2.4/packer_1.2.4_linux_amd64.zip to /tmp/tempdir/100/packer.zip") != -1, "should download to correct staging dir");
assert(tr.stdout.indexOf("Downloading packer from url: https://releases.hashicorp.com/packer/1.5.4/packer_1.5.4_linux_amd64.zip") != -1, "should download from correct url");
assert(tr.stdout.indexOf("downloading from url https://releases.hashicorp.com/packer/1.5.4/packer_1.5.4_linux_amd64.zip to /tmp/tempdir/100/packer.zip") != -1, "should download to correct staging dir");
assert(tr.stdout.indexOf("extracting from zip /tmp/tempdir/100/packer.zip to /tmp/tempdir/100/packer") != -1, "should extract from and to correct path");
assert(tr.stdout.indexOf("Packer path to be used by task: /tmp/tempdir/100/packer/packer") != -1, "should show message that packer will be downloaded");
assert(tr.stdout.indexOf("##vso[task.setvariable variable=imageUri;isOutput=false;issecret=false;]https://bishalpackerimages.blob.core.windows.net/system/Microsoft.Compute/Images/packer/packer-osDisk.e2e08a75-2d73-49ad-97c2-77f8070b65f5.vhd") != -1, "image uri output variable not set");
Expand All @@ -691,8 +691,8 @@ describe('PackerBuild Suite V1', function() {
assert(tr.stderr.length == 0 || tr.errorIssues.length, 'should not have written to stderr');
assert(tr.succeeded, 'task should have succeeded');
assert(tr.stdout.indexOf("loc_mock_DownloadingPackerRequired") != -1, "should show message that packer will be downloaded");
assert(tr.stdout.indexOf("Downloading packer from url: https://releases.hashicorp.com/packer/1.2.4/packer_1.2.4_linux_amd64.zip") != -1, "should download from correct url");
assert(tr.stdout.indexOf("downloading from url https://releases.hashicorp.com/packer/1.2.4/packer_1.2.4_linux_amd64.zip to /tmp/tempdir/100/packer.zip") != -1, "should download to correct staging dir");
assert(tr.stdout.indexOf("Downloading packer from url: https://releases.hashicorp.com/packer/1.5.4/packer_1.5.4_linux_amd64.zip") != -1, "should download from correct url");
assert(tr.stdout.indexOf("downloading from url https://releases.hashicorp.com/packer/1.5.4/packer_1.5.4_linux_amd64.zip to /tmp/tempdir/100/packer.zip") != -1, "should download to correct staging dir");
assert(tr.stdout.indexOf("extracting from zip /tmp/tempdir/100/packer.zip to /tmp/tempdir/100/packer") != -1, "should extract from and to correct path");
assert(tr.stdout.indexOf("Packer path to be used by task: /tmp/tempdir/100/packer/packer") != -1, "should show message that packer will be downloaded");
assert(tr.stdout.indexOf("##vso[task.setvariable variable=imageUri;isOutput=false;issecret=false;]https://bishalpackerimages.blob.core.windows.net/system/Microsoft.Compute/Images/packer/packer-osDisk.e2e08a75-2d73-49ad-97c2-77f8070b65f5.vhd") != -1, "image uri output variable not set");
Expand Down
4 changes: 2 additions & 2 deletions Tasks/PackerBuildV1/Tests/L0CustomManagedTemplate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ let a: any = <any>{
"exec": {
"packer --version": {
"code": 0,
"stdout": "1.2.4"
"stdout": "1.5.4"
},
"packer -machine-readable --version": {
"code": 0,
"stdout": "1234567,,version,1.2.4"
"stdout": "1234567,,version,1.5.4"
},
"packer fix -validate=false C:\\custom.template.json": {
"code": 0,
Expand Down
4 changes: 2 additions & 2 deletions Tasks/PackerBuildV1/Tests/L0CustomTemplate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ let a: any = <any>{
"exec": {
"packer --version": {
"code": 0,
"stdout": "1.2.4"
"stdout": "1.5.4"
},
"packer -machine-readable --version": {
"code": 0,
"stdout": "1234567,,version,1.2.4"
"stdout": "1234567,,version,1.5.4"
},
"packer fix -validate=false C:\\custom.template.json": {
"code": 0,
Expand Down
4 changes: 2 additions & 2 deletions Tasks/PackerBuildV1/Tests/L0Linux.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ let a: any = <any>{
"exec": {
"packer --version": {
"code": 0,
"stdout": "1.2.4"
"stdout": "1.5.4"
},
"packer -machine-readable --version": {
"code": 0,
"stdout": "1234567,,version,1.2.4"
"stdout": "1234567,,version,1.5.4"
},
"packer fix -validate=false /tmp/tempdir/100/default.linux.template.json": {
"code": 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ let a: any = <any>{
"exec": {
"packer --version": {
"code": 0,
"stdout": "1.2.4"
"stdout": "1.5.4"
},
"packer -machine-readable --version": {
"code": 0,
"stdout": "1234567,,version,1.2.4"
"stdout": "1234567,,version,1.5.4"
},
"packer fix -validate=false /tmp/tempdir/100/default.linux.template-builderUpdated.json": {
"code": 0,
Expand Down
4 changes: 2 additions & 2 deletions Tasks/PackerBuildV1/Tests/L0LinuxCustomImage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ let a: any = <any>{
"exec": {
"packer --version": {
"code": 0,
"stdout": "1.2.4"
"stdout": "1.5.4"
},
"packer -machine-readable --version": {
"code": 0,
"stdout": "1234567,,version,1.2.4"
"stdout": "1234567,,version,1.5.4"
},
"packer fix -validate=false /tmp/tempdir/100/custom.linux.template.json": {
"code": 0,
Expand Down
2 changes: 1 addition & 1 deletion Tasks/PackerBuildV1/Tests/L0LinuxInstallPacker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ let a: any = <any>{
"exec": {
"packer --version": {
"code": 0,
"stdout": process.env["__lower_version__"] === "true" ? "0.11.2" : "1.2.4"
"stdout": process.env["__lower_version__"] === "true" ? "0.11.2" : "1.5.4"
},
"/tmp/tempdir/100/packer/packer fix -validate=false /tmp/tempdir/100/default.linux.template.json": {
"code": 0,
Expand Down
4 changes: 2 additions & 2 deletions Tasks/PackerBuildV1/Tests/L0LinuxManaged.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ let a: any = <any>{
"exec": {
"packer --version": {
"code": 0,
"stdout": "1.2.4"
"stdout": "1.5.4"
},
"packer -machine-readable --version": {
"code": 0,
"stdout": "1234567,,version,1.2.4"
"stdout": "1234567,,version,1.5.4"
},
"packer fix -validate=false /tmp/tempdir/100/default.managed.linux.template.json": {
"code": 0,
Expand Down
4 changes: 2 additions & 2 deletions Tasks/PackerBuildV1/Tests/L0Parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ let a: any = <any>{
"exec": {
"packer --version": {
"code": 0,
"stdout": "1.2.4"
"stdout": "1.5.4"
},
"packer -machine-readable --version": {
"code": 0,
"stdout": "1234567,,version,1.2.4"
"stdout": "1234567,,version,1.5.4"
},
"packer fix -validate=false F:\\somedir\\tempdir\\100\\default.windows.template.json": {
"code": 0,
Expand Down
4 changes: 2 additions & 2 deletions Tasks/PackerBuildV1/Tests/L0Windows.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ let a: any = <any>{
"exec": {
"packer --version": {
"code": 0,
"stdout": "1.2.4"
"stdout": "1.5.4"
},
"packer -machine-readable --version": {
"code": 0,
"stdout": "1234567,,version,1.2.4"
"stdout": "1234567,,version,1.5.4"
},
"packer fix -validate=false F:\\somedir\\tempdir\\100\\default.windows.template.json": {
"code": 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ let a: any = <any>{
"exec": {
"packer --version": {
"code": 0,
"stdout": "1.2.4"
"stdout": "1.5.4"
},
"packer -machine-readable --version": {
"code": 0,
"stdout": "1234567,,version,1.2.4"
"stdout": "1234567,,version,1.5.4"
},
"packer fix -validate=false F:\\somedir\\tempdir\\100\\default.windows.template-builderUpdated.json": {
"code": 0,
Expand Down
4 changes: 2 additions & 2 deletions Tasks/PackerBuildV1/Tests/L0WindowsCustomImage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ let a: any = <any>{
"exec": {
"packer --version": {
"code": 0,
"stdout": "1.2.4"
"stdout": "1.5.4"
},
"packer -machine-readable --version": {
"code": 0,
"stdout": "1234567,,version,1.2.4"
"stdout": "1234567,,version,1.5.4"
},
"packer fix -validate=false F:\\somedir\\tempdir\\100\\custom.windows.template.json": {
"code": 0,
Expand Down
4 changes: 2 additions & 2 deletions Tasks/PackerBuildV1/Tests/L0WindowsFail.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ let a: any = <any>{
"exec": {
"packer --version": {
"code": 0,
"stdout": "1.2.4"
"stdout": "1.5.4"
},
"packer -machine-readable --version": {
"code": 0,
"stdout": "1234567,,version,1.2.4"
"stdout": "1234567,,version,1.5.4"
},
"packer fix -validate=false F:\\somedir\\tempdir\\100\\default.windows.template.json": {
"code": process.env["__packer_fix_fails__"] === "true" ? 1 : 0,
Expand Down
4 changes: 2 additions & 2 deletions Tasks/PackerBuildV1/Tests/L0WindowsInstallPacker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ let a: any = <any>{
"exec": {
"packer --version": {
"code": 0,
"stdout": process.env["__lower_version__"] === "true" ? "0.11.2" : "1.2.4"
"stdout": process.env["__lower_version__"] === "true" ? "0.11.2" : "1.5.4"
},
"F:\\somedir\\tempdir\\100\\packer\\packer.exe --version": {
"code": 0,
"stdout": process.env["__lower_version__"] === "true" ? "0.11.2" : "1.2.4"
"stdout": process.env["__lower_version__"] === "true" ? "0.11.2" : "1.5.4"
},
"F:\\somedir\\tempdir\\100\\packer\\packer.exe fix -validate=false F:\\somedir\\tempdir\\100\\default.windows.template.json": {
"code": 0,
Expand Down
4 changes: 2 additions & 2 deletions Tasks/PackerBuildV1/Tests/L0WindowsManaged.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ let a: any = <any>{
"exec": {
"packer --version": {
"code": 0,
"stdout": "1.2.4"
"stdout": "1.5.4"
},
"packer -machine-readable --version": {
"code": 0,
"stdout": "1234567,,version,1.2.4"
"stdout": "1234567,,version,1.5.4"
},
"packer fix -validate=false F:\\somedir\\tempdir\\100\\default.managed.windows.template.json": {
"code": 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default class AzureSpnTemplateVariablesProvider implements definitions.IT
this._spnVariables.set(constants.TemplateVariableClientIdName, tl.getEndpointAuthorizationParameter(connectedService, 'serviceprincipalid', false));
if (endpointObject.scheme === 'WorkloadIdentityFederation') {
const oidc_token = await endpointObject.applicationTokenCredentials.getFederatedToken();
tl.setSecret(oidc_token);
// tl.setSecret(oidc_token);
this._spnVariables.set(constants.TemplateVariableClientjwtName, oidc_token);
}
else {
Expand Down
2 changes: 1 addition & 1 deletion Tasks/PackerBuildV1/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export var PackerLogTokenManagedImageId = "ManagedImageId";
export var OutputVariableImageUri = "imageUri";
export var OutputVariableImageId = "imageId";

export var CurrentSupportedPackerVersionString = "1.2.4";
export var CurrentSupportedPackerVersionString = "1.5.4";
export var PackerDownloadUrlFormat = "https://releases.hashicorp.com/packer/%s/packer_%s_%s.zip"

export var TemplateTypeCustom = "custom";
Expand Down
2 changes: 1 addition & 1 deletion Tasks/PackerBuildV1/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"author": "Microsoft Corporation",
"version": {
"Major": 1,
"Minor": 239,
"Minor": 240,
"Patch": 0
},
"demands": [],
Expand Down
2 changes: 1 addition & 1 deletion Tasks/PackerBuildV1/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"author": "Microsoft Corporation",
"version": {
"Major": 1,
"Minor": 239,
"Minor": 240,
"Patch": 0
},
"demands": [],
Expand Down
4 changes: 2 additions & 2 deletions _generated/PackerBuildV1.versionmap.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Default|1.239.0
Node20_229_6|1.239.1
Default|1.240.0
Node20_229_6|1.240.1
Loading

0 comments on commit 2410102

Please sign in to comment.