diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2018-10-26 10:39:35 +0800 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2018-10-25 22:39:35 -0400 |
commit | cf0082478d6dfa2d7f42df52bb2a2c6de9ebb333 (patch) | |
tree | f761439f76f41a57d0497f5d0e30b8bb8ea0f268 /.travis | |
parent | 57c3a18a1eae4364dbd55b14478030fc1dc586b3 (diff) | |
download | cryptography-cf0082478d6dfa2d7f42df52bb2a2c6de9ebb333.tar.gz cryptography-cf0082478d6dfa2d7f42df52bb2a2c6de9ebb333.tar.bz2 cryptography-cf0082478d6dfa2d7f42df52bb2a2c6de9ebb333.zip |
run docker builds in travis instead of jenkins (#4526)
* docker experiment in travis
* let's run 'em all
* okay run as travis
* fine just use a number
* remove xenial since we test that elsewhere
* suspicion
* review feedback
* more comments
* use workdir
* heavy sigh
Diffstat (limited to '.travis')
-rwxr-xr-x | .travis/install.sh | 8 | ||||
-rwxr-xr-x | .travis/run.sh | 11 | ||||
-rwxr-xr-x | .travis/upload_coverage.sh | 2 |
3 files changed, 19 insertions, 2 deletions
diff --git a/.travis/install.sh b/.travis/install.sh index 20a88312..def7343b 100755 --- a/.travis/install.sh +++ b/.travis/install.sh @@ -46,6 +46,14 @@ elif [ -n "${LIBRESSL}" ]; then fi fi +if [ -n "${DOCKER}" ]; then + if [ -n "${OPENSSL}" ] || [ -n "${LIBRESSL}" ]; then + echo "OPENSSL and LIBRESSL are not allowed when DOCKER is set." + exit 1 + fi + docker pull "$DOCKER" +fi + if [ -z "${DOWNSTREAM}" ]; then git clone --depth=1 https://github.com/google/wycheproof "$HOME/wycheproof" fi diff --git a/.travis/run.sh b/.travis/run.sh index 5e0e56df..8f8dd687 100755 --- a/.travis/run.sh +++ b/.travis/run.sh @@ -22,7 +22,16 @@ fi source ~/.venv/bin/activate -if [ -n "${TOXENV}" ]; then +if [ -n "${DOCKER}" ]; then + # We will be able to drop the -u once we switch the default container user in the + # dockerfiles. + docker run --rm -u 2000:2000 \ + -v "${TRAVIS_BUILD_DIR}":"${TRAVIS_BUILD_DIR}" \ + -v "${HOME}/wycheproof":/wycheproof \ + -w "${TRAVIS_BUILD_DIR}" \ + -e TOXENV "${DOCKER}" \ + /bin/sh -c "tox -- --wycheproof-root='/wycheproof'" +elif [ -n "${TOXENV}" ]; then tox -- --wycheproof-root="$HOME/wycheproof" else downstream_script="${TRAVIS_BUILD_DIR}/.travis/downstream.d/${DOWNSTREAM}.sh" diff --git a/.travis/upload_coverage.sh b/.travis/upload_coverage.sh index e960907e..2f2cb3c1 100755 --- a/.travis/upload_coverage.sh +++ b/.travis/upload_coverage.sh @@ -11,7 +11,7 @@ if [ -n "${TOXENV}" ]; then docs);; *) source ~/.venv/bin/activate - codecov --env TRAVIS_OS_NAME,TOXENV,OPENSSL + codecov --env TRAVIS_OS_NAME,TOXENV,OPENSSL,DOCKER ;; esac fi |