-
Notifications
You must be signed in to change notification settings - Fork 176
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
Only rebuild daily if a package changed #15
Conversation
So, daily builds will only be pushed if packages have been updated and manually triggered builds and builds triggered by changes in the repo will push a new version because it implies something changed in the source code. Is that right? This approach is more simple than #12 and #14 and will avoid rebuilding BUT it relies on Travis "cron" build type and logical assumptions:
#14 is always pushing as they are reproducible builds. It has a reliable way of checking if there are changes. Reproducible builds are not useful right now but it is a good way to ensure anything that changes will be pushed. Also they dont rely on the type of build (cron or triggered by change). If someone ever wants to run the scripts locally and push them to a container hub, it would be better to have reproducible builds. If Travis changes its API, or dissapear or whatever, we lose our hability to detect wether to push or not. I would still go with #14 but it is a hard decission, I will let others jump in and give their opinion on this :) |
Hi, To be clear, I am proposing landing both #14 and this one. This will solve the problem of
Yes, that is right. I think this does a good job of only building when it is likely that a different image will be produced. The reproduciblity would mean that when that was wrong (e.g. someone pushes just a README change) then the layer would be re-used even though we pushed an image when we didn't As for relying on the travis type, there's no way to set an env var in travis for just a cron build, otherwise I would name the variable something not related to travis and set it just for those builds. |
When the build is triggered by CRON check whether any of the packages changed before building each version. This will prevent wasting build time and pushing new versions if nothing has changed. The builds triggered by new master revisions will still push new versions, so any changes to the scripts will result in a new image.
a9bd379
to
bc61248
Compare
I see, if you manage to reproduce the same image in #14, will this PR be still necessary? |
Yeah, if the image is fully reproducible then pushing will make no changes. However:
|
That effort is nothing as we already triggered a build in Travis, we are just saving a few minutes. I would like to make #14 fully image reproducible. Let me know if I can help with it |
When the build is triggered by CRON check whether any of
the packages changed before building each version.
This will prevent wasting build time and pushing new versions
if nothing has changed.
The builds triggered by new master revisions will still
push new versions, so any changes to the scripts will result
in a new image.