Update to new yml
This commit is contained in:
@@ -1,20 +1,18 @@
|
|||||||
image: jangrewe/gitlab-ci-android
|
image: jangrewe/gitlab-ci-android
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- COMMIT_URL="https://gitlab.com/AuroraOSS/AuroraStore/-/commit/${CI_COMMIT_SHA}"
|
- export GRADLE_USER_HOME=$(pwd)/.gradle
|
||||||
- MSG_URL="https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage"
|
- chmod +x ./gradlew
|
||||||
- export GRADLE_USER_HOME=$(pwd)/.gradle
|
|
||||||
- chmod +x ./gradlew
|
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
key: ${CI_PROJECT_ID}
|
key: ${CI_PROJECT_ID}
|
||||||
paths:
|
paths:
|
||||||
- .gradle/
|
- .gradle/
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- build
|
- build
|
||||||
# - test
|
# - test
|
||||||
- notify
|
- notify
|
||||||
|
|
||||||
# lintDebug:
|
# lintDebug:
|
||||||
# stage: build
|
# stage: build
|
||||||
@@ -24,14 +22,12 @@ stages:
|
|||||||
assembleDebug:
|
assembleDebug:
|
||||||
stage: build
|
stage: build
|
||||||
script:
|
script:
|
||||||
- ./gradlew assembleDebug
|
- script -c "bash -x ci-notify.sh --build" > ci-logs.log
|
||||||
- 'curl -s -X POST ${MSG_URL} -d chat_id=${TELEGRAM_CHAT_ID}
|
- ./gradlew assembleDebug
|
||||||
-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:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- app/build/outputs/
|
- app/build/outputs/
|
||||||
|
- ci-logs.log
|
||||||
|
|
||||||
# testDebug:
|
# testDebug:
|
||||||
# stage: test
|
# stage: test
|
||||||
@@ -42,4 +38,15 @@ assembleDebug:
|
|||||||
notifyTelegram:
|
notifyTelegram:
|
||||||
stage: notify
|
stage: notify
|
||||||
script:
|
script:
|
||||||
- script -c "bash -x ci-notify.sh" > ci-logs.log # build succeeded with apk file attached or failed
|
- script -c "bash -x ci-notify.sh --notify" > ci-logs.log # build succeeded with apk file attached or failed
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- ci-logs.log
|
||||||
|
|
||||||
|
# if all build fails send log
|
||||||
|
sendLogs:
|
||||||
|
stage: notify
|
||||||
|
script:
|
||||||
|
- sh ci-notify.sh --logs
|
||||||
|
when: on_failure
|
||||||
|
|
||||||
Reference in New Issue
Block a user