From f57dfa419bf83a6b6fad7fd4eebb4cbe460593a7 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 27 Mar 2017 00:01:15 +0300 Subject: Move docker scripts into separate files. Rename scripts from travis* to docker*. --- .travis.yml | 8 +------- tools/ci/scripts/docker_incontainer.sh | 8 ++++++++ tools/ci/scripts/docker_run.sh | 9 +++++++++ tools/ci/scripts/travis.docker.sh | 8 -------- 4 files changed, 18 insertions(+), 15 deletions(-) create mode 100755 tools/ci/scripts/docker_incontainer.sh create mode 100755 tools/ci/scripts/docker_run.sh delete mode 100755 tools/ci/scripts/travis.docker.sh diff --git a/.travis.yml b/.travis.yml index 13e29de1d..a378f2280 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,14 +12,8 @@ before_script: - sudo apt-get install docker script: - - docker pull ${IMAGE} - travis_wait 50 sleep infinity & - - docker run - --volume=$(pwd):/build:rw - -e PACKAGES="${PACKAGES}" - -e COMMAND="${COMMAND}" - ${IMAGE} - /bin/sh -x -c "cd /build; pwd; ./tools/ci/scripts/travis.docker.sh" + - ./tools/ci/scripts/docker_run.sh - docker ps -a env: diff --git a/tools/ci/scripts/docker_incontainer.sh b/tools/ci/scripts/docker_incontainer.sh new file mode 100755 index 000000000..55568aa05 --- /dev/null +++ b/tools/ci/scripts/docker_incontainer.sh @@ -0,0 +1,8 @@ +#!/bin/bash -x + +mkdir logs +echo ${PACKAGES} +apt-get update +apt-get install -y -qq ${PACKAGES} +echo ${COMMAND} +${COMMAND} diff --git a/tools/ci/scripts/docker_run.sh b/tools/ci/scripts/docker_run.sh new file mode 100755 index 000000000..8a3add42b --- /dev/null +++ b/tools/ci/scripts/docker_run.sh @@ -0,0 +1,9 @@ +#!/bin/bash -x + +docker pull ${IMAGE} +docker run \ + --volume=$(pwd):/build:rw \ + -e PACKAGES="${PACKAGES}" \ + -e COMMAND="${COMMAND}" \ + ${IMAGE} \ + /bin/sh -x -c "cd /build; pwd; ./tools/ci/scripts/docker_incontainer.sh" diff --git a/tools/ci/scripts/travis.docker.sh b/tools/ci/scripts/travis.docker.sh deleted file mode 100755 index 55568aa05..000000000 --- a/tools/ci/scripts/travis.docker.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -x - -mkdir logs -echo ${PACKAGES} -apt-get update -apt-get install -y -qq ${PACKAGES} -echo ${COMMAND} -${COMMAND} -- cgit v1.2.3-70-g09d2