Compare commits

..
7 Commits
Author SHA1 Message Date
butomo1989 d6a582ae20 Using the newest base image 2019-09-16 10:58:42 +02:00
ArneandBudi Utomo 120d80f0ab Using scrcpy instead of asm (#188) 2019-09-06 14:11:06 +02:00
Budi UtomoandGitHub 377cb04ca1 Merge pull request #189 from Arne-B/real-device-appium-xterm
Running Appium in xterm window
2019-08-20 11:51:35 +02:00
ArneandGitHub a1f83daf10 Running appium in xterm window
This provides the same behaviour as on the emulator containers
2019-08-14 12:28:04 +02:00
Budi UtomoandGitHub c27ab1d6d6 Merge pull request #186 from vvbogdanov87/genymotion-subnetid
Add subnet_id parameter [Genymotion on AWS]
2019-08-12 14:12:20 +02:00
vvbogdanov87 ca0f85b48f Update genymotion documentation 2019-08-09 13:47:57 -07:00
vvbogdanov87 b1114d9b87 Add subnet_id parameter 2019-08-08 14:49:37 -07:00
8 changed files with 67 additions and 13 deletions
+14
View File
@@ -24,4 +24,18 @@ You can easily scale your Appium tests on Genymotion Android virtual devices in
docker run -it --rm -p 4723:4723 -v $PWD/genymotion/example/sample_devices:/root/tmp -v ~/.aws:/root/.aws -e TYPE=aws budtmo/docker-android-genymotion
```
Existing security group and subnet can be used:
```json
[
{
"region": "us-west-2",
"instance": "t2.small",
"AMI": "ami-0673cbd39ef84d97c",
"SG": "sg-000aaa",
"subnet_id": "subnet-000aaa"
}
]
```
You can also use [this docker-compose file](genymotion/example/geny.yml).
+1 -1
View File
@@ -1,4 +1,4 @@
FROM appium/appium:1.14.0-p0
FROM appium/appium:1.14.2-p0
LABEL maintainer "Budi Utomo <budtmo.os@gmail.com>"
+1 -1
View File
@@ -1,4 +1,4 @@
FROM appium/appium:1.14.0-p0
FROM appium/appium:1.14.2-p0
LABEL maintainer "Budi Utomo <budtmo.os@gmail.com>"
+30 -2
View File
@@ -1,4 +1,4 @@
FROM appium/appium:1.14.0-p0
FROM appium/appium:1.14.2-p0
LABEL maintainer "Budi Utomo <budtmo.os@gmail.com>"
@@ -69,9 +69,38 @@ RUN apt-get -qqy update && apt-get -qqy install --no-install-recommends \
net-tools \
ffmpeg \
jq \
curl \
libavcodec-dev \
libavformat-dev \
libavutil-dev \
gcc \
git \
make \
meson \
musl-dev \
pkgconf \
libsdl2-dev \
&& apt clean all \
&& rm -rf /var/lib/apt/lists/*
#===========
# scrcpy - screen copy
# https://github.com/Genymobile/scrcpy
#===========
ARG SCRCPY_VER=1.10
ARG SERVER_HASH="cbeb1a4e046f1392c1dc73c3ccffd7f86dec4636b505556ea20929687a119390"
RUN mkdir /root/scrcpy
RUN curl -L -o /root/scrcpy/scrcpy-code.zip https://github.com/Genymobile/scrcpy/archive/v${SCRCPY_VER}.zip
RUN curl -L -o /root/scrcpy/scrcpy-server.jar https://github.com/Genymobile/scrcpy/releases/download/v${SCRCPY_VER}/scrcpy-server-v${SCRCPY_VER}.jar
RUN echo "$SERVER_HASH scrcpy/scrcpy-server.jar" | sha256sum -c -
RUN cd scrcpy && unzip -x scrcpy-code.zip
RUN cd scrcpy/scrcpy-${SCRCPY_VER} && meson x --buildtype release --strip -Db_lto=true -Dprebuilt_server=/root/scrcpy/scrcpy-server.jar
RUN cd scrcpy/scrcpy-${SCRCPY_VER}/x && ninja && ninja install
RUN rm -rf scrcpy/
#===========
# Polyverse
# https://polyverse.io/how-it-works/
@@ -156,7 +185,6 @@ EXPOSE 4723 6080 5555
#===================
# Run docker-appium
#===================
COPY sm/asm.jar /root/
COPY src /root/src
COPY supervisord.conf /root/
RUN chmod -R +x /root/src && chmod +x /root/supervisord.conf
BIN
View File
Binary file not shown.
+14 -2
View File
@@ -59,12 +59,17 @@ function prepare_geny_aws() {
instance=$(get_value '.instance')
ami=$(get_value '.AMI')
sg=$(get_value '.SG')
subnet_id=$(get_value '.subnet_id')
if [[ $subnet_id == null ]]; then
subnet_id=""
fi
echo $region
echo $android_version
echo $instance
echo $ami
echo $sg
echo $subnet_id
#TODO: remove this dirty hack
if [[ $android_version == null ]]; then
@@ -183,6 +188,11 @@ variable "instance_type_$index" {
default = "$instance"
}
variable "subnet_id_$index" {
type = "string"
default = "$subnet_id"
}
provider "aws" {
alias = "provider_$index"
region = "\${var.aws_region_$index}"
@@ -214,6 +224,7 @@ resource "aws_instance" "geny_aws_$index" {
provider = "aws.provider_$index"
ami="\${data.aws_ami.geny_aws_$index.id}"
instance_type = "\${var.instance_type_$index}"
subnet_id = "\${var.subnet_id_$index}"
vpc_security_group_ids=["\${aws_security_group.geny_sg_$index.name}"]
key_name = "\${aws_key_pair.geny_key_$index.key_name}"
tags {
@@ -292,8 +303,9 @@ function run_appium() {
CMD+=" --relaxed-security"
fi
echo "Preparation is done"
$CMD
echo "Preparation is done"
TERM="xterm -T AppiumServer -n AppiumServer -e $CMD"
$TERM
}
function ga(){
+2 -2
View File
@@ -3,6 +3,6 @@
if [ -z "$REAL_DEVICE"]; then
echo "Container is using android emulator"
else
echo "Starting android screen mirror..."
java -jar /root/asm.jar $ANDROID_HOME
echo "Starting android screen copy..."
/usr/local/bin/scrcpy
fi
+5 -5
View File
@@ -35,12 +35,12 @@ autorestart=false
priority=1
;startsecs to fix "not expected" error. see: https://github.com/Supervisor/supervisor/issues/212#issuecomment-47933372
[program:android-screen-mirror]
command=./src/asm.sh
autorestart=false
[program:screen-copy]
command=./src/scrcpy.sh
autorestart=true
startsecs=0
stdout_logfile=%(ENV_LOG_PATH)s/android-screen-mirror.stdout.log
stderr_logfile=%(ENV_LOG_PATH)s/android-screen-mirror.stderr.log
stdout_logfile=%(ENV_LOG_PATH)s/screen-copy.stdout.log
stderr_logfile=%(ENV_LOG_PATH)s/screen-copy.stderr.log
priority=3
[program:atd]