summaryrefslogtreecommitdiff
path: root/automated/linux/docker
diff options
context:
space:
mode:
Diffstat (limited to 'automated/linux/docker')
-rwxr-xr-xautomated/linux/docker/docker.sh29
-rw-r--r--automated/linux/docker/docker.yaml5
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: