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

Build Docker image upon GitHub version tag #40

Open
bdwilliamson opened this issue May 21, 2021 · 7 comments
Open

Build Docker image upon GitHub version tag #40

bdwilliamson opened this issue May 21, 2021 · 7 comments
Labels
enhancement New feature or request

Comments

@bdwilliamson
Copy link
Collaborator

It'd be great to have this functionality. It seems like it should go in .travis.yml, but I'm not sure where. Another option is to configure automatic builds on DockerHub, but that seems less satisfying.

@bdwilliamson bdwilliamson added the enhancement New feature or request label May 21, 2021
@benkeser
Copy link
Owner

Well, the image will definitely build on travis for a version that is tagged, because tags are just specific commits and all commits to master are built. It's a matter of tagging the release on docker hub.

Alternatively, we could create a dev branch that we check builds of on travis, but do not push to DockerHub. That way :latest container will always be a stable build from master.

@bdwilliamson
Copy link
Collaborator Author

Hmm, then something's afoot, because the latest build on DockerHub is from 22 days ago and I tagged a release on GitHub 14 days ago.

In the first workflow, would you have to manually tag releases on DockerHub to have them harmonized? If we can set up a way to auto-tag releases on DockerHub (that are also tagged on GitHub), that would be great.

I like the second workflow with dev, but ideally we would also have the auto-tagging feature.

@benkeser
Copy link
Owner

It may only build with PRs that I merge? I’m not sure actually. Don’t understand precisely how Travis does the verification of the encrypted credentials.

@bdwilliamson
Copy link
Collaborator Author

Reviving this issue because the PR you merged yesterday didn't trigger a Travis build; downstream effects are no update to the book and no update to the Docker image.

Unclear if this is related, but something (I think the correlates repo) ate up all of my Travis credits, so it's possible that this will never run while correlates builds are happening? Perhaps we should switch to GitHub Actions (which I've seen other people do recently)?

@benkeser
Copy link
Owner

Yeah it may be the case that I've used all my travis credits. Could you run (for now) the build scripts locally and push to docker hub, gh-pages, etc?

@bdwilliamson
Copy link
Collaborator Author

Sure, that seems like a good option. I'll leave the issue open in case we want to come back to this later.

@bdwilliamson
Copy link
Collaborator Author

I can update the book but I can't push to Docker Hub (I don't have the password for slapnap). Not sure if there is a secure way to share the password, but that's probably the easiest option (unless you want to build locally and push to Docker Hub yourself).

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

No branches or pull requests

2 participants