Add Gitlab CI for debug builds
This commit is contained in:
45
.gitlab-ci.yml
Normal file
45
.gitlab-ci.yml
Normal file
@@ -0,0 +1,45 @@
|
||||
image: jangrewe/gitlab-ci-android
|
||||
|
||||
before_script:
|
||||
- COMMIT_URL="https://gitlab.com/AuroraOSS/AuroraStore/-/commit/${CI_COMMIT_SHA}"
|
||||
- MSG_URL="https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage"
|
||||
- export GRADLE_USER_HOME=$(pwd)/.gradle
|
||||
- chmod +x ./gradlew
|
||||
|
||||
cache:
|
||||
key: ${CI_PROJECT_ID}
|
||||
paths:
|
||||
- .gradle/
|
||||
|
||||
stages:
|
||||
- build
|
||||
# - test
|
||||
- notify
|
||||
|
||||
# lintDebug:
|
||||
# stage: build
|
||||
# script:
|
||||
# - ./gradlew -Pci --console=plain :app:lintDebug -PbuildDir=lint
|
||||
|
||||
assembleDebug:
|
||||
stage: build
|
||||
script:
|
||||
- ./gradlew assembleDebug
|
||||
- 'curl -s -X POST ${MSG_URL} -d chat_id=${TELEGRAM_CHAT_ID}
|
||||
-d "disable_web_page_preview=true"
|
||||
-d "parse_mode=html"
|
||||
-d text=Project: ${CI_PROJECT_NAME}\n<a href="${CI_PIPELINE_URL}"><b>⚒️ Building</b></a> with HEAD at <a href="${COMMIT_URL}"><b>${CI_COMMIT_SHORT_SHA}</b></a> by ${CI_COMMIT_AUTHOR}\nBranch: ${CI_COMMIT_BRANCH}'
|
||||
artifacts:
|
||||
paths:
|
||||
- app/build/outputs/
|
||||
|
||||
# testDebug:
|
||||
# stage: test
|
||||
# script:
|
||||
# - ./gradlew -Pci --console=plain :app:testDebug
|
||||
|
||||
# Once build finished or failed, notify using Telegram
|
||||
notifyTelegram:
|
||||
stage: notify
|
||||
script:
|
||||
- script -c "bash -x ci-notify.sh" > ci-logs.log # build succeeded with apk file attached or failed
|
||||
Reference in New Issue
Block a user