Commit 680111e5 authored by Sylvain Berfini's avatar Sylvain Berfini 🎩

Feature/release 4.1 docker gitlab ci

parent b3de09c2
Pipeline #2230 passed with stage
in 1 minute and 21 seconds
......@@ -2,14 +2,27 @@ job-android:
stage: build
tags: [ "docker-android" ]
image: gitlab.linphone.org:4567/bc/public/linphone-android/bc-dev-android:28
before_script:
- if ! [ -z ${SCP_PRIVATE_KEY+x} ]; then eval $(ssh-agent -s); fi
- if ! [ -z ${SCP_PRIVATE_KEY+x} ]; then echo "$SCP_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null; fi
script:
- sdkmanager
- ./gradlew app:assembleDebug
- scp -oStrictHostKeyChecking=no $DEPLOY_SERVER:$ANDROID_KEYSTORE_PATH app/
- scp -oStrictHostKeyChecking=no $DEPLOY_SERVER:$ANDROID_GOOGLE_SERVICES_PATH app/
- echo storePassword=$ANDROID_KEYSTORE_PASSWORD > keystore.properties
- echo keyPassword=$ANDROID_KEYSTORE_KEY_PASSWORD >> keystore.properties
- echo keyAlias=$ANDROID_KEYSTORE_KEY_ALIAS >> keystore.properties
- echo storeFile=$ANDROID_KEYSTORE_FILE >> keystore.properties
- ./gradlew assembleDebug
- ./gradlew assembleRelease
artifacts:
paths:
- ./app/build/outputs/apk/debug/linphone-android-debug-*.apk
- ./app/build/outputs/apk/release/linphone-android-release-*.apk
when: always
expire_in: 1 week
......
job-android-upload:
stage: deploy
tags: [ "deploy" ]
only:
- schedules
dependencies:
- job-android
script:
- cd app/build/outputs/apk/ && rsync ./debug/*.apk $DEPLOY_SERVER:$ANDROID_DEPLOY_DIRECTORY
\ No newline at end of file
......@@ -11,6 +11,7 @@
include:
- '.gitlab-ci-files/job-android.yml'
- '.gitlab-ci-files/job-upload.yml'
stages:
......
[![pipeline status](https://gitlab.linphone.org/BC/public/linphone-android/badges/master/pipeline.svg)](https://gitlab.linphone.org/BC/public/linphone-android/commits/master)
[![pipeline status](https://gitlab.linphone.org/BC/public/linphone-android/badges/master/pipeline.svg)](https://gitlab.linphone.org/BC/public/linphone-android/commits/feature/release-4.1)
Linphone is a free VoIP and video softphone based on the SIP protocol.
......
......@@ -11,7 +11,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.0'
classpath 'com.google.gms:google-services:3.2.0'
classpath 'com.google.gms:google-services:4.2.0'
classpath "com.diffplug.spotless:spotless-plugin-gradle:3.16.0"
// NOTE: Do not place your application dependencies here; they belong
......
......@@ -19,7 +19,7 @@ ENV ANDROID_HOME /opt/android-sdk-linux
# Install common general tools
RUN apt-get update && \
apt-get install -y curl nano sudo unzip vim wget openjdk-8-jdk-headless && \
apt-get install -y curl nano sudo unzip vim wget openjdk-8-jdk-headless rsync ssh && \
apt-get clean
# Get the Android tools
......@@ -29,7 +29,15 @@ RUN wget https://dl.google.com/android/repository/tools_r$ANDROID_SDK-linux.zip
ENV PATH $ANDROID_HOME/tools:$ANDROID_HOME/tools/bin:$ANDROID_HOME/platform-tools:$PATH
# Get the Android SDK
RUN echo "y" | sdkmanager "platforms;android-28" "build-tools;28.0.0" "extras;android;m2repository" "extras;google;m2repository" "platform-tools" "tools"
RUN echo "y" | sdkmanager "platforms;android-28" "build-tools;28.0.3" "extras;android;m2repository" "extras;google;m2repository" "platform-tools" "tools"
# Accept Android SDK licenses
RUN yes | sdkmanager --licenses
# Update if needed
RUN echo y | android update sdk --no-ui --all --filter platform-tools
RUN echo y | android update sdk --no-ui --all --filter android-28
RUN echo y | android update sdk --no-ui --all --filter build-tools-28.0.3
# Configure user bc
RUN useradd -ms /bin/bash bc && \
......
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