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

CI and release scheme #450

Closed
7 of 9 tasks
eine opened this issue Jun 30, 2018 · 4 comments
Closed
7 of 9 tasks

CI and release scheme #450

eine opened this issue Jun 30, 2018 · 4 comments
Assignees

Comments

@eine
Copy link
Contributor

eine commented Jun 30, 2018

A single master branch is used.

When regular commits are pushed to GitHub:

  • CircleCI:
    • The backend (filebrowser/filebrowser) is built for a single platform.
    • A golang linter (gometalinter) is executed.
  • hub.docker.com:
    • The built-in service is used to build a Docker image, tag it as latest and, if successful, publish it.

When tagged commits are pushed to GitHub:

  • The three tasks above are executed, but the docker image is also tagged with the tag number.
  • CircleCI:

See:


However, it seems that travis-ci.org was used until five months ago: https://travis-ci.org/filebrowser/filebrowser/builds @hacdias, why did you stop using travis-ci as a CI service?


The current approach has the following (minor) caveats:

  • The backend is built multiple times: once in CircleCI for a single platform, several times in CircleCI if it is a release, and once in hub.docker.com if it is a release. Each of the procedures is completely decoupled from the others, so three build pipelines need to be separately maintained.
  • The latest image published in hub.docker.com is not ensured to be functionally correct.
  • The frontend must be built locally, in order to update rice-box.go with the artifacts.
  • Tags are only applied to this repo (filebrowser/filebrowser). Since the organization was created the frontend (filebrowser/frontend) is not tagged anymore: https://github.com/filebrowser/frontend/releases

Moreover, the current proposal in #399:

  • Builds the frontend, the backend and a docker image for each pushed commit in travis-ci.com. If successful, the image is pushed to hub.docker.com/filebrowser/filebrowser.
  • Currently releases/tags are not considered.

So, the build task in CircleCI and the build task in hub.docker.com will be duplicated.


Since all of the steps can be executed in travis-ci.com, I propose to add missing features to #399, and drop CircleCI and hub.docker.com as CI services. These missing features are:


Alternatively, it seems that CircleCI allows to reproduce the builds locally (https://circleci.com/docs/2.0/local-cli/). Therefore, if anyone has enough knowledge to implement an equivalent workflow in CircleCI only, that would be equally acceptable.

@eine eine self-assigned this Jun 30, 2018
@hacdias
Copy link
Member

hacdias commented Jul 1, 2018

@1138-4eb I dropped Travis because it was a lot slower than Circle and in that time it was easier to get the different phases on Circle:

image

But I see now Travis is moving to GitHub Apps. We could try what you suggest and if it works, go for it. But we have to be careful about Caddy build server.

@eine
Copy link
Contributor Author

eine commented Jul 2, 2018

@1138-4eb I dropped Travis because it was a lot slower than Circle and in that time it was easier to get the different phases on Circle.

I expected that. Indeed, CircleCI should still be much faster than Travis, because the latter needs to spin up a "virtual machine" for each stage and then run docker on top of it, while CircleCI is designed to run docker images directly.

However, I think that Travis is offering a better solution from the integration point of view:

BTW, I am setting goreleaser to build docker images with it: https://goreleaser.com/customization/#Docker It seems that, in the very near future, we will be able to create multiarch images: goreleaser/goreleaser#530 So we might close #440 with #399.

Anyway, should anyone know how to integrate everything in a CircleCI config which is equivalent to the .travis.yml I am writing in #399, please let me know.

@hacdias
Copy link
Member

hacdias commented Jul 2, 2018

It sounds good to me. Thanks for all your work here 😃 It's being amazing!

@eine
Copy link
Contributor Author

eine commented Jul 2, 2018

@hacdias just a quick update to let you know that this is almost ready. The only missing part is the Caddy build server issue. I registered, but there is so little info about the build process. So merging #399 will have to wait until we can find a solution.

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

No branches or pull requests

2 participants