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
Conversation
7a40380
to
a573161
Compare
a573161
to
b1d3100
Compare
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 |
.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'" |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Precious bytes.
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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'" |
There was a problem hiding this comment.
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}" \ |
There was a problem hiding this comment.
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
.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'" |
There was a problem hiding this comment.
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
No description provided.