job-android.yml 1.13 KB
Newer Older
Sylvain Berfini's avatar
Sylvain Berfini committed
1
job-android:
2 3 4

  stage: build
  tags: [ "docker-android" ]
5
  image: gitlab.linphone.org:4567/bc/public/linphone-android/bc-dev-android:29
6 7 8 9

  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
10 11 12

  script:
    - sdkmanager
13 14 15 16 17 18 19 20
    - 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
21 22 23 24

  artifacts:
    paths:
      - ./app/build/outputs/apk/debug/linphone-android-debug-*.apk
25
      - ./app/build/outputs/apk/release/linphone-android-release-*.apk
26 27 28 29 30
    when: always
    expire_in: 1 week


.scheduled-job-android:
31
  extends: job-android
32
  only:
33
    - schedules