Created
October 3, 2018 13:56
-
-
Save Pierry/4310d252f52dd0776eb44abbc4ef7067 to your computer and use it in GitHub Desktop.
.gitlab-ci.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stages: | |
- build | |
- beta | |
build: | |
image: openjdk:8-jdk | |
variables: | |
ANDROID_COMPILE_SDK: "24" | |
ANDROID_BUILD_TOOLS: "25.0.2" | |
ANDROID_SDK_TOOLS: "25.2.5" | |
before_script: | |
- apt-get --quiet update --yes | |
- apt-get --quiet install --yes wget tar unzip lib32stdc++6 lib32z1 | |
- wget --quiet --output-document=android-sdk.zip https://dl.google.com/android/repository/tools_r${ANDROID_SDK_TOOLS}-linux.zip | |
- unzip android-sdk.zip | |
- echo y | tools/android --silent update sdk --no-ui --all --filter android-${ANDROID_COMPILE_SDK} | |
- echo y | tools/android --silent update sdk --no-ui --all --filter platform-tools | |
- echo y | tools/android --silent update sdk --no-ui --all --filter build-tools-${ANDROID_BUILD_TOOLS} | |
- echo y | tools/android --silent update sdk --no-ui --all --filter extra-android-m2repository | |
- echo y | tools/android --silent update sdk --no-ui --all --filter extra-google-google_play_services | |
- echo y | tools/android --silent update sdk --no-ui --all --filter extra-google-m2repository | |
- export ANDROID_HOME=$PWD/ | |
- export PATH=$PATH:$PWD/ | |
- chmod +x ./gradlew | |
- mkdir "$ANDROID_HOME/licenses" || true | |
- echo "$ANDROID_HOME/tools/bin/sdkmanager --licenses" | |
- echo -e "\n8933bad161af4178b1185d1a37fbf41ea5269c55\nd56f5187479451eabf01fb78af6dfcb131a6481e" > "$ANDROID_HOME/licenses/android-sdk-license" | |
- echo -e "\n84831b9409646a918e30573bab4c9c91346d8abd" > "$ANDROID_HOME/licenses/android-sdk-preview-license" | |
stage: build | |
script: | |
- ./gradlew assembleHot --stacktrace | |
artifacts: | |
paths: | |
- app/build/outputs/ | |
beta: | |
image: anthonymonori/android-ci-image:latest | |
stage: beta | |
script: | |
- fastlane beta | |
only: | |
- master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment