Conversation
3eae4c2 to
a24f331
Compare
.travis.yml
Outdated
| - compile | ||
| - test |
There was a problem hiding this comment.
What's the separation of these two stages for? Remember #396, I had seen tangible issues with caching between two jobs of the same build... Even if these are the same build chain, the two jobs are entirely separate virtual machines running, and it seemed that -- for the dependencies, as #396 was meant to cache that -- there is some weird nondeterminism...
There was a problem hiding this comment.
The default stages in Travis are: compile, test and deploy. Until now we have not used stages and all jobs were put into the test stage by default.
Stages are sequential, so e.g. the jobs in the deploy stage are only executed when all jobs in the previous test are finished (and passed). That was my aim here: to only build the Docker images and publish them if the previous jobs have succeeded, because otherwise something might be off and we shall not roll out the new Docker images to the public.
This deploy stage in our case is also configured that it is only executed in the original repository (not in the forked ones) and only upon pushes to the master branch (pull requests to the master are also excluded that way).
The compile stage can be omitted and removed, because we do not use it. Initially I have just listed the default stages and it was left there.
There was a problem hiding this comment.
Alright. That distinction is okay with me. I just wanted to get ahead of the possibility of trying to share things between the stages, as I have experienced it not working in the recent past. (We can't really split the "compile" and "test" stages without sharing the build between the two...)
And I agree with running deploy only if we're comfortable with the test stage.
There was a problem hiding this comment.
Yes, Travis has only a limited support to transfer, well, anything between stages. Only solvable with external providers, e.g. with Amazon S3.
https://docs.travis-ci.com/user/build-stages/#data-persistence-between-stages-and-jobs
https://docs.travis-ci.com/user/build-stages/share-files-s3/
Fortunately we do not need this functionality now, the Docker images are built from scratch each time.
(GitLab e.g. performs way better in this aspect, supporting to transfer so called artifacts between jobs and stages.)
There was a problem hiding this comment.
So, should we remove "compile" from the list, and just keep "test"?
There was a problem hiding this comment.
I have removed it now to avoid any possible confusion.
|
So |
Basically yes. To be more precise:
The |
|
As for the web image, as I mentioned in #398 already, perhaps, as it is once again not in the scope of this patch, but you should add a TODO on having the |
|
PR completed, please review. |
whisperity
left a comment
There was a problem hiding this comment.
Looks good to me. I assume we'll have to set Travis up with the appropriate creds.
Already configured in Travis :) |
This PR extends the continuous integration workflow to following the successful compiling and testing of CodeCompass, build the Docker images and publish them to DockerHub, to:
https://hub.docker.com/r/modelcpp/codecompass
The following images are built and published:
modelcpp/codecompass:dev, the development image (ready!)modelcpp/codecompass:runtime-sqlite, the runtime image containing CodeCompass binaries built against SQLite (can be done after Docker runtime image #409 merged)modelcpp/codecompass:runtime-pgsql, the runtime image containing CodeCompass binaries built against PostrgreSQL (can be done after Docker runtime image #409 merged)modelcpp/codecompass:web-sqlite, the webserver executing container image built against SQLite (ready!)modelcpp/codecompass:web-pgsql, the webserver executing container image built against PostgreSQL (can be done after Use PostgreSQL in Docker containers #410 merged)I propose that the default
:latesttag should be an alias to:runtime-pgsql.