- Android PWA/WASM launcher with glassmorphism UI - Loads https://admin.dark.side directly on launch - Complete GitLab CI/CD pipeline configuration - Automated builds for Debug, Release, and AAB - Full WASM support with optimized WebView - Material Design 3 theme - Comprehensive documentation Features: - Auto-load target URL on app launch - Glassmorphism components (frosted glass effects) - Full PWA/WASM support - Room database for future extensions - Jetpack Compose UI - CI/CD with artifact storage Built for SilverLABS
8.3 KiB
GitLab CI/CD Setup - Complete Summary
✅ What Was Configured
A fully automated Android CI/CD pipeline for SilverDROID that builds, tests, and deploys your Dark Side Admin APK.
📦 Files Created
1. .gitlab-ci.yml
Complete CI/CD pipeline configuration with:
- 4 stages: prepare, test, build, deploy
- 12 jobs covering all aspects of Android development
- Automatic caching for faster builds
- Artifact storage for 30-90 days
- Parallel job execution
2. GITLAB_CICD_SETUP.md
Comprehensive setup guide including:
- Step-by-step GitLab project creation
- Runner configuration instructions
- Pipeline architecture explanation
- Troubleshooting section
- Advanced features guide
3. push-to-gitlab.sh
Bash script for automated push:
- Initializes git repository
- Configures remote
- Commits changes
- Pushes to GitLab
- Updates project metadata
4. push-to-gitlab.ps1
PowerShell version for Windows:
- Same functionality as bash script
- Windows-friendly colored output
- Error handling for Windows environments
🚀 Quick Start
Option 1: Automated Push (Recommended)
From WSL/Linux:
cd /mnt/c/Production/Source/SilverLABS/SilverDROID
./push-to-gitlab.sh
From Windows PowerShell:
cd C:\Production\Source\SilverLABS\SilverDROID
.\push-to-gitlab.ps1
Option 2: Manual Push
cd /mnt/c/Production/Source/SilverLABS/SilverDROID
# Initialize and configure
git init
git remote add origin https://gitlab.silverlabs.uk/SilverLABS/silverdroid.git
# Commit and push
git add .
git commit -m "Initial commit - SilverDROID CI/CD"
git push -u origin main
🏗️ Pipeline Overview
Build Stages
prepare (1 min)
↓
test (2 min)
├─ lint
├─ unit_tests
└─ security:scan
↓
build (3-5 min)
├─ build:debug
├─ build:release
└─ build:bundle
↓
deploy (30 sec)
├─ deploy:staging
├─ deploy:production
├─ apk:info
└─ notify:*
Total Time: ~5-8 minutes
📦 Build Outputs
Debug APK
- Path:
app/build/outputs/apk/debug/app-debug.apk - Size: ~10-15 MB
- Retention: 30 days
- Triggers: All branches
Release APK
- Path:
app/build/outputs/apk/release/app-release-unsigned.apk - Size: ~8-10 MB
- Retention: 90 days
- Triggers: main branch, tags
Android App Bundle (AAB)
- Path:
app/build/outputs/bundle/release/app-release.aab - Size: ~8-10 MB
- Retention: 90 days
- Triggers: main branch, tags
- Use: Google Play Store submission
🔧 Features
Automatic Features
✅ Gradle Caching - 90% faster subsequent builds ✅ Parallel Jobs - Multiple builds run simultaneously ✅ Artifact Storage - All APKs saved and downloadable ✅ Test Reports - JUnit XML format ✅ Lint Reports - HTML and XML format ✅ Security Scanning - Dependency vulnerability checks ✅ Build Metadata - Size, commit, date tracked
Manual Features
⚙️ Production Deployment - Manual approval required ⚙️ Signed APKs - Optional keystore configuration ⚙️ Notifications - Slack/Mattermost webhooks ⚙️ TeamCity Integration - Trigger external builds
📊 Pipeline Jobs
| Job | Purpose | Triggers | Output |
|---|---|---|---|
| prepare:dependencies | Cache Gradle deps | All | Cached .gradle/ |
| lint | Code quality | All | HTML/XML reports |
| unit_tests | Run tests | All | JUnit XML |
| security:scan | Vulnerability scan | main/develop | Security report |
| build:debug | Debug APK | All | app-debug.apk |
| build:release | Release APK | main/tags | app-release.apk |
| build:bundle | AAB bundle | main/tags | app-release.aab |
| deploy:staging | Stage deployment | develop | Staging env |
| deploy:production | Prod deployment | tags | Production env |
| apk:info | Build metadata | main/develop | apk-info.txt |
| notify:success | Success alert | main | Notification |
| notify:failure | Failure alert | main | Notification |
🌐 Access URLs
GitLab Project
https://gitlab.silverlabs.uk/SilverLABS/silverdroid
Pipeline Dashboard
https://gitlab.silverlabs.uk/SilverLABS/silverdroid/-/pipelines
Jobs List
https://gitlab.silverlabs.uk/SilverLABS/silverdroid/-/jobs
Download Latest Debug APK
https://gitlab.silverlabs.uk/SilverLABS/silverdroid/-/jobs/artifacts/main/raw/app/build/outputs/apk/debug/app-debug.apk?job=build:debug
Download Latest Release APK
https://gitlab.silverlabs.uk/SilverLABS/silverdroid/-/jobs/artifacts/main/raw/app/build/outputs/apk/release/app-release-unsigned.apk?job=build:release
🔐 Security & Signing
Optional: APK Signing
To sign release APKs, add these GitLab CI/CD variables:
Settings → CI/CD → Variables:
KEYSTORE_FILE- Base64 encoded keystoreKEYSTORE_PASSWORD- Keystore passwordKEY_ALIAS- Key alias (e.g., "silverdroid")KEY_PASSWORD- Key password
Generate keystore:
keytool -genkey -v -keystore silverdroid.keystore \
-alias silverdroid -keyalg RSA -keysize 2048 -validity 10000
base64 -w 0 silverdroid.keystore > keystore.base64
Then update .gitlab-ci.yml to use signing (see GITLAB_CICD_SETUP.md).
🔄 Workflow
Development Workflow
- Make changes to code
- Commit to feature branch
- Push to GitLab
- Pipeline runs automatically
- Debug APK generated
- Download from artifacts
- Test on device
Release Workflow
- Merge to main branch
- Tag release:
git tag v1.0.0 - Push tag:
git push origin v1.0.0 - Pipeline runs with release builds
- Release APK + AAB generated
- Manual approval for production
- Download signed APK/AAB
- Deploy to Play Store
📈 Monitoring
Pipeline Status Badge
Add to README.md:
[](https://gitlab.silverlabs.uk/SilverLABS/silverdroid/-/pipelines)
Check Pipeline Status via API
curl "https://gitlab.silverlabs.uk/api/v4/projects/SilverLABS%2Fsilverdroid/pipelines" \
--header "PRIVATE-TOKEN: glpat-wqUcD7mg53F1mgM-N-PdiW86MQp1OjEH.01.0w074ox93"
Download Latest APK via API
curl -L "https://gitlab.silverlabs.uk/api/v4/projects/SilverLABS%2Fsilverdroid/jobs/artifacts/main/download?job=build:debug" \
--header "PRIVATE-TOKEN: glpat-wqUcD7mg53F1mgM-N-PdiW86MQp1OjEH.01.0w074ox93" \
-o silverdroid-debug.zip
🐛 Troubleshooting
Pipeline Doesn't Start
- Check GitLab Runner is active: Settings → CI/CD → Runners
- Verify
.gitlab-ci.ymlis in root directory - Check syntax: CI/CD → Pipelines → CI Lint
Build Fails: "Gradle not found"
- Runner may not have Android SDK
- Using
mingc/android-build-boximage fixes this - Check
image:in.gitlab-ci.yml
Can't Download Artifacts
- Check artifact expiration hasn't passed
- Verify job completed successfully (green checkmark)
- Try direct download URL (see above)
Runner Out of Disk Space
# On GitLab server
gitlab-runner exec docker cleanup
docker system prune -a
🎯 Next Steps
-
Push to GitLab
./push-to-gitlab.sh # or .ps1 on Windows -
Watch Pipeline Run Visit: https://gitlab.silverlabs.uk/SilverLABS/silverdroid/-/pipelines
-
Wait for Build (~5-8 minutes)
-
Download APK Go to: Jobs → build:debug → Browse → app/build/outputs/apk/debug/
-
Install on Device
adb install app-debug.apk -
Test Admin Panel Launch app → Should load admin.dark.side
📚 Documentation
- GITLAB_CICD_SETUP.md - Complete setup guide
- BUILD.md - Manual build instructions
- DARK_SIDE_BUILD.md - Custom build info
- .gitlab-ci.yml - Pipeline configuration
✅ Checklist
.gitlab-ci.ymlcreated- Push scripts created (bash + PowerShell)
- Documentation written
- Push to GitLab ← Next Step
- Verify pipeline runs
- Download APK
- Test on device
🎉 Ready to Go!
Your CI/CD pipeline is fully configured. Run the push script to get started:
./push-to-gitlab.sh
Or manually push and watch the magic happen! ✨
Built for SilverLABS | Automated Android Builds