Commit f3066893 by stu

made android_sdk role more generic

parent 3d25d542
--- ---
# User/group to manage Android SDK # User/group to manage Android SDK
jenkins_user: "jenkins" android_user: "android"
jenkins_group: "jenkins" android_group: "android"
# Tarball to download # Tarball to download
android_download: "android-sdk_r24.4.1-linux.tgz" android_download: "android-sdk_r24.4.1-linux.tgz"
# Checksum of Android SDK (from: https://developer.android.com/studio/index.html#downloads) # Checksum of Android SDK (from: https://developer.android.com/studio/index.html#downloads)
......
--- ---
# Configure the Jenkins worker system for building the edx android application # Configure a system for building the edx android application
- name: Create jenkins group
group: name={{ jenkins_group }} state=present
# The Jenkins account needs a login shell because Jenkins uses scp # Configure a user/group to own/run the android sdk
- name: Add the jenkins user to the group and configure shell - name: Create group for the user of the sdk
user: name={{ jenkins_user }} append=yes group={{ jenkins_group }} shell=/bin/bash 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. # 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 # NOTE: while it is the general policy to use repositories/ppas as much as possible
...@@ -29,11 +29,11 @@ ...@@ -29,11 +29,11 @@
src: /tmp/android-sdk.tgz src: /tmp/android-sdk.tgz
dest: /opt dest: /opt
creates: "{{ android_home }}" creates: "{{ android_home }}"
owner: "{{ jenkins_user }}" owner: "{{ android_user }}"
group: "{{ jenkins_group }}" group: "{{ android_group }}"
become: yes become: yes
# Use the android sdk manager to install the build targets necessary for the edx mobile app # Use the android sdk manager to install the build targets necessary for the edx mobile app
- name: Install Android API levels - name: Install Android API levels
shell: "echo 'y' | {{ android_home }}/tools/android update sdk --no-ui --filter {{ ','.join(android_build_targets) }}" shell: "echo 'y' | {{ android_home }}/tools/android update sdk --no-ui --filter {{ ','.join(android_build_targets) }}"
become: yes become: yes
become_user: "{{ jenkins_user }}" become_user: "{{ android_user }}"
...@@ -19,3 +19,15 @@ dependencies: ...@@ -19,3 +19,15 @@ dependencies:
# dependencies for android worker # dependencies for android worker
- role: android_sdk - role: android_sdk
when: android_worker is defined 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