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

Set up continuous integration #5

Open
wants to merge 23 commits into
base: master
Choose a base branch
from
Open

Conversation

dzhoshkun
Copy link
Contributor

Closes #2

@dzhoshkun dzhoshkun added the wip - do not merge Worn In Progress -- do not merge label Sep 6, 2019
…e its creation in registry"

This reverts commit eff3657.
…on to force building of Docker image"

This reverts commit 1aa1b28.
@dzhoshkun dzhoshkun changed the title [WIP] Set up continuous integration Set up continuous integration Sep 24, 2019
@dzhoshkun dzhoshkun removed the wip - do not merge Worn In Progress -- do not merge label Sep 24, 2019
@dzhoshkun dzhoshkun requested a review from rmileskcl September 24, 2019 15:39
@dzhoshkun dzhoshkun requested a review from joubs October 17, 2019 11:41
@joubs
Copy link
Contributor

joubs commented Oct 21, 2019

Hi both,

I have doubts about the docker images tags : during setup job we tag the new image with the current branch name, while we pull the "master" docker image during test job, is it an expected behavior?

I also read some warnings about using the dind service, I pursue my investigations and leave two interesting links :

https://jpetazzo.github.io/2015/09/03/do-not-use-docker-in-docker-for-ci/
https://blog.callr.tech/building-docker-images-with-gitlab-ci-best-practices/

ci/docker/linux/Dockerfile Outdated Show resolved Hide resolved
DEBIAN_FRONTEND=noninteractive apt-get install -y \
tzdata \
git-core \
python3.7 \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should be specifying version numbers here to ensure that subsequent builds are the same - the only problem is that these versions aren't available indefinitely from the apt repositories, causing failed builds later on.
I'm not sure what the best solution is for this - I think for now it's okay, but in the future if we were to be more strict then we may have to come up with a more permanent (non trivial!) solution

.gitlab-ci.yml Show resolved Hide resolved
@rmileskcl
Copy link
Contributor

Hi Francois,

Good point regarding your concern with our tags - I think we could change registry.gitlab.com/gift-surg/puma/puma-ci-linux:master to be registry.gitlab.com/gift-surg/puma/puma-ci-linux:${CI_COMMIT_REF_SLUG} so that it always references the current branch.
9 times out of 10 this probably wont make any difference but will mean any changes to the Dockerfile will be picked up automatically.

Regarding DIND, it's certainly not an ideal solution, or one that I'd like to use if we were doing anything complicated but it's Gitlab's recommended method. It does have the drawback of not making use of the Docker cache which would speed up builds. Perhaps we could look at running them directly on Gift-Little instead? I think that would take some re-configuring of the CI runner but could be done.

@dzhoshkun
Copy link
Contributor Author

The built and used Docker image paths are now identical.

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

Successfully merging this pull request may close these issues.

Set up continuous integration
3 participants