Github Actions bilan Anroid CI/CD
Mobil applicationlarni ishlab chiqaradigan katta jamoalarda ishlarni avtomatlashtirish uchun CI/CD pipelinelar ishlab chiqadilar. Bugun biz Android applicationlar uchun Github Actions bilan CI/CD yozamiz o'ylaymanki bu ko'pchilik mobil dasturchilar uchun qiziqarli va foydali bo'ladi. Bu amaliyotdagi CI/CD'da biz Android applicationlarda bir nechta testlarni o'tkazamiz kodni analiz qilamiz Android release qilamiz va oxirida Google Play Storega deploy qilamiz. Notificationlar uchun Githubni Discord bilan inetegratsiya qilamiz. ushbu qo'llanmada biz kod analiz uchun SonarCloud, Test uchun esa JUnit ishlatamiz.
Discord bilan integratsiya
Biz loyihamizni Discord bilan integratsiya qilish uchun Discord webhook
dan foydalanamiz. Discord bilan integratsiya qilishda Discord server ochib olishimiz va serverda channel ochishimiz kerak.
Discord channel ochish va Discord webhook olib Githubdagi loyiha bilan integratsiya qilish bo'yicha quyidagi video qo'llanmani (opens in a new tab) ko'rib chiqishingiz mumkin.
Discord Webhookni quyidagicha konfiguratsitya qilamiz.
Which events would you like to trigger this webhook? ga Send me everything. tanlaymiz.
Android CI
Har doimgidek CI/CD yozishni birinchi bo'lib CI yozishdan boshlaymiz. Birinchi navbatda loyihamiz root papkasida .github papka ochib ichida yana workflows papka ochib unda android-ci.yml ochib olamiz.
Keling birinchi oddiy Android CI yozamiz uni vazifasi kerakli dasturlarni o'rnatib APK build qiladi.
name: Build and Release APK
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build_and_release:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x ./gradlew
- name: Build APK
run: ./gradlew assembleRelease
Keling ushbu oddiy Andorid CI konfiguratsiyani yozib main branchga push qilamiz. Repositoriyamizga android-ci.yml konfiguratsiyamizni main branchga push qilganimizdan keyin repositoriyamizda Actions bo'limiga o'tib jarayonni kuzatishimiz mumkin.
Okey bizda jarayon muvaffaqiyatli yakunlandi.
Endi keling ushbu kichik Andorid CI tuzulishini qanday ishlashini ko'rib chiqamiz, undan keyin keyingi bosqichlarga o'tsak bo'ladi.
name: Build and Release APK
on:
push:
branches: [main]
pull_request:
branches: [main]
Ushbu qismda birinchi qator workflow nomini belgilaydi bu holda bizda Build and Release APK bo'ladi. Keyingi belgilangan qism esa Trigger deb nomlanadi, ya'ni loyihamiz repositoriyasi main branchga commit bo'lib o'zgarish bo'lganida va yoki pull request kelib tushganda avtomatik Github Actions ishga tushishini bildiradi.
jobs:
build_and_release:
runs-on: ubuntu-latest
Bu qismda build_and_release nomli bitta job ochiladi va u ubuntu-latest runnerda ishga tushishini bildiradi.
- name: Checkout Repository
uses: actions/checkout@v4
Bu qism actions/checkout@v4 (opens in a new tab) orqali loyiha kodlarni runnerda klon qilib oladi.
- name: Setup JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
Ushbu qismda ubuntu-latest runnerga actions/setup-java@v4 (opens in a new tab) orqali Java JDK 17 temurin distributioni o'rnatadi.
- name: Grant execute permission for gradlew
run: chmod +x ./gradlew
Gradle orqali APK build qilishimiz uchun gradlewga execute qilish permissionni beramiz.
- name: Build APK
run: ./gradlew assembleRelease
Gradle yordamida APK build qilamiz.
Yuqorida biz oddiy, sodda Android CI yozdik keling endi Andorid CI'ni kengaytiramiz.
name: Android CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
cache-gradle:
name: Cache Gradle dependencies
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v4
- name: Cache Gradle
uses: actions/cache@v4
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle-
android-ci.yml konfiguratsiyamizni quyidagi yangilaymiz. ushbu yangilashda biz keyingi CI'lar tezroq ishlashi uchun actions/cache@v4 (opens in a new tab) yordamida Gradle keshlashni sozladik. Ushbu CI qismda biz matrix usuldan foydalanamiz va bir nechta boshqichlar qo'shamiz bular quyidagilar:
- -> Cache Gradle dependencies
- -> Perform lint check
- -> Perform Unit Testing
- -> Perform Instrumentation Testing
- -> Generate Debug APK
- -> Perform static code analysis
Perform lint check
-> Cache Gradle dependencies bosqichidan keyin undan keyingi bosqichlar parallel ishga tusha boshlaydi. Ushbu Perform lint check bosqichi Android loyihani lint check qilib kodlarni tekshirishdan iborat. Ushbu bosqich ubuntu-latest runnerda ishlaydi va birinchi qadami gradle keshlarini olishdan boshlanadi, keyin actions/checkout@v4 (opens in a new tab) orqali loyiha kodlarini klon qilib oladi, JDK 17 o'rnatadi runnerda muhitni sozlab oladi. gradlew
ga chmod +x
qilib execute permission beriladi va ./gradlew lintDebug
buyrug'i orqali lint check boshlandi. Lin check report html faylda bo'lib app/build/reports/lint-results-debug.html
joylashgan bo'ladi biz bu reportni actions/upload-artifact@v4 (opens in a new tab) orqali lint.html
qilib Github Actions artifatlarga yuklab qo'yamiz.
lint:
name: Perform lint check
needs: [cache-gradle]
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v4
- name: Set up Java JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Make Gradle executable
run: chmod +x ./gradlew
- name: Run lint
run: ./gradlew lintDebug
- name: Upload html test report
uses: actions/upload-artifact@v4
with:
name: lint.html
path: app/build/reports/lint-results-debug.html
Perform Unit Testing
Ushbu bosqichda Android loyihamizga yozilgan Unit Testlarni ishga tushirib loyihani test qiladi. Unit Test reportlar app/build/reports/test/testDebugUnitTest/
joylashgab bo'ladi va biz uni actions/upload-artifact@v4 (opens in a new tab) orqali unit_test_report.zip
qilib Github Actions artifaktlarga yuklab qo'yamiz.
unit-test:
name: Perform Unit Testing
needs: [cache-gradle]
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v4
- name: Set up Java JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Run tests
run: ./gradlew test
- name: Upload test report
uses: actions/upload-artifact@v4
with:
name: unit_test_report
path: app/build/reports/test/testDebugUnitTest/
Perform Instrumentation Testing
Bu bosqichda Android applicationimizda Instrumentation Test, Espressolarni ishga tushiradi.
Espresso - bu Android applicationlar uchun UI testlarini yozish uchun keng qo'llaniladigan test tizimi. U Android applicationning foydalanuvchi interfeysidagi elementlarning xatti-harakatlari bilan o'zaro aloqada bo'lish va tasdiqlash uchun fluent API taqdim etadi. ubuntu-latest runnerda Espresso testlarini ishga tushirish uchun reactivecircus/android-emulator-runner@v2 (opens in a new tab) yordamida API leveli 29 bo'lgan Android emulator o'natiladi va ./gradlew connectedCheck
buyrug'i yordamida o'rnatilgan android emulatorda Espresso testlari ishga tushira boshlanadi. Instrumentation Test reportlari app/build/reports/androidTests/connected
joylashgan bo'ladi biz uni instrumentation_test_report.zip
qilib Github Actions artifactlarga yuklaymiz.
instrumentation-test:
name: Perform Instrumentation Testing
needs: [cache-gradle]
runs-on: macos-latest
steps:
- name: Checkout the code
uses: actions/checkout@v4
- name: Set up Java JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Run espresso tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 29
script: ./gradlew connectedCheck
- name: Upload Instrumentation Test report
uses: actions/upload-artifact@v4
with:
name: instrumentation_test_report
path: app/build/reports/androidTests/connected
Generate Debug APK
Bu bosqichda biz debug APK build qilamiz. ubuntu-latest runnerda APK build qilish uchun envrironment sozlab olingandan keyin ./gradlew assembleDebug --stacktrace
buyrug'i yordamida debug APK build qilamiz. Debug APK app/build/outputs/apk/debug/app-debug.apk
da joylashgan bo'ladi biz uni sample-app.apk qilib Github Actions artifactlarga yuklab qo'yamiz
debug-apk:
name: Generate Debug APK
needs: [cache-gradle]
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v4
- name: Set up Java JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Build debug APK
run: ./gradlew assembleDebug --stacktrace
- name: Upload APK
uses: actions/upload-artifact@v4
with:
name: sample-app.apk
path: app/build/outputs/apk/debug/app-debug.apk
Ushbu qismda bizning to'liq android-ci.yml Github Actions CI pipelinemiz quyidagicha.
name: Android CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
cache-gradle:
name: Cache Gradle dependencies
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v4
- name: Cache Gradle
uses: actions/cache@v4
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle-
lint:
name: Perform lint check
needs: [cache-gradle]
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v4
- name: Set up Java JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Make Gradle executable
run: chmod +x ./gradlew
- name: Run lint
run: ./gradlew lintDebug
- name: Upload html test report
uses: actions/upload-artifact@v4
with:
name: lint.html
path: app/build/reports/lint-results-debug.html
unit-test:
name: Perform Unit Testing
needs: [cache-gradle]
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v4
- name: Set up Java JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Run tests
run: ./gradlew test
- name: Upload test report
uses: actions/upload-artifact@v4
with:
name: unit_test_report
path: app/build/reports/test/testDebugUnitTest/
instrumentation-test:
name: Perform Instrumentation Testing
needs: [cache-gradle]
runs-on: macos-latest
steps:
- name: Checkout the code
uses: actions/checkout@v4
- name: Set up Java JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Run espresso tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 29
script: ./gradlew connectedCheck
- name: Upload Instrumentation Test report
uses: actions/upload-artifact@v4
with:
name: instrumentation_test_report
path: app/build/reports/androidTests/connected
debug-apk:
name: Generate Debug APK
needs: [cache-gradle]
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v4
- name: Set up Java JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Build debug APK
run: ./gradlew assembleDebug --stacktrace
- name: Upload APK
uses: actions/upload-artifact@v4
with:
name: sample-app.apk
path: app/build/outputs/apk/debug/app-debug.apk
Ushbu Android CI'ni main branchga push qilamiz u avtomatik ishga tushadi va biz jarayoni repositoriyamiz Actions bo'limidan kuzatishimiz mumkin.
Okeey bizda barcha Anroid CI bosqichlar muvaffaqiyatli o'z ishini tugatdi. Artifacts bo'limiga o'tsak bizda artifactga yuklagan artifactlarimizni ko'rishimiz mumkin.
Keling instrumentation_test_report va lint.html artifactlarni yuklab olamiz bizga .zip arxivda yuklab olamiz bularni arxivdan chiqarib olib index.html faylini brauzer orqali ochamiz, shunda biz reportlarni ko'rishimiz mumkin.
Perform Instrumentation Testing reportlari. Perform lint check reportlari.
Perform static code analysis
Ushbu bosqichda biz kodni sifatini aniqlash uchun static kod analizlardan foydalanamiz bu holda bizda SonarQube.
SonarQube kod sifatini tekshirish va statik tahlil qilish tooldir. Ular muammolarni erta aniqlash, kodlash standartlarini joriy etish, xavfsizlik zaifliklarini aniqlash, texnik debtlarni boshqarish va fikr-mulohazalar uchun CI/CD pipelinelar bilan integratsiyalashuv orqali yuqori sifatli kodni ta'minlaydi. Ushbu toollar dasturiy ta'minot loyihalarida kod sifati, xavfsizligi va barqarorligini ta'minlash uchun zarurdir.
Biz ushbu loyiha uchun SonarClouddan foydalanamiz.
1-> sonarcloud.io (opens in a new tab)'dan Github orqali ro'yxatdan o'tamiz.
2-> Github orqali ro'yxatdan o'tganimizdan keyin organizatsiya import qilamiz -> Import an organization
3-> Import an organization bosganimzidan keyin SonarCloudni qaysi repositoriyalarga yoki barcha repositoriyalarga o'rnatishni so'raydi, siz hohalsangiz bitta repositoriyaga yoki barcha repositoriyalarni tanlab SonarCloudni o'rnatishingiz mumkin.
4-> Organizatsiya import qilinganidan keyin sizdan organizatsiya sozlash oynasi ochiladi siz organizatsiya nomini va unga keyini yozib kiritasiz va plan tanlaysiz bu ushbu amaliyot uchun free(bepul) planni tanlab ishlaymiz lekin free planda faqat public repositoriyalarda SonarCloudni ishlata olasiz. Agar siz SonarQubeni private repositoriyalar uchun ham ishlatmochi bo'lsangiz SonarQube Community Editionni serveringizga o'rnatib olib ishlatishingiz mumkin.
5-> Bu qismda biz repositoriyamizni tanlaymiz va Set Up bosib keyingi SonarCloudni belgilangan repositoriya o'rnatamiz.
6-> Ushbu qismdan biz har safar Githubgagi loyihamiz kodlari o'zgarganda kod analiz ishlashini tanlaymiz.
Va bizda quyidagi oyna ochiladi.
Okeey hozir biz loyihamiz uchun SonarCloud sozlab oldik keling endi uni ishlashini test qilib sinab ko'ramiz. Github repositoriyamizda birorta o'zgartirish qilib main branchga push qilamiz va bizda SonarCloud CI ishlashi kerak.
Github Actionsda ko'rganimizda bizda SonarCloud Code Analysis muvaffaqiyatli ishlaganini ko'rishimiz mumkin.
Okeey Github Actionsda SonarCloud ishladi keling buni SonarCloud o'zida ham tekshirib ko'ramiz.
Okeey hammasi zo'r biz Android CIni shu yerda to'xtatamiz va keyingi bosqichga ya'ni Android CD'ga o'tamiz.
Android CD
Yuqorida biz Android CIni yozishni ko'rib chiqdik bu qismda esa biz Android CDni ko'rib chiqamiz. Android CDda biz Android CI muvaffaqiyatli tugagidan keyin boshlashini belgilaymiz va Android applicationni Play Storega joylash uchun imzolaymiz va AAB (Android App Bundle) ko'rinishda Play Storega joylashtirishni ko'rib chiqamiz.
.github/workflows papkasida android-cd.yml YML konfiguratsiya ochib olamiz.
.github
└── workflows
├── android-cd.yml
└── android-ci.yml
Esingizda bo'lsa biz android-ci.yml konfiguratsiyamizda Workflowga Android CI deb nom bergan edik.
name: Android CI
on:
push:
branches: [main]
pull_request:
branches: [main]
Biz android-cd.yml konfiguratsiyamizni quyidagicha yozamiz.
name: Android CD
on:
workflow_run:
workflows: ["Android CI"]
types:
- completed
Bu konfiguratsiya Android CI nomli workflow muvaffaqiyatli o'z ishini tugatganidan keyin ushbu workflow ishga tushini bildiradi, ya'ni Android CI muvaffaqiyatli tugaganidan keyin Android CD workflow ishga tushadi.
jobs:
apk:
name: Build Release signed APK
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '17'
cache: gradle
Bu konfiguratsiya apk nomli jobni belgilaydi, jobga Build Release signed APK deb nom beriladi va bu job ubuntu-latest runnerda ishga tushadi. actions/checkout@v4 (opens in a new tab) orqali loyiha kodlarni runnerda klon qilib oladi va actions/setup-java@v4 (opens in a new tab) orqali Java JDK 17 temurin distributioni o'rnatadi.
- name: Make Gradle executable
run: chmod +x ./gradlew
- name: Build Release APK
run: ./gradlew assembleRelease
Bu qismda Gradle gradlew
ni execute qilish uchun permission beriladi va ./gradlew assembleRelease
buyrug'i orqali production uchun Android Release qilinadi
- name: Sign APK
uses: r0adkll/sign-android-release@v1
id: sign_app
with:
releaseDirectory: app/build/outputs/apk/release
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: ${{ secrets.KEY_ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
env:
BUILD_TOOLS_VERSION: "30.0.2"
Sizda Google Play Store ochilgan va aktiv holatda bo'lishi kerak. Siz applicationingizni Play Storega joylashtirishingiz uchun applicationingizni imzolab olishingiz kerak. Github Actions Play Storega kira olishi va application joylashtira olishi uchun quyidagi Play Store secretlarni Actions Secretsga qo'shib qo'yishingiz kerak bo'ladi.
Actions secretsga seretlarni qo'shish uchun:
-> Github repositoriyamiz -> Settings -> Secrets and variables -> Actions -> New repository secret
Bu bosqichda r0adkll/sign-android-release@v1 (opens in a new tab) yordamida applicationimizni Play Storega chiqarish uchun imzolaymiz. Build Tools Version: 30.0.2 belgilagan holda app/build/outputs/apk/release papkadagi applicationni imzolaymiz.
- name: Upload Signed APK
uses: actions/upload-artifact@v4
with:
name: sample-app-signed
path: app/build/outputs/apk/release/*.apk
Bu bosqichda esa imzolangan applicationni Github Actions Articatlarga yuklaymiz, ya'ni app/build/outputs/apk/release/*.apk joylashgan imzolangan applicationni sample-app-signed nom bilan Github Actions Artifatga yuklaymiz.
deploy:
name: Deploy release AAB on Playstore
needs: [apk]
runs-on: ubuntu-latest
steps:
- name: Create service_account.json
run: echo '${{ secrets.SERVICE_ACCOUNT_JSON }}' > service_account.json
- name: Deploy to Play Store
uses: r0adkll/upload-google-play@v1
with:
serviceAccountJson: service_account.json
packageName: ${{ github.event.inputs.app_id }}
releaseFiles: app/build/outputs/bundle/release/*.aab
track: internal
whatsNewDirectory: whatsnew/
mappingFile: app/build/outputs/mapping/release/mapping.txt
inAppUpdatePriority: 5
Bu bosqichda yangi deploy nomli job belgilanadi va bu job apk nomli job o'z ishini muvaffaqiyatli tugatganidan keyin ishga tushadi.
- name: Create service_account.json
run: echo '${{ secrets.SERVICE_ACCOUNT_JSON }}' > service_account.json
Bu qismda Actions Secretsdagi SERVICE_ACCOUNT_JSON
secretni olib service_account.json
yaratib oladi.
- name: Deploy to Play Store
uses: r0adkll/upload-google-play@v1
with:
serviceAccountJson: service_account.json
packageName: ${{ github.event.inputs.app_id }}
releaseFiles: app/build/outputs/bundle/release/*.aab
track: internal
whatsNewDirectory: whatsnew/
mappingFile: app/build/outputs/mapping/release/mapping.txt
inAppUpdatePriority: 5
Ushbu qismda r0adkll/sign-android-release@v1 (opens in a new tab) yordamida Play Storega service_account.json
bilan kiradi va bundan oldingi jobda AAB build qilinib imzolangan applicationni(app/build/outputs/bundle/release/*.aab
) Play Storega deploy qiladi.
track: internal bu Play Storega deploy qilinganda keng jamoaga emas balki tashkilot jamoasi, asosan QA testerlar ko'rishi uchun ochiladi va QA Testerlar tasdiqlaganidan keyin public keng jamoatchilikga ko'rinadi.
whatsNewDirectory: whatsnew/ esa yangi reliz chiqganida applicationda qanday o'zgarishlar bo'lgani haqida yozilgan papkani ko'rsatadi.
mappingFile: app/build/outputs/mapping/release/mapping.txt bu esa ProGuard mapping faylga yo'lni(path)ni bildiradi. ProGuard applicationni kichraytirish, optimallashtirish uchun ishlatiladigan tool hisoblanadi batafsil -> ProGuard (opens in a new tab)
inAppUpdatePriority: 5 bu foydalanuvchilar uchun ushbu applicationni yangilash prioritysi yani ustuvorligi hisoblanadi.
Biz to'liq Android CD quyidagicha.
name: Android CD
on:
workflow_run:
workflows: ["Android CI"]
types:
- completed
jobs:
apk:
name: Build Release signed APK
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '17'
cache: gradle
- name: Make Gradle executable
run: chmod +x ./gradlew
- name: Build Release APK
run: ./gradlew assembleRelease
- name: Sign APK
uses: r0adkll/sign-android-release@v1
id: sign_app
with:
releaseDirectory: app/build/outputs/apk/release
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: ${{ secrets.KEY_ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
env:
BUILD_TOOLS_VERSION: "30.0.2"
- name: Upload Signed APK
uses: actions/upload-artifact@v4
with:
name: sample-app-signed
path: app/build/outputs/apk/release/*.apk
deploy:
name: Deploy release AAB on Playstore
needs: [apk]
runs-on: ubuntu-latest
steps:
- name: Create service_account.json
run: echo '${{ secrets.SERVICE_ACCOUNT_JSON }}' > service_account.json
- name: Deploy to Play Store
uses: r0adkll/upload-google-play@v1
with:
serviceAccountJson: service_account.json
packageName: ${{ github.event.inputs.app_id }}
releaseFiles: app/build/outputs/bundle/release/*.aab
track: internal
whatsNewDirectory: whatsnew/
mappingFile: app/build/outputs/mapping/release/mapping.txt
inAppUpdatePriority: 5
Okeeey biz bu amaliyotda ko'p narsalarni ko'rib amaliyotda qo'llay oldik shu qismda amaliyot o'z niyohasiga yetadi. Biz Android CI qismida Android loyihamizda bir nechta testlarni ishga tushirishni qo'lladik va SonarCloud bilan integratsiya qilib kod analizni qo'shdik va biz standartlaga mos keluvchi Android CI yozdik. Android CD qismida esa biz applicationimizni imzolash va uni Play Storega chiqarishni ko'rib chiqdik. Notificationlar uchun biz Discorddan foydalandik, biz discord webhook orqali Github Repositoriyamizni ulab integratsiya qildik.
Mana bizdagi Discord Notificationlar.
Qo'shimcha
Amaliyotda ishlatilgan devops-journey-uz/android-ci-cd (opens in a new tab)repositoriyalar. Github Actions namuna fayllarni ismoilovdevml/devops-tools (opens in a new tab)dan topishingiz mumkin.
Qo'shimcha Resurslar
- Gitlab Server o'rnatish va sozlash (opens in a new tab)
- Github Actions bilan Flutter CI/CD (opens in a new tab)
- Github Actions CI/CD (opens in a new tab)
- Linux Serverlarga Jenkins o'rnatish (opens in a new tab)
- Koddan Servergacha: Jenkins bilan Docker CI/CD va Discord bilan integratsiya (opens in a new tab)
- Kubernetes CI/CD | GitHub Actions + Argo CD | GitOps (opens in a new tab)
- Gitlab CI | Releaselar va Integrationlar (opens in a new tab)
Qo'llanma uchun foydalanilgan resurslar
Sana: 2024.03.23(2024-yil 23-mart)
Oxirgi yangilanish: 2024.03.23(2024-yil 23-mart)
Muallif: Otabek Ismoilov
Telegram (opens in a new tab) | GitHub (opens in a new tab) | LinkedIn (opens in a new tab) |
---|