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

Option to skip the image creation #8668

Closed
cah-ankur-singh03 opened this issue Jan 29, 2020 · 5 comments
Closed

Option to skip the image creation #8668

cah-ankur-singh03 opened this issue Jan 29, 2020 · 5 comments

Comments

@cah-ankur-singh03
Copy link

cah-ankur-singh03 commented Jan 29, 2020

Hello Folks,
Can some one please let me know if there is an option in packer to skip/avoid the image creation?
I have a CI/CD pipeline where I am creating image using packer which works pretty great.

However i have another requirement where I have to leverage the same pipeline and offload some steps from Concourse worker by moving some heavy lifting to GCP VM where I can use packer to provision a VM and do the heavy lifting but I don't want to get an output of that packer build. Is there a way I can skip image creation and still do the task?

I will really appreciate some feedback/guidance on this thread.

thanks

@krishicks
Copy link

A solution to this that I've implemented is to wrap the run of packer build in a script that:

  • removes any ami_users declaration, which prevents copying the AMI
  • adds a manifest post-processor if one does not already exist in the packer-template.json
  • uses the manifest post-processor output to find the artifacts that were created and uses the appropriate method to delete them

In the case of an amazon-ebs builder, the output is used to delete the AMI and associated snapshot with aws-cli.

I'd love to see this as a feature but it would need to be implemented by the provider as probably only the provider would know how to clean things up.

@SwampDragons
Copy link
Contributor

For more context on similar issues opened for other builders, see #7209

@cah-ankur-singh03
Copy link
Author

@krishicks thanks a lot for your suggestion. I will give it a try and see if that helps :)

@cah-ankur-singh03
Copy link
Author

@SwampDragons thanks a lot for pointing me to this thread.

@ghost
Copy link

ghost commented Apr 1, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants