Passed chrome driver version through environment variable
This commit is contained in:
parent
e22b8f141e
commit
e4180a6e65
|
@ -89,12 +89,14 @@ ARG PROCESSOR=x86
|
||||||
ARG SYS_IMG=x86
|
ARG SYS_IMG=x86
|
||||||
ARG IMG_TYPE=google_apis
|
ARG IMG_TYPE=google_apis
|
||||||
ARG BROWSER=android
|
ARG BROWSER=android
|
||||||
|
ARG CHROME_DRIVER=24
|
||||||
ENV ANDROID_VERSION=$ANDROID_VERSION \
|
ENV ANDROID_VERSION=$ANDROID_VERSION \
|
||||||
API_LEVEL=$API_LEVEL \
|
API_LEVEL=$API_LEVEL \
|
||||||
PROCESSOR=$PROCESSOR \
|
PROCESSOR=$PROCESSOR \
|
||||||
SYS_IMG=$SYS_IMG \
|
SYS_IMG=$SYS_IMG \
|
||||||
IMG_TYPE=$IMG_TYPE \
|
IMG_TYPE=$IMG_TYPE \
|
||||||
BROWSER=$BROWSER
|
BROWSER=$BROWSER \
|
||||||
|
CHROME_DRIVER=2.40
|
||||||
ENV PATH ${PATH}:${ANDROID_HOME}/build-tools
|
ENV PATH ${PATH}:${ANDROID_HOME}/build-tools
|
||||||
RUN yes | sdkmanager --licenses && \
|
RUN yes | sdkmanager --licenses && \
|
||||||
sdkmanager "platforms;android-${API_LEVEL}" "system-images;android-${API_LEVEL};${IMG_TYPE};${SYS_IMG}" "emulator"
|
sdkmanager "platforms;android-${API_LEVEL}" "system-images;android-${API_LEVEL};${IMG_TYPE};${SYS_IMG}" "emulator"
|
||||||
|
@ -103,8 +105,7 @@ RUN yes | sdkmanager --licenses && \
|
||||||
# Download latest version of chromedriver
|
# Download latest version of chromedriver
|
||||||
# to be able to use Chrome browser in emulator
|
# to be able to use Chrome browser in emulator
|
||||||
#==============================================
|
#==============================================
|
||||||
RUN LATEST_VERSION=$(curl -s https://chromedriver.storage.googleapis.com/LATEST_RELEASE) \
|
RUN wget -nv -O chrome.zip "https://chromedriver.storage.googleapis.com/${CHROME_DRIVER}/chromedriver_linux64.zip" \
|
||||||
&& wget -nv -O chrome.zip "https://chromedriver.storage.googleapis.com/$LATEST_VERSION/chromedriver_linux64.zip" \
|
|
||||||
&& unzip -x chrome.zip \
|
&& unzip -x chrome.zip \
|
||||||
&& rm chrome.zip
|
&& rm chrome.zip
|
||||||
|
|
||||||
|
|
|
@ -57,6 +57,7 @@ function get_android_versions() {
|
||||||
|
|
||||||
get_android_versions
|
get_android_versions
|
||||||
processors=x86
|
processors=x86
|
||||||
|
chrome_driver=$(curl -s https://chromedriver.storage.googleapis.com/LATEST_RELEASE)
|
||||||
|
|
||||||
function test() {
|
function test() {
|
||||||
# Prepare needed parameter to run tests
|
# Prepare needed parameter to run tests
|
||||||
|
@ -146,7 +147,7 @@ function build() {
|
||||||
echo "[BUILD] Dockerfile: $FILE_NAME"
|
echo "[BUILD] Dockerfile: $FILE_NAME"
|
||||||
docker build -t $image_version --build-arg ANDROID_VERSION=$v --build-arg API_LEVEL=$level \
|
docker build -t $image_version --build-arg ANDROID_VERSION=$v --build-arg API_LEVEL=$level \
|
||||||
--build-arg PROCESSOR=$p --build-arg SYS_IMG=$sys_img --build-arg IMG_TYPE=$IMG_TYPE \
|
--build-arg PROCESSOR=$p --build-arg SYS_IMG=$sys_img --build-arg IMG_TYPE=$IMG_TYPE \
|
||||||
--build-arg BROWSER=$BROWSER -f $FILE_NAME .
|
--build-arg BROWSER=$BROWSER --build-arg CHROME_DRIVER=$chrome_driver -f $FILE_NAME .
|
||||||
docker tag $image_version $image_latest
|
docker tag $image_version $image_latest
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue