SHARE
TWEET

Untitled

a guest Apr 18th, 2018 22 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # This is a sample build configuration for Java (Gradle).
  2. # Check our guides at https://confluence.atlassian.com/x/zd-5Mw for more examples.
  3. # Only use spaces to indent your .yml configuration.
  4. # -----
  5. # You can specify a custom docker image from Docker Hub as your build environment.
  6. image: java:8
  7.  
  8. pipelines:
  9.   branches:
  10.     develop:
  11.       - step:
  12.           caches:
  13.             - gradle
  14.             - android-sdk
  15.  
  16.           script:
  17.             # Download and unzip android sdk
  18.             - wget --quiet --output-document=android-sdk.zip https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip
  19.             - unzip -o -qq android-sdk.zip -d android-sdk
  20.             # Define Android Home and add PATHs
  21.             - export ANDROID_HOME="/opt/atlassian/pipelines/agent/build/android-sdk"
  22.             - export PATH="$ANDROID_HOME/tools:$ANDROID_HOME/tools/bin:$ANDROID_HOME/platform-tools:$PATH"
  23.             # Download packages.
  24.             - yes | sdkmanager "platform-tools"
  25.             - yes | sdkmanager "platforms;android-27"
  26.             - yes | sdkmanager "build-tools;27.0.3"
  27.             - yes | sdkmanager "extras;android;m2repository"
  28.             - yes | sdkmanager "extras;google;m2repository"
  29.             - yes | sdkmanager "extras;google;instantapps"
  30.             - yes | sdkmanager --licenses
  31.             # Build apk
  32.             - chmod a+x ./gradlew
  33.             - ./gradlew assembleRelease
  34.             - chmod a+x ./export_develop.sh
  35.             - ./export_develop.sh
  36.             - chmod a+x ./export_staging.sh
  37.             - ./export_staging.sh
  38.             - chmod a+x ./export_production.sh
  39.             - ./export_production.sh
  40.             - echo $BITBUCKET_BUILD_NUMBER
  41.          
  42.     master:
  43.       - step:
  44.           caches:
  45.             - gradle
  46.             - android-sdk
  47.  
  48.           script:
  49.             # Download and unzip android sdk
  50.             - wget --quiet --output-document=android-sdk.zip https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip
  51.             - unzip -o -qq android-sdk.zip -d android-sdk
  52.             # Define Android Home and add PATHs
  53.             - export ANDROID_HOME="/opt/atlassian/pipelines/agent/build/android-sdk"
  54.             - export PATH="$ANDROID_HOME/tools:$ANDROID_HOME/tools/bin:$ANDROID_HOME/platform-tools:$PATH"
  55.             # Download packages.
  56.             - yes | sdkmanager "platform-tools"
  57.             - yes | sdkmanager "platforms;android-27"
  58.             - yes | sdkmanager "build-tools;27.0.3"
  59.             - yes | sdkmanager "extras;android;m2repository"
  60.             - yes | sdkmanager "extras;google;m2repository"
  61.             - yes | sdkmanager "extras;google;instantapps"
  62.             - yes | sdkmanager --licenses
  63.             # Build apk
  64.             - chmod a+x ./gradlew
  65.             - ./gradlew assembleRelease
  66.             - chmod a+x ./export_develop.sh
  67.             - ./export_develop.sh
  68.             - chmod a+x ./export_staging.sh
  69.             - ./export_staging.sh
  70.             - chmod a+x ./export_production.sh
  71.             - ./export_production.sh
  72.             - echo $BITBUCKET_BUILD_NUMBER
  73. definitions:
  74.     caches:
  75.       android-sdk: android-sdk
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top