summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2017-09-25 23:15:39 +0200
committercyBerta <cyberta@riseup.net>2017-09-26 01:56:02 +0200
commit6ec1fddc49b8357f09f0596da3a21b8371fc7658 (patch)
tree21b5794bfdc3e9cd48aa2dac90d591091ea508cf
parentd944721a35786a48b996ef088f0311b1835180a7 (diff)
update ics-openvpn: update Dockerfiles, add new api level 26 and update ndk
-rw-r--r--.gitlab-ci.yml11
-rw-r--r--docker/android-emulator/Dockerfile21
-rw-r--r--docker/android-ndk/Dockerfile31
-rw-r--r--docker/android-sdk/Dockerfile38
4 files changed, 65 insertions, 36 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index a9e43504..730856ce 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -15,12 +15,15 @@ variables:
- docker-in-docker
services:
- docker:dind
- script:
- - docker --version
- - docker info
+
+ before script:
- >
export LAST_COMMIT=$(curl -s --header "PRIVATE-TOKEN: ${LEAP_CODE_O_MATIC_PRIVATE_TOKEN}" https://0xacab.org/api/v4/projects/578/pipelines |
python -c "import sys, json; print json.load(sys.stdin)[1]['sha']")
+
+ script:
+ - docker --version
+ - docker info
- .gitlab/build.sh ${DOCKER_IMAGE}
docker_image:sdk:
@@ -47,7 +50,7 @@ build:
script:
- git submodule sync --recursive
- git submodule update --init --recursive
- - ./gradlew assembleDebug
+ - ./gradlew clean assembleDebug
artifacts:
paths:
- app/build/outputs/
diff --git a/docker/android-emulator/Dockerfile b/docker/android-emulator/Dockerfile
index 0201312b..7cdd9b3e 100644
--- a/docker/android-emulator/Dockerfile
+++ b/docker/android-emulator/Dockerfile
@@ -3,14 +3,26 @@ FROM 0xacab.org:4567/leap/bitmask_android/android-sdk:latest
MAINTAINER LEAP Encryption Access Project <info@leap.se>
LABEL Description="Android SDK baseimage based on debian:stretch" Vendor="LEAP" Version="25"
+# Make sure debconf doesn't complain about lack of interactivity
+ENV DEBIAN_FRONTEND noninteractive
+# ensure GL compatibility
+ENV ANDROID_EMULATOR_USE_SYSTEM_LIBS=1
+
# ------------------------------------------------------
# --- System Dependencies
-# ensure GL compatibility
+# Need docker package in order to do Docker-in-Docker (DIND)
+RUN apt-get update -qq && \
+ apt-get -y dist-upgrade && \
+ apt-get -y install gnupg apt-transport-https
+RUN echo 'deb https://apt.dockerproject.org/repo debian-stretch main'> /etc/apt/sources.list.d/docker.list && \
+ curl -s https://apt.dockerproject.org/gpg | apt-key add -
+RUN apt-get update -qq && \
+ apt-get -y install docker-engine mesa-utils && \
+ apt-get clean && \
+ apt-get autoclean && \
+ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
-RUN apt-get update -qq
-RUN DEBIAN_FRONTEND=noninteractive apt-get install -y mesa-utils
-ENV ANDROID_EMULATOR_USE_SYSTEM_LIBS=1
# ------------------------------------------------------
# --- Install Android Emulator
@@ -19,6 +31,7 @@ ENV ANDROID_EMULATOR_USE_SYSTEM_LIBS=1
RUN echo y | sdkmanager "emulator"
# Install System Images for emulators
+RUN echo y | sdkmanager "system-images;android-26;google_apis;x86_64"
RUN echo y | sdkmanager "system-images;android-25;google_apis;x86_64"
RUN echo y | sdkmanager "system-images;android-24;google_apis;x86_64"
RUN echo y | sdkmanager "system-images;android-23;google_apis;x86_64"
diff --git a/docker/android-ndk/Dockerfile b/docker/android-ndk/Dockerfile
index 0a3eabfd..34d1d641 100644
--- a/docker/android-ndk/Dockerfile
+++ b/docker/android-ndk/Dockerfile
@@ -1,27 +1,32 @@
FROM 0xacab.org:4567/leap/bitmask_android/android-sdk:latest
MAINTAINER LEAP Encryption Access Project <info@leap.se>
-LABEL Description="Android NDK image based on android-sdk baseimage" Vendor="LEAP" Version="r12b"
+LABEL Description="Android NDK image based on android-sdk baseimage" Vendor="LEAP" Version="r15c"
+
+# Make sure debconf doesn't complain about lack of interactivity
+ENV DEBIAN_FRONTEND noninteractive
# ------------------------------------------------------
# --- Install System Dependencies
+RUN if test -f /etc/apt/sources.list.d/leap.list; then rm /etc/apt/sources.list.d/leap.list; fi
+# Need docker package in order to do Docker-in-Docker (DIND)
+RUN apt-get update -qq && \
+ apt-get -y dist-upgrade && \
+ apt-get install -y gnupg apt-transport-https
+RUN echo 'deb https://apt.dockerproject.org/repo debian-stretch main'> /etc/apt/sources.list.d/docker.list && \
+ curl -s https://apt.dockerproject.org/gpg | apt-key add -
+# JNI build dependencies w/ 32-bit compatible C libs
+RUN apt-get update -qq && \
+ apt-get -y install docker-engine make gcc file lib32stdc++6 lib32z1 && \
+ apt-get clean && \
+ apt-get autoclean && \
+ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
-RUN apt-get update -qq
-RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \
- make gcc file lib32stdc++6 lib32z1 # JNI build dependencies w/ 32-bit compatible C libs
# ------------------------------------------------------
# --- Install Android NDK (for running C code)
-# NOTE(@aguestuser|4.23.17)
-# We woud like to use te current version of Android NDK (r14b) but cannot
-# due to pinned dependency on year-old version of `ics-openvpn`
-# which has transitive dependency on `openssl` which will not compile with `clang`
-# (starting in 13b, android ndk uses `clang` isntead of `gcc`)
-# Upon rebasing onto to current HEAD of `ics-openvpn` and resolving conflicts, we
-# should update to current version of `ndk`.
-
-ENV ANDROID_NDK_VERSION "r12b"
+ENV ANDROID_NDK_VERSION "r15c"
ENV ANDROID_NDK_HOME ${ANDROID_HOME}/android-ndk-${ANDROID_NDK_VERSION}
ENV ANDROID_NDK_URL http://dl.google.com/android/repository/android-ndk-${ANDROID_NDK_VERSION}-linux-x86_64.zip
diff --git a/docker/android-sdk/Dockerfile b/docker/android-sdk/Dockerfile
index 4044a7ec..0c1184a7 100644
--- a/docker/android-sdk/Dockerfile
+++ b/docker/android-sdk/Dockerfile
@@ -1,17 +1,29 @@
-FROM debian:stretch
+FROM 0xacab.org:4567/leap/docker/debian:stretch_amd64
MAINTAINER LEAP Encryption Access Project <info@leap.se>
-LABEL Description="Android SDK baseimage based on debian:stretch" Vendor="LEAP" Version="25.2.5"
+LABEL Description="Android SDK baseimage based on debian:stretch" Vendor="LEAP" Version="26.0.0"
# ------------------------------------------------------
# --- Install System Dependencies
-RUN apt-get update -qq
-RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \
- # the basics
- curl unzip git locales \
- # java stuff
- openjdk-8-jdk maven
+ Make sure debconf doesn't complain about lack of interactivity
+ENV DEBIAN_FRONTEND noninteractive
+
+# Need docker package in order to do Docker-in-Docker (DIND)
+RUN apt-get update -qq && \
+ apt-get -y dist-upgrade && \
+ apt-get -y install gnupg apt-transport-https
+RUN echo 'deb https://apt.dockerproject.org/repo debian-stretch main'> /etc/apt/sources.list.d/docker.list && \
+ curl -s https://apt.dockerproject.org/gpg | apt-key add -
+RUN apt-get update -qq && \
+ apt-get install -y docker-engine \
+ # the basics
+ curl unzip git locales \
+ # java stuff
+ openjdk-8-jdk maven && \
+ apt-get clean && \
+ apt-get autoclean && \
+ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# ------------------------------------------------------
# --- Set Locales
@@ -27,9 +39,8 @@ ENV LANG en_US.UTF-8
# ------------------------------------------------------
# --- Install Android SDK Tools
-ENV ANDROID_SDK_VERSION "25.2.5"
ENV ANDROID_HOME /opt/android-sdk-linux
-ENV ANDROID_SDK_URL https://dl.google.com/android/repository/tools_r${ANDROID_SDK_VERSION}-linux.zip
+ENV ANDROID_SDK_URL https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip
# Install SDK Tools
RUN curl -L $ANDROID_SDK_URL -o sdk-tools.zip \
@@ -49,17 +60,14 @@ RUN echo y | sdkmanager "platform-tools" # echo y to accept google licenses
RUN sdkmanager "extras;android;m2repository"
# Install Build Tools (Please keep in descending order)
+RUN sdkmanager "build-tools;26.0.0"
RUN sdkmanager "build-tools;25.0.2"
RUN sdkmanager "build-tools;25.0.0"
RUN sdkmanager "build-tools;24.0.3"
RUN sdkmanager "build-tools;23.0.3"
# Install Target SDK Packages (Please keep in descending order)
+RUN sdkmanager "platforms;android-26"
RUN sdkmanager "platforms;android-25"
RUN sdkmanager "platforms;android-24"
RUN sdkmanager "platforms;android-23"
-
-# ------------------------------------------------------
-# --- Cleanup
-
-RUN apt clean