summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcyberta <cyberta@riseup.net>2022-01-25 01:25:47 +0000
committercyberta <cyberta@riseup.net>2022-01-25 01:25:47 +0000
commitada541b2c326d8f2261e2542c952a8003cbec8de (patch)
tree029b1c7a82b0e430676e603fe906ad58b40b57da
parent8a14c1edef316e211afdd642e72d093191bceed8 (diff)
parent259e4f236a1a229674875573778aa3307999db0a (diff)
Merge branch 'bullseye-22-1' into 'master'
Update CI Docker images to Bullseye See merge request leap/bitmask_android!164
-rw-r--r--.gitlab-ci.yml5
-rw-r--r--docker/android-emulator/Dockerfile13
-rw-r--r--docker/android-ndk/Dockerfile22
-rw-r--r--docker/android-sdk/Dockerfile38
4 files changed, 49 insertions, 29 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index c51f8e71..ad2885c0 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -11,7 +11,7 @@ variables:
DOCKER_DRIVER: overlay
.job_template: &build_docker_image
- image: 0xacab.org:4567/leap/docker/debian:buster_amd64
+ image: 0xacab.org:4567/leap/docker/debian:bullseye_amd64
tags:
- docker-in-docker
services:
@@ -25,7 +25,7 @@ variables:
script:
- docker --version
- docker info
- - if ! .gitlab/build.sh ${DOCKER_IMAGE} >> dockerbuild.log 2>&1; then echo "Image build failed. Please check dockerbuild.log."; echo "tail -n 100 dockerbuild.log:"; tail -n 100 dockerbuild.log; echo "disk space:"; df -h; exit 1; fi;
+ - if ! .gitlab/build.sh ${DOCKER_IMAGE} >> dockerbuild.log 2>&1; then echo "Image build failed. Please check dockerbuild.log."; echo "tail -n 200 dockerbuild.log:"; tail -n 200 dockerbuild.log; echo "disk space:"; df -h; sleep 800; exit 1; fi;
allow_failure: false
artifacts:
expire_in: 3d
@@ -48,6 +48,7 @@ docker_image:emulator:
stage: docker_image_other
variables:
DOCKER_IMAGE: android-emulator
+ allow_failure: true
<<: *build_docker_image
unit_test:
diff --git a/docker/android-emulator/Dockerfile b/docker/android-emulator/Dockerfile
index 138173d4..b5f5f32b 100644
--- a/docker/android-emulator/Dockerfile
+++ b/docker/android-emulator/Dockerfile
@@ -1,7 +1,7 @@
-FROM 0xacab.org:4567/leap/bitmask_android/android-sdk:latest
+FROM registry.0xacab.org/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="26"
+LABEL Description="Android SDK baseimage based on debian:bullseye" Vendor="LEAP" Version="27"
# Make sure debconf doesn't complain about lack of interactivity
ENV DEBIAN_FRONTEND noninteractive
@@ -15,12 +15,9 @@ ENV ANDROID_EMULATOR_USE_SYSTEM_LIBS=1
RUN apt-get update -qq && \
apt-get -y dist-upgrade && \
apt-get -y install gnupg apt-transport-https
-RUN curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg && \
- echo \
- "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian \
- $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
+
RUN apt-get update -qq && \
- apt-get -y install docker-ce mesa-utils && \
+ apt-get install -y docker-ce docker-ce-cli mesa-utils && \
apt-get clean && \
apt-get autoclean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
@@ -38,4 +35,4 @@ RUN echo y | sdkmanager "system-images;android-30;google_apis;x86"
# RUN echo y | sdkmanager "system-images;android-25;google_apis;x86_64"
# RUN echo y | sdkmanager "system-images;android-23;google_apis;x86_64"
-RUN echo no | avdmanager create avd --force --name testApi30 --abi google_apis/x86 --package 'system-images;android-30;google_apis;x86' \ No newline at end of file
+RUN echo no | avdmanager create avd --force --name testApi30 --abi google_apis/x86 --package 'system-images;android-30;google_apis;x86'
diff --git a/docker/android-ndk/Dockerfile b/docker/android-ndk/Dockerfile
index 82d9155b..83c81329 100644
--- a/docker/android-ndk/Dockerfile
+++ b/docker/android-ndk/Dockerfile
@@ -1,7 +1,7 @@
-FROM 0xacab.org:4567/leap/bitmask_android/android-sdk:latest
+FROM registry.0xacab.org/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="r20"
+LABEL Description="Android NDK image based on android-sdk baseimage" Vendor="LEAP" Version="r21e"
# Make sure debconf doesn't complain about lack of interactivity
ENV DEBIAN_FRONTEND noninteractive
@@ -9,16 +9,21 @@ ENV DEBIAN_FRONTEND noninteractive
# ------------------------------------------------------
# --- Install System Dependencies
# Need docker package in order to do Docker-in-Docker (DIND)
+RUN lsb_release -a
+
RUN apt-get update -qq && \
apt-get -y dist-upgrade && \
apt-get install -y gnupg apt-transport-https
-RUN curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg && \
- echo \
- "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian \
- $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
+
+# Docker apt details should be inherited from android_sdk
+#RUN curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg && \
+# echo \
+# "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian \
+# $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
+
# JNI build dependencies w/ 32-bit compatible C libs
RUN apt-get update -qq && \
- apt-get -y install docker-ce make gcc file lib32stdc++6 lib32z1 \
+ apt-get -y install docker-ce docker-ce-cli make gcc file lib32stdc++6 lib32z1 \
autoconf autogen automake autopoint autotools-dev gettext-base libtool patch pkg-config && \
apt-get clean && \
apt-get autoclean && \
@@ -30,6 +35,7 @@ RUN apt-get update -qq && \
ENV ANDROID_NDK_VERSION "r21e"
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
+ENV ANDROID_SDK_ROOT ${ANDROID_HOME}/latest/cmdline-tools
RUN curl -L $ANDROID_NDK_URL -o ndk.zip \
&& unzip ndk.zip -d $ANDROID_HOME/ndk \
@@ -41,6 +47,6 @@ ENV PATH ${PATH}:${ANDROID_NDK_HOME}
RUN echo "accept all licenses"
# Accept all licenses
-RUN yes | sdkmanager --licenses
+RUN echo y | sdkmanager --licenses
RUN sdkmanager --list
diff --git a/docker/android-sdk/Dockerfile b/docker/android-sdk/Dockerfile
index d10cce6f..6093cf18 100644
--- a/docker/android-sdk/Dockerfile
+++ b/docker/android-sdk/Dockerfile
@@ -1,7 +1,7 @@
-FROM 0xacab.org:4567/leap/docker/debian:stretch_amd64
+FROM 0xacab.org:4567/leap/docker/debian:bullseye_amd64
MAINTAINER LEAP Encryption Access Project <info@leap.se>
-LABEL Description="Android SDK baseimage based on debian:stretch" Vendor="LEAP" Version="27.0.0"
+LABEL Description="Android SDK baseimage based on debian:bullseye" Vendor="LEAP" Version="27.0.0"
# ------------------------------------------------------
# --- Install System Dependencies
@@ -12,17 +12,19 @@ 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 curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg && \
+ apt-get -y install gnupg apt-transport-https curl
+
+RUN curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg && \
echo \
- "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian \
- $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
+ "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian \
+ $(lsb_release -cs) stable" > /etc/apt/sources.list.d/docker.list
+
RUN apt-get update -qq && \
- apt-get install -y docker-ce \
+ apt-get install -y docker-ce docker-ce-cli mesa-utils \
# the basics
curl unzip git locales \
# java stuff
- openjdk-8-jdk maven && \
+ openjdk-11-jdk maven && \
apt-get clean && \
apt-get autoclean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
@@ -41,15 +43,29 @@ ENV LANG en_US.UTF-8
# --- Install Android SDK Tools
ENV ANDROID_HOME /opt/android-sdk-linux
-ENV ANDROID_SDK_URL https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip
+ENV ANDROID_SDK_URL https://dl.google.com/android/repository/commandlinetools-linux-7583922_latest.zip
+ENV ANDROID_SDK_ROOT ${ANDROID_HOME}
# Install SDK Tools
RUN curl -L $ANDROID_SDK_URL -o sdk-tools.zip \
+ && mkdir -p /opt/android-sdk-linux \
&& unzip -q sdk-tools.zip -d $ANDROID_HOME \
+ && mv -v $ANDROID_HOME/cmdline-tools $ANDROID_HOME/latest \
+ && echo $(ls -l $ANDROID_HOME) \
+ && mkdir -v $ANDROID_HOME/cmdline-tools \
+ && mv -v $ANDROID_HOME/latest $ANDROID_HOME/cmdline-tools/ \
&& rm -f sdk-tools.zip
# Update PATH
-ENV PATH ${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/tools/bin:${ANDROID_HOME}/platform-tools
+ENV PATH ${PATH}:${ANDROID_HOME}/cmdline-tools/latest/bin:${ANDROID_HOME}/cmdline-tools:${ANDROID_HOME}/cmd-tools/bin:${ANDROID_HOME}/platform-tools
+ENV ANDROID_SDK_ROOT ${ANDROID_HOME}/cmdline-tools/latest
+
+# Debug location and path
+
+RUN echo $PATH && \
+ echo $(ls /opt/) && \
+ echo $(ls /opt/android-sdk-linux) && \
+ echo $(ls /opt/android-sdk-linux/cmdline-tools/latest)
# ------------------------------------------------------
# --- Install Android SDK Tools Packages
@@ -76,4 +92,4 @@ RUN sdkmanager "platforms;android-30"
RUN echo "accept all licenses"
# Accept all licenses
-RUN yes | sdkmanager --licenses \ No newline at end of file
+RUN yes | sdkmanager --licenses