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

CircleCI #41

Merged
merged 4 commits into from
Jun 17, 2019
Merged

CircleCI #41

merged 4 commits into from
Jun 17, 2019

Conversation

kba
Copy link
Member

@kba kba commented Jun 17, 2019

Replace Travis CI with Circle CI based on Ubuntu 18.04 docker container.

@kba kba requested review from bertsky and wrznr June 17, 2019 12:03
Copy link
Contributor

@wrznr wrznr left a comment

Choose a reason for hiding this comment

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

PR of the month!

@kba kba merged commit 065082a into master Jun 17, 2019
@kba kba deleted the circleci branch June 17, 2019 13:39
@bertsky
Copy link
Collaborator

bertsky commented Jun 18, 2019

Thanks @kba!

Unfortunately, I cannot get circleci-cli local execute --job build-python36 running. It complains there is no git installed – right in the checkout step. I tried adding a command step for apt-get install -y git before that, but then it cannot locate any packages – and checkout must be first according to the docs. I have also tried adding a second container image circleci/python:3.6, but that does not change a thing.

The problem seems to be that the vanilla ubuntu docker image does not have git installed, only the circleci/* images do. In the server/non-local setup, the log clearly states:

Either git or ssh (required by git to clone through SSH) is not installed in the image. Falling back to CircleCI's native git client but the behavior may be different from official git. If this is an issue, please use an image that has official git and ssh installed.

So, I guess circleci-cli is not an option for us, but we can now trust that docker run ocrd/tesserocr "make PYTHON=python3 PIP=pip3 test" will yield the same result like the CI test from now on, right?

@kba
Copy link
Member Author

kba commented Jun 18, 2019

I cannot run circleci here because of firewall woes (apt-get connections time out)

I tried adding a command step for apt-get install -y git before that, but then it cannot locate any packages

Did you run apt-get update before apt-get install -y git?

docker run ocrd/tesserocr "make PYTHON=python3 PIP=pip3 test"

Again cannot test it here for the same reason (docker network not bridged through or something). But since ocrd/tesserocr is based on ocrd/core, which in turn is based on ubuntu:18.04 yes this should have the same behavior.

I have to revisit the docker setup from another location soon. Would probably make sense to base even the CI docker images on ocrd/core to make the process even more consistent.

@bertsky
Copy link
Collaborator

bertsky commented Jun 18, 2019

Did you run apt-get update before apt-get install -y git?

No. But if I do, then it does work with circleci-cli!

Would probably make sense to base even the CI docker images on ocrd/core to make the process even more consistent.

Why not just the ocrd/tesserocr docker image? This should be way faster, and even more consistent, no?

(Strangely, if I do this, replacing ubuntu with the ocrd/tesserocr image, I end up with all tests failing because Python cannot import ocrd.resolver – although ocrd==1.0.0b8 is installed, and despite getting all tests succeeding via docker interactively.)

@kba
Copy link
Member Author

kba commented Jun 18, 2019

Why not just the ocrd/tesserocr docker image? This should be way faster, and even more consistent, no?

Would be possible but I find that confusing since for testing I don't want any older duplicates of the same code in the container.

Why it actually fails I cannot say. Automatic building of docker containers on docker.hub is patchy apparently, ocrd-tesserocr was last built 2 months ago, there are no autobuilds for ocrd/core at all apparently. Need to investigate this further from a less restricted network, c.f. #44

@bertsky
Copy link
Collaborator

bertsky commented Jun 18, 2019

I see. Thanks for explaining!

BTW, I installed circleci-cli via GH releases (just download+unpack) – I don't think there is an apt pkg for it anywhere.

@kba
Copy link
Member Author

kba commented Jun 18, 2019

The apt-get errors are from docker, installing circleci-cli works fine.

@bertsky
Copy link
Collaborator

bertsky commented Jun 18, 2019

The apt-get errors are from docker, installing circleci-cli works fine.

Oh, now I get it.

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.

3 participants