Install SDK android jenkins

This commit is contained in:
Mathieu Sanchez 2019-04-22 12:09:05 +09:00
parent d32335de1b
commit 4bafdd297a
2 changed files with 13 additions and 0 deletions

View File

@ -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"

9
docker/install-sdk.sh Normal file
View File

@ -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