initc3 / HoneyBadgerMPC

Robust MPC-based confidentiality layer for blockchains
GNU General Public License v3.0
131 stars 64 forks source link

Remove the need of docker credentials on Travis CI #401

Closed sbellem closed 4 years ago

sbellem commented 4 years ago

Some of the dependencies for the external honeybadgermpc-deps image, have been packaged into their own image:

Some positive side effects:

TODO:

Will remove the docker_*.sh scripts in a subsequent step as they may be useful for build jobs done under the initc3/HoneyBadgerMPC repo, i.e.: TRAVIS_REPO_SLUG == initc3/HoneyBadgerMPC.

codecov[bot] commented 4 years ago

Codecov Report

Merging #401 into dev will increase coverage by 0.03652%. The diff coverage is n/a.

@@                Coverage Diff                 @@
##                 dev       #401         +/-   ##
==================================================
+ Coverage   77.19137%   77.2279%   +0.03651%     
==================================================
  Files             49         49                 
  Lines           5476       5476                 
  Branches         846        846                 
==================================================
+ Hits            4227       4229          +2     
+ Misses          1078       1077          -1     
+ Partials         171        170          -1
sanket1729 commented 4 years ago

Hi @sbellem, This looks super clean and thanks for the prompt work. We would like to merge this as soon as possible.

1) Can we still use Drake's worksflow for the second repo? That is, we should auto push to docker hub whenever the base image is updated. 2) Can you also remove the scripts docker_*.sh inside the scripts folder as part of this PR. 3) I suppose this will require an edit in the README for install instructions too.

sbellem commented 4 years ago

Can we still use Drake's workflow for the second repo? That is, we should auto push to docker hub whenever the base image is updated.

Docker Hub allows for automated builds to be configured such that any change on the linked Github repo will trigger a new build of the image on Docker Hub.

I will look into the optimal way to set this up for the team. It is also possible to set automated tests via what Docker calls Autotest and I also want to look into this.

sanket1729 commented 4 years ago

I think before we merge this, we should at least update the install instructions

sbellem commented 4 years ago

I think before we merge this, we should at least update the install instructions

I'll be adding documentation early on Tuesday, now that the images have been moved under the initc3 org on both Github and Docker Hub.

sbellem commented 4 years ago

Will we have to manually change the digest HBMPC_DEPS_DIGEST every time there is a new build image.

Yes, every time we wish to use a different version of the parent image.

If yes, can we look into some automated way of doing this? It is not a priority thing, but just "good to have" thing

I would need to look into it. Perhaps with a custom build phase hook after the push (hooks/post_push).

If we change the digest the change should go through a CI phase, like on Travis CI, or perhaps using Docker Hub Autotest.

An alternative would be to use tags instead of digests. Something like:

FROM initc3/honeybadgermpc-deps:python3.7-slim-buster

instead of

FROM initc3/honeybadgermpc-deps@sha256:46902d869ea881d7b00b72ff6accf2558a5e15849da5fa5cc722b4ff82a507f8

Tags are mutable whereas digests are immutable. In other words, when you are pulling an image by its tag that image may change from one day to another whereas using the digest provides a guarantee that this image will not change.

So, if initc3/honeybadgermpc-deps:python3.7-slim-buster has a digest equal to 46902d869ea881d7b00b72ff6accf2558a5e15849da5fa5cc722b4ff82a507f8 right now, and tomorrow initc3/honeybadgermpc-deps:python3.7-slim-buster is updated its digest will be different, so one could get the latest image by using the tag.

The advantage with using the image digest is that it helps with reproducible results, such as benchmarks and tests.

You may find this blog post interesting to read.