CI : detect build errors

23 views
Skip to first unread message

arnaud.co...@webedia-group.com

unread,
Jan 3, 2019, 11:50:31 AM1/3/19
to Packer
Hi everyone,

I want to use packer & terraform in a CI environment to deploy projects on GCP.

The missing piece in my environment is the build status from packer : I don't want to update my infrastructure if my images are missing.
So I went on a quest to find the best way to get the build status from packer...

  • I found some resource on the issue tracker, where it is stated that packer's exit code does not reflects the build status (see here)
  • Since the logs are not structured, it does not seem reliable to parse them for the "build finished" statement (especially if there are parallel builds).
  • I could use gcloud directly to check if the image exists, but it feels like something is missing to packer.
    Besides, my image names are computed with packer variables, which means I should recompute them externally, duplicating information.

None of these solution seem reliable to me, and I feel like this is the kind of information that should be available from packer directly.
Do you know a better way than these ?

Yours,
Arnaud

Alvaro Miranda Aguilera

unread,
Jan 3, 2019, 12:30:56 PM1/3/19
to packe...@googlegroups.com

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/de0bac72-4b5d-4360-b987-2e0ca69ac05e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Alvaro

Guillermo A Menjivar

unread,
Jan 3, 2019, 4:56:02 PM1/3/19
to packe...@googlegroups.com
Ya I use the manifest for post validation and accounting for the AMIs I create as well.

Arnaud Courtecuisse

unread,
Jan 4, 2019, 4:03:38 AM1/4/19
to packe...@googlegroups.com
Hi,

This is exactly what I was looking for.
Thank you very much !

Arnaud

You received this message because you are subscribed to a topic in the Google Groups "Packer" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/packer-tool/9HjM2p4niQI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to packer-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/CAAjoyaWNSdfjY8zw0ptvgLRDcYb94avcTD5R3pv0LOHWb2Jzpw%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages