diff options
author | Chase Qi <chase.qi@linaro.org> | 2018-05-11 06:07:49 +0000 |
---|---|---|
committer | Linaro Code Review <review@review.linaro.org> | 2018-05-11 06:07:49 +0000 |
commit | 19a8cfa61fac7c8206aba84b33a87493fa48f250 (patch) | |
tree | 0c85bf87c8cea8097ff7a000f4c92605e6fbf07d | |
parent | ae6d4fca1001bfd0bbf8ed4f84e803c30e2e904e (diff) | |
parent | da181e5c4fc028b3870d3fd2c37d3ad8589e109e (diff) |
Merge "linux/docker: install docker-ce from upstream"
-rwxr-xr-x | automated/linux/docker/docker.sh | 29 | ||||
-rw-r--r-- | automated/linux/docker/docker.yaml | 5 |
2 files changed, 24 insertions, 10 deletions
diff --git a/automated/linux/docker/docker.sh b/automated/linux/docker/docker.sh index a770642..c67a617 100755 --- a/automated/linux/docker/docker.sh +++ b/automated/linux/docker/docker.sh @@ -21,17 +21,28 @@ done ! check_root && error_msg "You need to be root to run this script." create_out_dir "${OUTPUT}" - -dist_name -# shellcheck disable=SC2154 -case "${dist}" in - debian) pkgs="docker-ce" ;; - fedora|centos) pkgs="docker" ;; - *) error_msg "Unsupported distribution" ;; -esac +cd "${OUTPUT}" || exit + +install_docker() { + which docker && return + + dist_name + # shellcheck disable=SC2154 + case "${dist}" in + debian|ubuntu|fedora|centos) + install_deps curl + curl -fsSL get.docker.com -o get-docker.sh + sh get-docker.sh + ;; + *) + warn_msg "No package installation support on ${dist}" + error_msg "And docker not pre-installed, exiting..." + ;; + esac +} skip_list="start-docker-service run-docker-image" -install_deps "${pkgs}" +install_docker exit_on_fail "install-docker" "${skip_list}" skip_list="run-docker-image" diff --git a/automated/linux/docker/docker.yaml b/automated/linux/docker/docker.yaml index c09cc7d..45c4fc5 100644 --- a/automated/linux/docker/docker.yaml +++ b/automated/linux/docker/docker.yaml @@ -1,12 +1,15 @@ metadata: name: docker format: "Lava-Test-Shell Test Definition 1.0" - description: "Ensure that Docker can be used" + description: "Docker smoke test. When docker not pre-installed, + docker-ce will be installed from upstream on supported + distributions." maintainer: - nicolas.dechesne@linaro.org - chase.qi@linaro.org os: - debian + - ubuntu - fedora - centos scope: |