From 4bafdd297a594237097474724d26d891019cbb36 Mon Sep 17 00:00:00 2001 From: Mathieu Sanchez Date: Mon, 22 Apr 2019 12:09:05 +0900 Subject: [PATCH] Install SDK android jenkins --- docker/install-jenkins.sh | 4 ++++ docker/install-sdk.sh | 9 +++++++++ 2 files changed, 13 insertions(+) create mode 100644 docker/install-sdk.sh diff --git a/docker/install-jenkins.sh b/docker/install-jenkins.sh index 585ef95..17a058c 100755 --- a/docker/install-jenkins.sh +++ b/docker/install-jenkins.sh @@ -3,6 +3,10 @@ docker run --detach \ --publish 8002:8080 \ --publish 50000:50000 \ --volume /var/jenkins_home:/var/jenkins_home \ + --volume //opt/android-sdk:/opt/android-sdk \ --user root \ --restart unless-stopped \ jenkins/jenkins:lts + +docker cp install-sdk.sh jenkins:/root/install-sdk.sh +docker exec jenkins "/root/install-sdk.sh" diff --git a/docker/install-sdk.sh b/docker/install-sdk.sh new file mode 100644 index 0000000..25d82c7 --- /dev/null +++ b/docker/install-sdk.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +wget https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip -P /root/ +unzip /root/sdk-tools-linux-4333796.zip -d /root/ +rm /root/sdk-tools-linux-4333796.zip + + yes | ./tools/bin/sdkmanager --licenses + yes | ./tools/bin/sdkmanager "platforms;android-28" --sdk_root=/opt/android-sdk + \ No newline at end of file