Compare commits

...
19 Commits
Author SHA1 Message Date
budtmo d436eb36c1 Removed ATD and cleaned up the code because of ANDROID_HOME 2022-08-19 20:33:19 +02:00
budtmo 3ea820cd99 Using newest base image 1.22.3-p1 2022-08-19 16:31:05 +02:00
Budi UtomoandGitHub b49e96cf93 Merge pull request #328 from clouedoc/patch-1
edit default emulator binary
2022-07-13 16:16:25 +02:00
Camille Louédoc-EyrièsandGitHub 9346afc2da edit default emulator binary 2022-06-25 21:40:42 +02:00
budtmo d58eb73294 Using newest base image with Appium 1.22.3 2022-05-02 10:05:39 +02:00
budtmo 2756b7febc Updated base image that contains Appium 1.22.2 2022-04-25 16:03:44 +02:00
budtmo ee5630f893 Updated base image that contains Appium 1.22.1 2022-04-25 15:49:55 +02:00
budtmo a72a5d1edc Using python 3.8.12 on pipeline 2022-04-08 12:45:34 +02:00
budtmo 9f58ad6bda Dropped polyverse support 2022-04-08 12:35:43 +02:00
Budi UtomoandGitHub 94a3f40ac6 Merge pull request #314 from inez/patch-1
(documentation) Added information about SSHing to the virtual machine
2022-02-16 10:42:41 +01:00
Inez KorczyńskiandGitHub e340223c8c Add information about SSHing to the virtual machine 2021-12-22 16:38:23 -08:00
Budi UtomoandGitHub 77488aea7f Merge pull request #310 from JoelWhitney/joel/android-11-x86_64
Android 11 build issue with 32-bit image
2021-11-17 13:59:23 +01:00
Budi UtomoandGitHub 8f1c4bf1ca Merge branch 'master' into joel/android-11-x86_64 2021-11-17 11:45:03 +01:00
Budi UtomoandGitHub cd63313358 Changed polymorphing llink 2021-11-10 15:03:48 +01:00
Joel Whitney d0f9534e3d Android 11 build issue with 32-bit image 2021-11-04 13:02:32 -04:00
budtmo 7b6bc3fe3e Removed support for Android 5.0.1 and 5.1.1 2021-10-05 10:06:46 +02:00
budtmo 1f1d4ccf49 Using the latest appium version 2021-10-05 10:03:43 +02:00
Budi UtomoandGitHub 8278a3f6ef Merge pull request #303 from syntx/patch-1
Update README_CUSTOM_CONFIG.md
2021-10-05 10:01:38 +02:00
syntxandGitHub 92ea480e55 Update README_CUSTOM_CONFIG.md
This seems like a typo in the documentation, according to: https://github.com/budtmo/docker-android/blob/0a8b7c07a2659fe9bd316bac8c21c506f953620a/src/utils.sh#L60-L62
2021-10-04 23:55:29 +03:00
13 changed files with 37 additions and 99 deletions
+1 -6
View File
@@ -44,8 +44,6 @@ List of Docker images
|OS |Android |API |Browser |Browser version |Chromedriver |Image |Size |
|:---|:---|:---|:---|:---|:---|:---|:---|
|Linux|5.0.1|21|browser|37.0|2.21|budtmo/docker-android-x86-5.0.1|[![](https://images.microbadger.com/badges/image/budtmo/docker-android-x86-5.0.1.svg)](https://microbadger.com/images/budtmo/docker-android-x86-5.0.1 "Get your own image badge on microbadger.com")|
|Linux|5.1.1|22|browser|39.0|2.13|budtmo/docker-android-x86-5.1.1|[![](https://images.microbadger.com/badges/image/budtmo/docker-android-x86-5.1.1.svg)](https://microbadger.com/images/budtmo/docker-android-x86-5.1.1 "Get your own image badge on microbadger.com")|
|Linux|6.0|23|browser|44.0|2.18|budtmo/docker-android-x86-6.0|[![](https://images.microbadger.com/badges/image/budtmo/docker-android-x86-6.0.svg)](https://microbadger.com/images/budtmo/docker-android-x86-6.0 "Get your own image badge on microbadger.com")|
|Linux|7.0|24|chrome|51.0|2.23|budtmo/docker-android-x86-7.0|[![](https://images.microbadger.com/badges/image/budtmo/docker-android-x86-7.0.svg)](https://microbadger.com/images/budtmo/docker-android-x86-7.0 "Get your own image badge on microbadger.com")|
|Linux|7.1.1|25|chrome|55.0|2.28|budtmo/docker-android-x86-7.1.1|[![](https://images.microbadger.com/badges/image/budtmo/docker-android-x86-7.1.1.svg)](https://microbadger.com/images/budtmo/docker-android-x86-7.1.1 "Get your own image badge on microbadger.com")|
@@ -254,11 +252,8 @@ docker exec -it android-container tail -f /var/log/supervisor/docker-android.std
Emulator Skins
--------------
The Emulator skins are taken from [Android Studio IDE](https://developer.android.com/studio) and [Samsung Developer Website](e)
The Emulator skins are taken from [Android Studio IDE](https://developer.android.com/studio) and [Samsung Developer Website](https://developer.samsung.com/)
Security
--------
All docker images are protected by [Polyverse](https://polyverse.io/) by scrambling the Linux packages. For more information please visit [this link](https://youtu.be/eSZNP42n-pM)
Monitoring
----------
+1 -6
View File
@@ -19,7 +19,7 @@ Proxy with authentication
You can set proxy with authentication by passing following environment variable:
- HTTP_PROXY_USER="\<username>"
- HTTPS_PROXY_PASSWORD="\<password>"
- HTTP_PROXY_PASSWORD="\<password>"
Language
@@ -63,11 +63,6 @@ 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
```
Appium Test Distribution (ATD)
------------------------------
You can enable [ATD](https://github.com/AppiumTestDistribution/AppiumTestDistribution) by passing environment variable ATD=true and bind the port to the host, e.g. -p 4567:4567
SaltStack
---------
+10 -5
View File
@@ -39,7 +39,12 @@ The following instructions are used for OS X. You'll need [docker-machine-parall
4. Enable kvm inside virtual machine
4.0 Check kvm version
4.0 SSH to the machine
```bash
docker-machine ssh vmware-dev
```
4.1 Check kvm version
```bash
# version
$ 10.1
@@ -47,23 +52,23 @@ The following instructions are used for OS X. You'll need [docker-machine-parall
Go to http://tinycorelinux.net/10.x/x86_64/tcz/ and check your kvm version, for version 10.1 is kvm-4.19.10-tinycore64.tcz
4.1. Run as an account other than root to install kvm packages using tce-load.
4.2. Run as an account other than root to install kvm packages using tce-load.
```bash
# su docker
$ tce-load -wi kvm-4.19.10-tinycore64.tcz
```
4.2. Run as root to load kvm module after kvm packages install.
4.3. Run as root to load kvm module after kvm packages install.
```bash
$ sudo modprobe kvm_intel
```
4.3. Check if the kvm device is loaded.
4.4. Check if the kvm device is loaded.
```bash
$ ls /dev/kvm
```
4.4. Check if your CPU supports hardware virtualization now
4.5. Check if your CPU supports hardware virtualization now
```bash
$ egrep -c '(vmx|svm)' /proc/cpuinfo
```
+4 -14
View File
@@ -1,4 +1,4 @@
FROM appium/appium:v1.21.0-p1
FROM appium/appium:v1.22.3-p1
LABEL maintainer "Budi Utomo <budtmo.os@gmail.com>"
@@ -7,18 +7,6 @@ LABEL maintainer "Budi Utomo <budtmo.os@gmail.com>"
#=============
WORKDIR /root
#===========
# Polyverse
# https://polyverse.io/how-it-works/
#===========
ARG TOKEN=xxx
RUN curl -s https://sh.polyverse.io | sh -s install ${TOKEN}; \
if [ $? -eq 0 ]; then \
apt -y update && \
apt-get -y install --reinstall $(dpkg --get-selections | awk '{print $1}'); \
fi
#==================
# General Packages
#------------------
@@ -195,7 +183,7 @@ EXPOSE 4723 6080 5554 5555
#======================
# Add Emulator Devices
#======================
COPY devices /root/devices
COPY devices ${ANDROID_HOME}/devices
#===================
# Run docker-appium
@@ -207,4 +195,6 @@ RUN chmod -R +x /root/src && chmod +x /root/supervisord.conf
HEALTHCHECK --interval=2s --timeout=40s --retries=1 \
CMD timeout 40 adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done'
RUN ln -s ${ANDROID_HOME}/emulator/emulator /usr/bin/
CMD /usr/bin/supervisord --configuration supervisord.conf
+2 -14
View File
@@ -1,4 +1,4 @@
FROM appium/appium:v1.21.0-p1
FROM appium/appium:v1.22.3-p1
LABEL maintainer "Budi Utomo <budtmo.os@gmail.com>"
@@ -7,18 +7,6 @@ LABEL maintainer "Budi Utomo <budtmo.os@gmail.com>"
#=============
WORKDIR /root
#===========
# Polyverse
# https://polyverse.io/how-it-works/
#===========
ARG TOKEN=xxx
RUN curl -s https://sh.polyverse.io | sh -s install ${TOKEN}; \
if [ $? -eq 0 ]; then \
apt -y update && \
apt-get -y install --reinstall $(dpkg --get-selections | awk '{print $1}'); \
fi
#==================
# General Packages
#------------------
@@ -180,5 +168,5 @@ EXPOSE 4723 6080 5555
COPY src /root/src
COPY supervisord.conf /root/
RUN chmod -R +x /root/src && chmod +x /root/supervisord.conf /root/geny_start.sh
RUN gmsaas config set android-sdk-path /root
RUN gmsaas config set android-sdk-path ${ANDROID_HOME}
CMD ["./geny_start.sh"]
+1 -13
View File
@@ -1,4 +1,4 @@
FROM appium/appium:v1.21.0-p1
FROM appium/appium:v1.22.3-p1
LABEL maintainer "Budi Utomo <budtmo.os@gmail.com>"
@@ -7,18 +7,6 @@ LABEL maintainer "Budi Utomo <budtmo.os@gmail.com>"
#=============
WORKDIR /root
#===========
# Polyverse
# https://polyverse.io/how-it-works/
#===========
ARG TOKEN=xxx
RUN curl -s https://sh.polyverse.io | sh -s install ${TOKEN}; \
if [ $? -eq 0 ]; then \
apt -y update && \
apt-get -y install --reinstall $(dpkg --get-selections | awk '{print $1}'); \
fi
#==================
# General Packages
#------------------
+3 -7
View File
@@ -10,10 +10,6 @@ jobs:
strategy:
maxParallel: 10
matrix:
5.0.1:
android.version: '5.0.1'
5.1.1:
android.version: '5.1.1'
6.0:
android.version: '6.0'
7.0:
@@ -35,8 +31,8 @@ jobs:
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.5'
displayName: 'Use Python 3.5'
versionSpec: '3.8.12'
displayName: 'Use Python 3.8.12'
- script: |
latest_tag=$(git describe --tags --abbrev=0)
@@ -46,7 +42,7 @@ jobs:
- script: |
docker login -u $(DOCKER_USERNAME) -p=$(DOCKER_PASSWORD)
TOKEN=$(polyverse_token) ./release.sh all $(android.version) $(release_version)
./release.sh all $(android.version) $(release_version)
docker logout
displayName: 'Build docker image, run unit tests and push the docker image'
+3 -3
View File
@@ -17,8 +17,8 @@ jobs:
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.5'
displayName: 'Use Python 3.5'
versionSpec: '3.8.12'
displayName: 'Use Python 3.8.12'
- script: |
latest_tag=$(git describe --tags --abbrev=0)
@@ -28,7 +28,7 @@ jobs:
- script: |
docker login -u $(DOCKER_USERNAME) -p=$(DOCKER_PASSWORD)
TOKEN=$(p_token) $(script.name) all $(release_version)
$(script.name) all $(release_version)
docker logout
displayName: 'Build docker image, run unit tests and push the docker image'
+2 -2
View File
@@ -19,8 +19,8 @@ jobs:
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.5'
displayName: 'Use Python 3.5'
versionSpec: '3.8.12'
displayName: 'Use Python 3.8.12'
- script: pip install -r requirements.txt
displayName: 'Install pip packages'
- script: ./release.sh test 7.1.1 $(app_version)
+6 -12
View File
@@ -10,7 +10,7 @@ else
fi
if [ -z "$2" ]; then
read -p "Android version (5.0.1|5.1.1|6.0|7.0|7.1.1|8.0|8.1|9.0|10.0|11.0|12.0|all): " ANDROID_VERSION
read -p "Android version (6.0|7.0|7.1.1|8.0|8.1|9.0|10.0|11.0|12.0|all): " ANDROID_VERSION
else
ANDROID_VERSION=$2
fi
@@ -22,8 +22,6 @@ else
fi
declare -A list_of_levels=(
[5.0.1]=21
[5.1.1]=22
[6.0]=23
[7.0]=24
[7.1.1]=25
@@ -38,8 +36,6 @@ declare -A list_of_levels=(
# The version of the Chrome browser installed on the Android emulator needs to be known beforehand
# in order to chose the proper version of chromedriver (see http://chromedriver.chromium.org/downloads)
declare -A chromedriver_versions=(
[5.0.1]="2.21"
[5.1.1]="2.13"
[6.0]="2.18"
[7.0]="2.23"
[7.1.1]="2.28"
@@ -68,7 +64,7 @@ function get_android_versions() {
# If version cannot be found in the list
if [ -z "$versions" ]; then
echo "Android version \"$ANDROID_VERSION\" is not found in the list or not supported! Support only version 5.0.1, 5.1.1, 6.0, 7.0, 7.1.1, 8.0, 8.1, 9.0, 10.0, 11.0, 12.0"
echo "Android version \"$ANDROID_VERSION\" is not found in the list or not supported! Support only version 6.0, 7.0, 7.1.1, 8.0, 8.1, 9.0, 10.0, 11.0, 12.0"
exit 1
fi
@@ -146,10 +142,7 @@ function build() {
level=${list_of_levels[$v]}
# Find image type and default web browser
if [ "$v" == "5.0.1" ] || [ "$v" == "5.1.1" ]; then
IMG_TYPE=default
BROWSER=browser
elif [ "$v" == "6.0" ]; then
if [ "$v" == "6.0" ]; then
# It is because there is no ARM EABI v7a System Image for 6.0
IMG_TYPE=google_apis
BROWSER=browser
@@ -160,8 +153,9 @@ function build() {
#adb root cannot be run in IMG_TYPE=google_apis_playstore
IMG_TYPE=google_apis
BROWSER=chrome
# Google dropped 32-bit support at Android 12
if [ "$v" == "9.0" ] || [ $level -ge 31 ]; then
# Android 9 & Android 11 had build issues that requires 64-bit
# Android 12+ Google dropped 32-bit support
if [ "$v" == "9.0" ] || [ $level -ge 30 ]; then
processor=x86_64
fi
fi
+4 -4
View File
@@ -98,12 +98,12 @@ def prepare_avd(device: str, avd_name: str, dp_size: str):
profile_dst_path = os.path.join(ROOT, '.android', 'devices.xml')
if 'samsung' in device.lower():
# profile file name = skin name
profile_src_path = os.path.join(ROOT, 'devices', 'profiles', '{profile}.xml'.format(profile=skin_name))
profile_src_path = os.path.join(ANDROID_HOME, 'devices', 'profiles', '{profile}.xml'.format(profile=skin_name))
logger.info('Hardware profile resource path: {rsc}'.format(rsc=profile_src_path))
logger.info('Hardware profile destination path: {dst}'.format(dst=profile_dst_path))
symlink_force(profile_src_path, profile_dst_path)
avd_path = '/'.join([ANDROID_HOME, 'android_emulator'])
avd_path = '/'.join([ROOT, 'android_emulator'])
creation_cmd = 'avdmanager create avd -f -n {name} -b {img_type}/{sys_img} -k "system-images;android-{api_lvl};' \
'{img_type};{sys_img}" -d {device} -p {path}'.format(name=avd_name, img_type=IMG_TYPE,
sys_img=SYS_IMG,
@@ -226,10 +226,10 @@ def run():
if is_first_run:
logger.info('Emulator was not previously initialized. Preparing a new one...')
cmd = 'emulator/emulator @{name} -gpu swiftshader_indirect -accel on -wipe-data -writable-system -verbose {custom_args}'.format(name=avd_name, custom_args=custom_args)
cmd = 'emulator @{name} -gpu swiftshader_indirect -accel on -wipe-data -writable-system -verbose {custom_args}'.format(name=avd_name, custom_args=custom_args)
else:
logger.info('Using previously initialized AVD...')
cmd = 'emulator/emulator @{name} -gpu swiftshader_indirect -accel on -verbose -writable-system {custom_args}'.format(name=avd_name, custom_args=custom_args)
cmd = 'emulator @{name} -gpu swiftshader_indirect -accel on -verbose -writable-system {custom_args}'.format(name=avd_name, custom_args=custom_args)
appium = convert_str_to_bool(str(os.getenv('APPIUM', False)))
if appium:
-6
View File
@@ -1,6 +0,0 @@
#!/bin/bash
if [ "$ATD" = true ]; then
echo "Starting ATD..."
java -jar /root/RemoteAppiumManager.jar -DPort=4567
fi
-7
View File
@@ -42,13 +42,6 @@ stdout_logfile=%(ENV_LOG_PATH)s/screen-copy.stdout.log
stderr_logfile=%(ENV_LOG_PATH)s/screen-copy.stderr.log
priority=3
[program:atd]
command=./src/atd.sh
autorestart=false
stdout_logfile=%(ENV_LOG_PATH)s/atd.stdout.log
stderr_logfile=%(ENV_LOG_PATH)s/atd.stderr.log
priority=4
[program:docker-appium]
command=./src/appium.sh
autorestart=false