This commit is contained in:
Stefan Schueller 2020-07-12 17:45:14 +02:00
parent a33508e68f
commit 10d9670d4e
2 changed files with 27 additions and 11 deletions

View File

@ -38,8 +38,7 @@ ensureContainer:
- docker manifest inspect $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG > /dev/null && exit || true - docker manifest inspect $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG > /dev/null && exit || true
.build_job: .build_job:
# image: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG image: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
image: opengamer/android-sdk-gradle-fastlane
stage: build stage: build
before_script: before_script:
# We store this binary file in a variable as hex with this command, `xxd -p thorium-android-app.jks` # We store this binary file in a variable as hex with this command, `xxd -p thorium-android-app.jks`
@ -80,8 +79,7 @@ buildRelease:
name: production name: production
testDebug: testDebug:
# image: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG image: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
image: opengamer/android-sdk-gradle-fastlane
stage: test stage: test
dependencies: dependencies:
- buildDebug - buildDebug
@ -89,8 +87,7 @@ testDebug:
- bundle exec fastlane test - bundle exec fastlane test
publishInternal: publishInternal:
# image: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG image: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
image: opengamer/android-sdk-gradle-fastlane
stage: internal stage: internal
dependencies: dependencies:
- buildRelease - buildRelease
@ -103,8 +100,7 @@ publishInternal:
- bundle exec fastlane internal - bundle exec fastlane internal
.promote_job: .promote_job:
# image: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG image: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
image: opengamer/android-sdk-gradle-fastlane
when: manual when: manual
dependencies: [] dependencies: []
before_script: before_script:

View File

@ -1,12 +1,32 @@
# This Dockerfile creates a static build image for CI FROM gradle:6.1.1-jdk8
# https://github.com/menny/docker_android
FROM menny/android:1.13.6 ENV ANDROID_SDK_URL https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip
ENV ANDROID_SDK_CHECKSUM 444e22ce8ca0f67353bda4b85175ed3731cae3ffa695ca18119cbacef1c1bea0
ENV ANDROID_BUILD_TOOLS_VERSION 29.0.3
ENV ANDROID_HOME /usr/local/android-sdk-linux
ENV ANDROID_VERSION 29
ENV PATH ${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools
RUN mkdir "$ANDROID_HOME" .android && \
cd "$ANDROID_HOME" && \
curl -o sdk.zip $ANDROID_SDK_URL && \
echo "${ANDROID_SDK_CHECKSUM} sdk.zip" | sha256sum -c - && \
unzip sdk.zip && \
rm sdk.zip
RUN yes | ${ANDROID_HOME}/tools/bin/sdkmanager --licenses
RUN $ANDROID_HOME/tools/bin/sdkmanager --update
RUN $ANDROID_HOME/tools/bin/sdkmanager "build-tools;${ANDROID_BUILD_TOOLS_VERSION}" \
"platforms;android-${ANDROID_VERSION}" \
"platform-tools"
# install OS packages # install OS packages
RUN apt-get --quiet update --yes RUN apt-get --quiet update --yes
RUN apt-get --quiet install --yes ruby ruby-dev RUN apt-get --quiet install --yes ruby ruby-dev
# We use this for xxd hex->binary # We use this for xxd hex->binary
RUN apt-get --quiet install --yes vim-common RUN apt-get --quiet install --yes vim-common
# install FastLane # install FastLane
COPY Gemfile.lock . COPY Gemfile.lock .
COPY Gemfile . COPY Gemfile .