Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
configuration
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
configuration
Commits
8ee714f0
Commit
8ee714f0
authored
Sep 13, 2016
by
stu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add libraries/packages for emulation and more tests
parent
eb38e30a
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
62 additions
and
13 deletions
+62
-13
playbooks/roles/android_sdk/defaults/main.yml
+13
-5
playbooks/roles/android_sdk/tasks/main.yml
+18
-3
playbooks/roles/jenkins_worker/meta/main.yml
+13
-5
playbooks/roles/jenkins_worker/tasks/test_android_worker.yml
+18
-0
No files found.
playbooks/roles/android_sdk/defaults/main.yml
View file @
8ee714f0
...
...
@@ -11,9 +11,17 @@ android_home: "/opt/android-sdk-linux"
# individual android build targets to be downloaded via the android sdk manager
android_build_targets
:
-
android-23
# other android dependencies that cannot be tested via the android sdk manager
-
android-21
# other android dependencies that cannot be tested via the android sdk manager. instead, stat the android_test_path
# to test for presence of the package
android_tools
:
-
platform-tools
-
build-tools-23.0.3
-
extra-google-m2repository
-
extra-android-m2repository
-
{
package
:
'
platform-tools'
,
android_test_path
:
'
platform-tools'
}
-
{
package
:
'
build-tools-23.0.3'
,
android_test_path
:
'
build-tools/23.0.3'
}
-
{
package
:
'
extra-google-m2repository'
,
android_test_path
:
'
extras/google/m2repository'
}
-
{
package
:
'
extra-android-m2repository'
,
android_test_path
:
'
extras/android/m2repository'
}
-
{
package
:
'
sys-img-armeabi-v7a-android-21'
,
android_test_path
:
'
system-images/android-21/default/armeabi-v7a/'
}
-
{
package
:
'
sys-img-armeabi-v7a-android-23'
,
android_test_path
:
'
system-images/android-23/default/armeabi-v7a/'
}
# libraries needed for avd(android virtual device) emulation
android_apt_libraries
:
-
libstdc++6:i386
-
lib32z1
playbooks/roles/android_sdk/tasks/main.yml
View file @
8ee714f0
...
...
@@ -23,7 +23,7 @@
-
assert
:
that
:
"
'{{
android_checksum
}}'
in
sdk_checksum.stdout"
-
name
:
Unarchive tarball to /opt/android-sdk
-
name
:
Unarchive tarball to /opt/android-sdk
-linux
unarchive
:
copy
:
no
src
:
/tmp/android-sdk.tgz
...
...
@@ -34,11 +34,26 @@
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
)
}}"
shell
:
"
echo
'y'
|
{{
android_home
}}/tools/android
update
sdk
-
a
--no-ui
--filter
{{
android_build_targets
|
join(','
)
}}"
become
:
yes
become_user
:
"
{{
android_user
}}"
# Put Android package names into a list for easier installation command
-
name
:
Gather Android packages to download into a list
util_map
:
function
:
'
zip_to_list'
input
:
"
{{
android_tools
}}"
args
:
-
"
package"
register
:
android_packages
# Use the android sdk manager to install the build tools necessary for the edx mobile app
-
name
:
Install other Android tools
shell
:
"
echo
'y'
|
{{
android_home
}}/tools/android
update
sdk
-
-no-ui
--filter
{{
','.join(android_tools
)
}}"
shell
:
"
echo
'y'
|
{{
android_home
}}/tools/android
update
sdk
-
a
--no-ui
--filter
{{
android_packages.function_output
|
join(','
)
}}"
become
:
yes
become_user
:
"
{{
android_user
}}"
# The following libraries are only needed to run AVD emulation, not for compiling
-
name
:
Install additional libraries used for Android emulation
apt
:
name
:
"
{{
item
}}"
update_cache
:
yes
state
:
present
with_items
:
"
{{
android_apt_libraries
}}"
playbooks/roles/jenkins_worker/meta/main.yml
View file @
8ee714f0
...
...
@@ -31,9 +31,17 @@ dependencies:
# individual android build targets to be downloaded via the android sdk manager
android_build_targets
:
-
android-23
# other android dependencies that cannot be tested via the android sdk manager
-
android-21
# other android dependencies that cannot be tested via the android sdk manager. instead, stat the android_test_path
# to test for presence of the package
android_tools
:
-
platform-tools
-
build-tools-23.0.3
-
extra-google-m2repository
-
extra-android-m2repository
-
{
package
:
'
platform-tools'
,
android_test_path
:
'
platform-tools'
}
-
{
package
:
'
build-tools-23.0.3'
,
android_test_path
:
'
build-tools/23.0.3'
}
-
{
package
:
'
extra-google-m2repository'
,
android_test_path
:
'
extras/google/m2repository'
}
-
{
package
:
'
extra-android-m2repository'
,
android_test_path
:
'
extras/android/m2repository'
}
-
{
package
:
'
sys-img-armeabi-v7a-android-21'
,
android_test_path
:
'
system-images/android-21/default/armeabi-v7a/'
}
-
{
package
:
'
sys-img-armeabi-v7a-android-23'
,
android_test_path
:
'
system-images/android-23/default/armeabi-v7a/'
}
# libraries needed for avd(android virtual device) emulation
android_apt_libraries
:
-
libstdc++6:i386
-
lib32z1
playbooks/roles/jenkins_worker/tasks/test_android_worker.yml
View file @
8ee714f0
...
...
@@ -15,3 +15,21 @@
assert
:
that
:
-
"
'{{
item
}}'
in
build_targets.stdout"
# Put the paths of downloaded packages into a list, so they can be iterated over
# in an assert block
-
name
:
Gather paths of installed Android packages into a list
util_map
:
function
:
'
zip_to_list'
input
:
"
{{
android_tools
}}"
args
:
-
"
android_test_path"
register
:
android_test_paths
# Test that the correct android tools are installed
-
name
:
Verify build tools installed
stat
:
path={{ android_home }}/{{ item }}
register
:
android_package_stats
with_items
:
"
{{
android_test_paths.function_output
}}"
-
with_items
:
"
{{
android_package_stats.results
}}"
assert
:
that
:
-
"
item.stat.exists
==
True"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment