Flux: Automated release not working with Bazel images

Created on 21 May 2019  Â·  3Comments  Â·  Source: fluxcd/flux

We recently started experimenting with Flux, and we really like the workflow!
Unfortunately, it seems like we are not able to make the automated release feature work for us, because we build our images with Bazel. (we store them in ECR)
This has as a consequence that all our images have the same CREATED time - 01 Jan 70 00:00 UTC , because we use a java_base image and we build our images on top of that:

|   latest                                                        01 Jan 70 00:00 UTC
'-> staging-1558366618                                            01 Jan 70 00:00 UTC
    staging-1558368306                                            01 Jan 70 00:00 UTC

Although the new pushed images are being discovered, and our workloads’ policy is set to automated, no new deployments are being triggered with the new images.
We are guessing that this happens because the flux operator figures out new images exclusively by their CREATED field value, and not by Pushed at field.

So this issue is a question on whether our understanding of the situation is true, and if yes, how would you suggest us to proceed? Is there a workaround or patch that can solve our issue?
We would love to use Flux as our continuous delivery tool with Bazel 💘

question

Most helpful comment

There is a feature already merged in master that will give you control over the CREATED time by using labels in your Dockerfile. The release (1.13.0) of this feature is scheduled for June 05.

In case you can not wait for this to land, or want to play our guinea pig, we do have prerelease builds that tend to be stable.

All 3 comments

There is a feature already merged in master that will give you control over the CREATED time by using labels in your Dockerfile. The release (1.13.0) of this feature is scheduled for June 05.

In case you can not wait for this to land, or want to play our guinea pig, we do have prerelease builds that tend to be stable.

Thank you for the fast reply, we look forward for the release!

In the meantime, we found a way to make this work with Bazel, and setting the CREATED value with the image BUILD_TIMESTAMP, by setting stamp = 1 in the container_image component. It's there in the documentation, our bad that we didn't see it previously.
We will probably change it back and use the labels added in the new release once it's out.

Closing this to get it of our radar. Feel free to re-open (or fill a new issue) in case any new problems arise.

Was this page helpful?
0 / 5 - 0 ratings