From 4d4c22124f519d4c0ba8b9fce17cacde359fc346 Mon Sep 17 00:00:00 2001 From: budtmo Date: Fri, 1 Mar 2019 12:46:50 +0100 Subject: [PATCH] Added SaltStack --- README_CUSTOM_CONFIG.md | 5 +++++ docker/Emulator_x86 | 2 +- docker/Genymotion | 2 +- docker/Real_device | 2 +- src/appium.sh | 12 ++++++++++++ 5 files changed, 20 insertions(+), 3 deletions(-) diff --git a/README_CUSTOM_CONFIG.md b/README_CUSTOM_CONFIG.md index 3699eb6..11186f0 100644 --- a/README_CUSTOM_CONFIG.md +++ b/README_CUSTOM_CONFIG.md @@ -31,6 +31,11 @@ If you want to add more arguments for running emulator, you can ***pass an envir docker run --privileged -d -p 6080:6080 -p 4723:4723 -p 5554:5554 -p 5555:5555 -e DEVICE="Samsung Galaxy S6" -e EMULATOR_ARGS="-no-snapshot-load -partition-size 512" --name android-container budtmo/docker-android-x86-8.1 ``` +SaltStack +--------- + +You can enable [SaltStack](https://github.com/saltstack/salt) to control running containers by passing environment variable SALT_MASTER=. + Back & Restore -------------- diff --git a/docker/Emulator_x86 b/docker/Emulator_x86 index 2c48d56..2c3fa4a 100644 --- a/docker/Emulator_x86 +++ b/docker/Emulator_x86 @@ -1,4 +1,4 @@ -FROM appium/appium:1.11.1-p0 +FROM appium/appium:1.11.1-p1 LABEL maintainer "Budi Utomo " diff --git a/docker/Genymotion b/docker/Genymotion index 8845611..9f981b4 100644 --- a/docker/Genymotion +++ b/docker/Genymotion @@ -1,4 +1,4 @@ -FROM appium/appium:1.11.1-p0 +FROM appium/appium:1.11.1-p1 LABEL maintainer "Budi Utomo " diff --git a/docker/Real_device b/docker/Real_device index f3a27d7..9ccb66d 100644 --- a/docker/Real_device +++ b/docker/Real_device @@ -1,4 +1,4 @@ -FROM appium/appium:1.11.1-p0 +FROM appium/appium:1.11.1-p1 LABEL maintainer "Budi Utomo " diff --git a/src/appium.sh b/src/appium.sh index 8f4f99f..365e8f0 100644 --- a/src/appium.sh +++ b/src/appium.sh @@ -312,7 +312,19 @@ function ga(){ fi } +function saltstack(){ + if [ ! -z "${SALT_MASTER}" ]; then + echo "ENV SALT_MASTER it not empty, salt-minion will be prepared" + echo "master: ${SALT_MASTER}" >> /etc/salt/minion + salt-minion & + echo "salt-minion is running..." + else + echo "SaltStack is disabled" + fi +} + ga +saltstack if [ "$REAL_DEVICE" = true ]; then echo "Using real device" run_appium