Skip to content

Commit

Permalink
Using some parameters from travis as build-args to fix issue appium#49
Browse files Browse the repository at this point in the history
  • Loading branch information
budtmo committed Jun 15, 2017
1 parent 961820f commit a5882a2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ before_install:
- docker -v

script:
- docker build -t "appium/appium:latest" -f Appium/Dockerfile .
- docker build -t "appium/appium:latest" --build-arg SDK_VERSION=$SDK_VERSION \
--build-arg ANDROID_BUILD_TOOLS_VERSION=$ANDROID_BUILD_TOOLS_VERSION \
--build-arg APPIUM_VERSION=$APPIUM_VERSION -f Appium/Dockerfile .
- docker run --rm -v $PWD/Appium/tests:/root/tests "appium/appium:latest" bash tests/run-bats.sh

after_success:
Expand Down
9 changes: 6 additions & 3 deletions Appium/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,10 @@ ENV JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64/jre" \
#=====================
# Install Android SDK
#=====================
ENV SDK_VERSION=25.2.3 \
ANDROID_BUILD_TOOLS_VERSION=25.0.3 \
ARG SDK_VERSION=25.2.3
ARG ANDROID_BUILD_TOOLS_VERSION=25.0.3
ENV SDK_VERSION=$SDK_VERSION \
ANDROID_BUILD_TOOLS_VERSION=$ANDROID_BUILD_TOOLS_VERSION \
ANDROID_HOME=/root

RUN wget -O tools.zip https://dl.google.com/android/repository/tools_r${SDK_VERSION}-linux.zip && \
Expand All @@ -71,7 +73,8 @@ ENV PATH=$PATH:$ANDROID_HOME/platform-tools:$ANDROID_HOME/build-tools
#====================================
# Install latest nodejs, npm, appium
#====================================
ENV APPIUM_VERSION=1.6.6-beta
ARG APPIUM_VERSION=1.6.6-beta
ENV APPIUM_VERSION=$APPIUM_VERSION

RUN curl -sL https://deb.nodesource.com/setup_7.x | bash - && \
apt-get -qqy install nodejs && \
Expand Down

0 comments on commit a5882a2

Please sign in to comment.