From 1f72c363e7683b59fc69ed651304d452ac86eac5 Mon Sep 17 00:00:00 2001 From: Saikiran Dusari Date: Thu, 19 Oct 2023 10:43:59 +1300 Subject: [PATCH 1/4] Update step_mark_as_template.go to resolve #224 Signed-off-by: Saikiran Dusari --- post-processor/vsphere-template/step_mark_as_template.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/post-processor/vsphere-template/step_mark_as_template.go b/post-processor/vsphere-template/step_mark_as_template.go index e33bf342..9a64752d 100644 --- a/post-processor/vsphere-template/step_mark_as_template.go +++ b/post-processor/vsphere-template/step_mark_as_template.go @@ -27,6 +27,10 @@ type stepMarkAsTemplate struct { func NewStepMarkAsTemplate(artifact packersdk.Artifact, p *PostProcessor) *stepMarkAsTemplate { remoteFolder := "Discovered virtual machine" + //if post-processor config folder is not null, use the folder as remoteFolder + if p.config.Folder != "" { +     remoteFolder = p.config.Folder + } vmname := artifact.Id() if artifact.BuilderId() == vsphere.BuilderId { From 056472364e9f8ca112042fcd6cf6261282900d40 Mon Sep 17 00:00:00 2001 From: Saikiran Dusari Date: Thu, 19 Oct 2023 11:17:44 +1300 Subject: [PATCH 2/4] =?UTF-8?q?Update=20step=E2=80=A6=20=E2=80=A6=5Fmark?= =?UTF-8?q?=5Fas=5Ftemplate.go=20to=20resolve=20hashicorp#224?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Saikiran Dusari --- post-processor/vsphere-template/step_mark_as_template.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/post-processor/vsphere-template/step_mark_as_template.go b/post-processor/vsphere-template/step_mark_as_template.go index 9a64752d..7cfcf4b0 100644 --- a/post-processor/vsphere-template/step_mark_as_template.go +++ b/post-processor/vsphere-template/step_mark_as_template.go @@ -29,7 +29,7 @@ func NewStepMarkAsTemplate(artifact packersdk.Artifact, p *PostProcessor) *stepM remoteFolder := "Discovered virtual machine" //if post-processor config folder is not null, use the folder as remoteFolder if p.config.Folder != "" { -     remoteFolder = p.config.Folder +     remoteFolder := p.config.Folder } vmname := artifact.Id() From 031202ef109397b3ee4cb7a56c6709f680520b32 Mon Sep 17 00:00:00 2001 From: Saikiran Dusari Date: Thu, 19 Oct 2023 16:09:08 +1300 Subject: [PATCH 3/4] Fix syntax issue to resolve #224 Signed-off-by: Saikiran Dusari --- post-processor/vsphere-template/step_mark_as_template.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/post-processor/vsphere-template/step_mark_as_template.go b/post-processor/vsphere-template/step_mark_as_template.go index 7cfcf4b0..9a64752d 100644 --- a/post-processor/vsphere-template/step_mark_as_template.go +++ b/post-processor/vsphere-template/step_mark_as_template.go @@ -29,7 +29,7 @@ func NewStepMarkAsTemplate(artifact packersdk.Artifact, p *PostProcessor) *stepM remoteFolder := "Discovered virtual machine" //if post-processor config folder is not null, use the folder as remoteFolder if p.config.Folder != "" { -     remoteFolder := p.config.Folder +     remoteFolder = p.config.Folder } vmname := artifact.Id() From 360717f10a96485468528bafa525689253d8432b Mon Sep 17 00:00:00 2001 From: Ryan Johnson Date: Thu, 19 Oct 2023 16:20:28 -0400 Subject: [PATCH 4/4] fix: update to address ci failure Update to address ci failure. Signed-off-by: Ryan Johnson --- post-processor/vsphere-template/step_mark_as_template.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/post-processor/vsphere-template/step_mark_as_template.go b/post-processor/vsphere-template/step_mark_as_template.go index 9a64752d..12c53496 100644 --- a/post-processor/vsphere-template/step_mark_as_template.go +++ b/post-processor/vsphere-template/step_mark_as_template.go @@ -29,7 +29,7 @@ func NewStepMarkAsTemplate(artifact packersdk.Artifact, p *PostProcessor) *stepM remoteFolder := "Discovered virtual machine" //if post-processor config folder is not null, use the folder as remoteFolder if p.config.Folder != "" { -     remoteFolder = p.config.Folder + remoteFolder = p.config.Folder } vmname := artifact.Id()