binder-examples / continuous-build

Show how to use continuous integration to test your dependency specifications
BSD 3-Clause "New" or "Revised" License
8 stars 10 forks source link

Travis setup #13

Open betatim opened 6 years ago

betatim commented 6 years ago

@matthewfeickert made https://github.com/matthewfeickert/R-in-Jupyter-with-Binder which uses travis. It would be nice to work out how much of it we can take over here to replicate what is happening on circle CI but use travis instead.

matthewfeickert commented 6 years ago

@betatim Okay, so if I understand the point of this project correctly, the idea is a CD with repo2docker to deploy pushes to master as Docker images to Docker Hub. So in the same way that Binder allows users to run interactively on the web, this allows users to pull the same Docker image that Binder is using. Do I have that right?

If so, then I can start to check out what has been done and start migrating the CircleCI to Travis later this week.

To be clear, my .travis.yml probably won't be very helpful as it is just meant to provide enough CI to do tests. There is no CD component there.

betatim commented 6 years ago

The primary goal of this example repository is to show how you can setup CI to test that you can still build a useful container image from your repository. Use case: you binderize your repository, then make lots of changes, now your repository doesn't build any more. Or the way you specified dependencies isn't good enough so with some update somewhere it stops working, etc

Pushing the built image to (docker)hub is a cool feature that we get for free.

So the thing to do here is to setup a travis build that uses repo2docker to build the container for the repository. Then we can extend it to push the image to a container registry. Another thing that would be good to illustrate (and is done in very basic terms in #8) is to not only build the container but try and execute something in. What to execute depends heavily on the contents of the repository, but we can show how to in general run things. This is useful because it tells you if there are missing dependencies or other misconfigurations.

jhamman commented 5 years ago

FWIW, I've have a working CD setup using travis, repo2docker, and pushing to dockerhub here: https://github.com/pangeo-data/pangeo-stacks

betatim commented 5 years ago

Nice! Do you want to add a link to it or (even better) add a .travis.yml to this repo based on your work there?