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

[IMP] Use latest nightly build by default #435

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ofahrni
Copy link

@ofahrni ofahrni commented Feb 9, 2023

Updated Dockerfile for versions 14.0, 15.0 and 16.0 to always use the "latest" nightly build available and automatically get the sha1 checksum for it.
Manually specifying the Odoo version and and sha1 checksum via build arguments is still possible.

Copy link

@amh-mw amh-mw left a comment

Choose a reason for hiding this comment

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

I really like the intent of this pull request, especially since odoo/odoo#113967 still hasn't made it into the weekly and is breaking my builds. That said, I see a couple of problems:

  1. Given that ODOO_RELEASE and ODOO_SHA are updated every week by an internal build, accepting this commit would potentially break that (sed -i) process.
  2. You can't safely curl sha1 hashes from an http (not https) source and then later use them to sha1sum validate the deb, as everything is untrustworthy at that point.

I'm probably still going to run with the spirit of this pull request, but as a shell script.

#!/bin/bash -e
ODOO_VERSION=15.0
ODOO_RELEASE=latest
ODOO_SHA=$(curl -sSL https://nightly.odoo.com/${ODOO_VERSION}/nightly/deb/Packages | grep -e "^SHA1:" | sed "s/SHA1: //")
docker build ./docker/odoo/$ODOO_VERSION --build-arg=ODOO_RELEASE=$ODOO_RELEASE --build-arg=ODOO_SHA=$ODOO_SHA

@larmar
Copy link

larmar commented Apr 18, 2023

Maybe I'm wrong. But isn't the docker triggered by the commit. So not changing the source would actually not trigger a docker build ?
I like the idea of building more frequently, but i believe it has to be controlled. Any day is not really good. Unless you build every day and have tagged docker images, like the nightly.
I'm using similar shell script trying to keep up with weekly "Monday" builds in my own fork :-)

@lathama
Copy link

lathama commented Apr 2, 2024

@ofahrni if this is still of interest can you update the PR to reflect 15, 16, and 17 along with changing to HTTPS urls.

I use the Docker ADD in my personal builds as it supports HTTPS downloads. e.g.
ADD https://nightly.odoo.com/17.0/nightly/deb/odoo_17.0.latest_all.deb /tmp/

I just noticed that the checksum in https://nightly.odoo.com/17.0/nightly/deb/odoo_17.0.latest.dsc is incorrect and the correct one is in https://nightly.odoo.com/17.0/nightly/deb/Packages which is not awesome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants