Commit f3066893 by stu

made android_sdk role more generic

parent 3d25d542
---
# User/group to manage Android SDK
jenkins_user: "jenkins"
jenkins_group: "jenkins"
android_user: "android"
android_group: "android"
# Tarball to download
android_download: "android-sdk_r24.4.1-linux.tgz"
# Checksum of Android SDK (from: https://developer.android.com/studio/index.html#downloads)
......
---
# Configure the Jenkins worker system for building the edx android application
- name: Create jenkins group
group: name={{ jenkins_group }} state=present
# Configure a system for building the edx android application
# The Jenkins account needs a login shell because Jenkins uses scp
- name: Add the jenkins user to the group and configure shell
user: name={{ jenkins_user }} append=yes group={{ jenkins_group }} shell=/bin/bash
# Configure a user/group to own/run the android sdk
- name: Create group for the user of the sdk
group: name={{ android_group }} state=present
- name: Add the user to the group and configure shell
user: name={{ android_user }} append=yes group={{ android_group }} shell=/bin/bash
# Download the Android SDK/tools tarball from Google's download site.
# NOTE: while it is the general policy to use repositories/ppas as much as possible
......@@ -29,11 +29,11 @@
src: /tmp/android-sdk.tgz
dest: /opt
creates: "{{ android_home }}"
owner: "{{ jenkins_user }}"
group: "{{ jenkins_group }}"
owner: "{{ android_user }}"
group: "{{ android_group }}"
become: yes
# Use the android sdk manager to install the build targets necessary for the edx mobile app
- name: Install Android API levels
shell: "echo 'y' | {{ android_home }}/tools/android update sdk --no-ui --filter {{ ','.join(android_build_targets) }}"
become: yes
become_user: "{{ jenkins_user }}"
become_user: "{{ android_user }}"
......@@ -19,3 +19,15 @@ dependencies:
# dependencies for android worker
- role: android_sdk
when: android_worker is defined
# User/group to manage Android SDK
android_user: "jenkins"
android_group: "jenkins"
# Tarball to download
android_download: "android-sdk_r24.4.1-linux.tgz"
# Checksum of Android SDK (from: https://developer.android.com/studio/index.html#downloads)
android_checksum: "725bb360f0f7d04eaccff5a2d57abdd49061326d"
# path to installed android sdk
android_home: "/opt/android-sdk-linux"
# individual android build targets to be downloaded via the androind sdk manager
android_build_targets:
- android-23
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment