Simple email application for Android. Original source code: https://framagit.org/dystopia-project/simple-email
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

124 lines
3.4 KiB

6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
  1. image: openjdk:8-jdk
  2. stages:
  3. - test
  4. - build
  5. - deploy
  6. variables:
  7. GIT_SUBMODULE_STRATEGY: recursive
  8. GITLAB_URL: "framagit.org"
  9. ANDROID_SDK_TOOLS: "4333796"
  10. ANDROID_HOME: "$CI_PROJECT_DIR/.android-sdk"
  11. cache:
  12. key: ${CI_PIPELINE_ID}
  13. paths:
  14. - "$ANDROID_HOME/"
  15. - .gradle/
  16. before_script:
  17. # Get sdk version from project
  18. - export ANDROID_COMPILE_SDK=`egrep '^[[:blank:]]+compileSdkVersion' app/build.gradle | awk '{print $2}'`
  19. # Explict output for logging purpose only
  20. - echo $ANDROID_HOME
  21. - echo $ANDROID_SDK_TOOLS
  22. - echo $ANDROID_COMPILE_SDK
  23. # Fetch the specified SDK tools version to build with
  24. # Currently framagit.org have all runner with the same tag and don't use a distributed cache, so validate if restored the cache per pipeline ID
  25. - if [ ! -d "$ANDROID_HOME" ]; then
  26. - wget --quiet --output-document=/tmp/android-sdk.zip https://dl.google.com/android/repository/sdk-tools-linux-${ANDROID_SDK_TOOLS}.zip
  27. - unzip -q -o -d $ANDROID_HOME /tmp/android-sdk.zip
  28. # Install platform tools and Android SDK for the compile target
  29. - echo y | $ANDROID_HOME/tools/bin/sdkmanager "platforms;android-${ANDROID_COMPILE_SDK}" >/dev/null
  30. - fi
  31. # Adds to environment path
  32. - echo $CI_PROJECT_DIR
  33. - export PATH=$PATH:$ANDROID_HOME/platform-tools/
  34. - chmod +x ./gradlew
  35. lintAll:
  36. stage: test
  37. except:
  38. - master
  39. script:
  40. - echo ""
  41. #- ./gradlew --console=plain lint
  42. #- ./gradlew --console=plain checkstyle
  43. lintRelease:
  44. stage: test
  45. only:
  46. - master
  47. script:
  48. - echo ""
  49. #- ./gradlew --console=plain lintRelease
  50. #- ./gradlew --console=plain checkstyle
  51. testAll:
  52. stage: test
  53. except:
  54. - master
  55. script:
  56. - echo ""
  57. #- ./gradlew --console=plain test
  58. testRelease:
  59. stage: test
  60. only:
  61. - master
  62. script:
  63. - echo ""
  64. #- ./gradlew --console=plain testReleaseUnitTest
  65. buildDebug:
  66. stage: build
  67. except:
  68. - master
  69. script:
  70. - ./gradlew assembleDebug
  71. artifacts:
  72. expire_in: 1 week
  73. paths:
  74. - app/build/outputs/
  75. buildRelease:
  76. stage: build
  77. only:
  78. - master
  79. script:
  80. - echo ""
  81. #- ./gradlew assembleRelease
  82. artifacts:
  83. expire_in: 1 week
  84. paths:
  85. - app/build/outputs/
  86. release:
  87. stage: deploy
  88. only:
  89. - master
  90. before_script:
  91. - wget --quiet --output-document=/tmp/nvm-install.sh https://raw.githubusercontent.com/creationix/nvm/v0.33.6/install.sh
  92. - bash /tmp/nvm-install.sh
  93. - export NVM_DIR="$HOME/.nvm" &&. "$NVM_DIR/nvm.sh" && nvm install 8
  94. - eval $(ssh-agent -s)
  95. #- echo "$GIT_SSH_KEY" | tr -d '\r' | ssh-add - > /dev/null
  96. - ssh-add <(echo "$GIT_SSH_KEY")
  97. - mkdir -p ~/.ssh && ssh-keyscan $GITLAB_URL >> ~/.ssh/known_hosts
  98. - git config --global user.email $GIT_AUTHOR_EMAIL
  99. - git config --global user.name $GIT_AUTHOR_NAME
  100. cache: {}
  101. script:
  102. - npm install -g semantic-release @semantic-release/commit-analyzer @semantic-release/release-notes-generator @semantic-release/changelog @semantic-release/exec @semantic-release/git @semantic-release/gitlab
  103. - semantic-release
  104. - git remote update
  105. - git fetch
  106. - git branch -avv
  107. - git checkout --track -b develop origin/develop
  108. - git rebase master
  109. - git show --summary
  110. - git rebase origin/master
  111. - git show --summary
  112. - git push git@${GITLAB_URL}:${CI_PROJECT_PATH}.git develop
  113. #- git push https://${GIT_CREDENTIALS}@${GITLAB_URL}/${CI_PROJECT_PATH}.git develop