Last active
April 30, 2017 21:17
-
-
Save InNoobWeTrust/878fa02a790dfc3064669ae3baaa7aae to your computer and use it in GitHub Desktop.
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
image: mingc/android-build-box:latest | |
pipelines: | |
default: | |
- step: | |
script: # Modify the commands below to build your repository. | |
# You must commit the Gradle wrapper to your repository | |
# https://docs.gradle.org/current/userguide/gradle_wrapper.html | |
- export GRADLE_OPTS='-XX:+UseG1GC -XX:MaxGCPauseMillis=1000 -Dorg.gradle.jvmargs="-Xmx2048m -XX:MaxPermSize=1024m -XX:ReservedCodeCacheSize=440m -XX:+UseCompressedOops -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8" -Dorg.gradle.parallel=false -Dorg.gradle.daemon=false -Dorg.gradle.configureondemand=true' | |
- chmod +x gradlew | |
- ./gradlew assemble | |
- cp -r app/build/outputs/ artifacts | |
- zip -9 -r artifacts.bb.zip artifacts | |
#- ./gradlew build | |
# Upload artifacts to downloads | |
# References: | |
# * https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Busername%7D/%7Brepo_slug%7D/downloads | |
# * https://confluence.atlassian.com/bitbucket/environment-variables-794502608.html | |
# Set variable USER_LOGIN via Bitbucket setting with your login information and choose secure then save. Example value my.email@bug.master:myp@55VV0rd | |
- curl -X POST --user ${USER_LOGIN} "https://api.bitbucket.org/2.0/repositories/${BITBUCKET_REPO_OWNER}/${BITBUCKET_REPO_SLUG}/downloads" --form files=@"artifacts.bb.zip" | |
- echo "UnitTests starting..." | |
- ./gradlew test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment