Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 224 #312

Merged
Merged

Conversation

saikirandusari
Copy link
Contributor

@saikirandusari saikirandusari commented Oct 18, 2023

Use the folder defined in the post-processor packer config as a remoteFolder when marking the VM as a template.

post-processors {
      post-processor "vsphere-template"{
          host              = "vcenter.example.com"
          insecure        = false
          username       = "[email protected]"
          password       = "testpwd"
          datacenter     = "dc-01"   
          folder              = "/templates/"
      }
}

This PR resolves open issue #224

Closes #224

@saikirandusari saikirandusari requested a review from a team as a code owner October 18, 2023 21:47
@tenthirtyam tenthirtyam changed the title Signed-off-by: Saikiran Dusari<[email protected]> Update step… Update step_mark_as_template.go Oct 19, 2023
@tenthirtyam tenthirtyam changed the title Update step_mark_as_template.go fix: 224 Oct 19, 2023
tenthirtyam

This comment was marked as outdated.

@tenthirtyam tenthirtyam self-requested a review October 19, 2023 01:26
@tenthirtyam tenthirtyam dismissed their stale review October 19, 2023 01:26

CI failing

Copy link
Collaborator

@tenthirtyam tenthirtyam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI is failing. Please review the errors. :)

@tenthirtyam tenthirtyam marked this pull request as draft October 19, 2023 01:32
@saikirandusari saikirandusari marked this pull request as ready for review October 19, 2023 02:51
@saikirandusari
Copy link
Contributor Author

CI is failing. Please review the errors. :)

tenthirtyam Code fix applied. Please review and approve to run the tests.

@tenthirtyam
Copy link
Collaborator

image

@tenthirtyam
Copy link
Collaborator

@lbajolet-hashicorp - I addressed the the issue mentioned in #312 (comment) and it's moved forward but Go Validate action is failing on the lint and gofmt steps but those don't seem to be related to this change.

  /usr/bin/tar: ../../../go/pkg/mod/golang.org/x/[email protected]/PATENTS: Cannot open: File exists
  /usr/bin/tar: ../../../go/pkg/mod/golang.org/x/[email protected]/.gitignore: Cannot open: File exists
  /usr/bin/tar: ../../../go/pkg/mod/golang.org/x/[email protected]/go.mod: Cannot open: File exists
  /usr/bin/tar: Exiting with failure status due to previous errors
  Warning: Failed to restore: "/usr/bin/tar" failed with error: The process '/usr/bin/tar' failed with exit code 2
  Cache not found for input keys: golangci-lint.cache-2807-48db04078f992043765d66fe773ddecb962b11e2, golangci-lint.cache-2807-
  Finding needed golangci-lint version...
  Installation mode: binary
  Installing golangci-lint binary v1.53.3...
  Downloading binary https://github.com/golangci/golangci-lint/releases/download/v1.53.3/golangci-lint-1.53.3-linux-amd64.tar.gz ...
  Writing patch to /tmp/tmp-1808-uienO06vLFpm/pull.patch
  /usr/bin/tar xz --overwrite --warning=no-unknown-keyword --overwrite -C /home/runner -f /home/runner/work/_temp/093b28de-207f-4e2b-9661-26b1a7dc5091
  Installed golangci-lint into /home/runner/golangci-lint-1.53.3-linux-amd64/golangci-lint in 599ms
  Prepared env in 13378ms

@lbajolet-hashicorp
Copy link
Contributor

lbajolet-hashicorp commented Oct 19, 2023

Hey @tenthirtyam,

The lint/check failures were because the indentation does not match what go expects, in general it's recommended to use tabs for indentation, and your last update changed that in favour of spaces, hence the failure.

The last reroll I pushed makes the tests all green, I'll review this change now and if it looks good to me, I'll merge this PR.

Thanks for the ping!

@tenthirtyam
Copy link
Collaborator

Many thanks, @lbajolet-hashicorp!

Copy link
Contributor

@lbajolet-hashicorp lbajolet-hashicorp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@lbajolet-hashicorp lbajolet-hashicorp merged commit 59eb615 into hashicorp:main Oct 19, 2023
11 checks passed
@saikirandusari saikirandusari deleted the saikirandusari-patch-224 branch October 19, 2023 22:14
@saikirandusari
Copy link
Contributor Author

Thanks @lbajolet-hashicorp and @tenthirtyam for sorting this PR

@hashicorp hashicorp locked and limited conversation to collaborators Jun 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

vsphere-template: VM at path /MyDataCenter/vm/Discovered virtual machine/ubuntu not found
3 participants