NebulousLabs / docker-sia

The official docker image for the Sia daemon
https://sia.tech
MIT License
20 stars 1 forks source link

Build the lastest *successful* `master`. #16

Closed ro-tex closed 4 years ago

ro-tex commented 4 years ago

When building the dev image we fetch and build the latest master branch. This is not ideal because the branch might be broken at the moment. It's much better to build the latest master that passed its CI build. In that case we know that we're building something that's at least usable, if not stable (we can't guarantee stability outside of releases).

What this MR does:

  1. query Sia's pipelines via GitLab's API
  2. fetch the SHA of the latest commit that passed its CI build
  3. get the latest Sia
  4. git reset --hard to the good SHA we fetched in step 1
ro-tex commented 4 years ago

Looks good to me. Wondering why we need this though. A lot of failures we see in master are actually NDFs -- most of the time the latest master should be buildable since the whole test suite has to pass before we can merge new code.

That's true, most of the time it's fine. I'm also not entirely sure who really needs a container for the latest master - the people who are keen enough to want that and know the risk of running work-in-progress code shouldn't need it pre-packaged in a container, they can pull the sources and build it themselves. And yet, we provide the container. If we're providing the container, let's make sure it's the best we can provide. :)