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

docker experiment in travis #4526

Merged
merged 10 commits into from Oct 26, 2018
Merged

docker experiment in travis #4526

merged 10 commits into from Oct 26, 2018

Conversation

reaperhulk
Copy link
Member

No description provided.

@reaperhulk reaperhulk force-pushed the travis-docker branch 5 times, most recently from 7a40380 to a573161 Compare October 25, 2018 07:41
@reaperhulk
Copy link
Member Author

Everything works here except coverage is being written as root inside the container so when coverage is submitted outside of it nothing is found. pyca/infra#190 will make it so we can just use -u travis and get the same uid/gid travis uses and bypass this whole complicated web of permissions shenanigans.

.travis/install.sh Show resolved Hide resolved
.travis/run.sh Outdated
if [ -n "${DOCKER}" ]; then
# We will be able to drop the -u once we switch the default container user in the
# dockerfiles.
docker run -u 2000:2000 -v "${TRAVIS_BUILD_DIR}":"${TRAVIS_BUILD_DIR}" -v "${HOME}/wycheproof":/wycheproof -e TOXENV "${DOCKER}" /bin/sh -c "cd ${TRAVIS_BUILD_DIR};tox -- --wycheproof-root='/wycheproof'"
Copy link
Member

Choose a reason for hiding this comment

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

Can you add some line breaks so this is readable

Copy link
Member Author

Choose a reason for hiding this comment

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

Precious bytes.

Copy link
Member

Choose a reason for hiding this comment

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

You know I love wantonly wasting bytes

.travis.yml Outdated
- python: 3.6
services: docker
env: TOXENV=py36 DOCKER=pyca/cryptography-runner-ubuntu-rolling
- python: 3.6
Copy link
Member

Choose a reason for hiding this comment

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

Is this actually 3.6 in any sense?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's whatever python is. Just confirmed that it is 2.7. We could alter randomorder to ask for python3 and then it'd be 3.6, but as is I'll change it to say 2.7.

.travis/run.sh Outdated
docker run -u 2000:2000 -v "${TRAVIS_BUILD_DIR}":"${TRAVIS_BUILD_DIR}" \
-v "${HOME}/wycheproof":/wycheproof \
-e TOXENV "${DOCKER}" \
/bin/sh -c "cd ${TRAVIS_BUILD_DIR};tox -- --wycheproof-root='/wycheproof'"
Copy link
Member

Choose a reason for hiding this comment

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

space after ; please

.travis/run.sh Outdated
@@ -25,7 +25,10 @@ source ~/.venv/bin/activate
if [ -n "${DOCKER}" ]; then
# We will be able to drop the -u once we switch the default container user in the
# dockerfiles.
docker run -u 2000:2000 -v "${TRAVIS_BUILD_DIR}":"${TRAVIS_BUILD_DIR}" -v "${HOME}/wycheproof":/wycheproof -e TOXENV "${DOCKER}" /bin/sh -c "cd ${TRAVIS_BUILD_DIR};tox -- --wycheproof-root='/wycheproof'"
docker run -u 2000:2000 -v "${TRAVIS_BUILD_DIR}":"${TRAVIS_BUILD_DIR}" \
Copy link
Member

Choose a reason for hiding this comment

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

can you move the volume onto it's own line

alex
alex previously approved these changes Oct 26, 2018
.travis/run.sh Outdated
-v "${TRAVIS_BUILD_DIR}":"${TRAVIS_BUILD_DIR}" \
-v "${HOME}/wycheproof":/wycheproof \
-e TOXENV "${DOCKER}" \
/bin/sh -c "cd ${TRAVIS_BUILD_DIR}; tox -- --wycheproof-root='/wycheproof'"
Copy link
Member

Choose a reason for hiding this comment

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

Can you use -w to docker instead of cd

alex
alex previously approved these changes Oct 26, 2018
@alex alex merged commit cf00824 into pyca:master Oct 26, 2018
@reaperhulk reaperhulk deleted the travis-docker branch October 30, 2018 04:38
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants