add docker build to pipeline
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Juan José Gutiérrez de Quevedo Pérez 2025-11-25 13:11:09 +01:00
parent 91b9afa096
commit 382b0b235c
2 changed files with 13 additions and 16 deletions

View file

@ -3,38 +3,35 @@ type: docker
name: android-build name: android-build
steps: steps:
# Step 1: Build Debug APK - name: build-docker-image
image: plugins/docker
settings:
registry: docker.gutierrezdequevedo.com
repo: docker.gutierrezdequevedo.com/ps/mathstuff
tags:
- latest
- ${DRONE_COMMIT_SHA:0:7}
- name: build-debug - name: build-debug
image: cirrusci/android-sdk:33 image: cirrusci/android-sdk:33
environment:
GRADLE_USER_HOME: .gradle
commands: commands:
- cd MathHomeworkHelper - cd MathHomeworkHelper
- echo "Building Debug APK..." - echo "Building Debug APK..."
- chmod +x ./gradlew - gradle clean assembleDebug
- ./gradlew clean assembleDebug
- echo "Debug APK built successfully!" - echo "Debug APK built successfully!"
# Step 2: Build Release APK
- name: build-release - name: build-release
image: cirrusci/android-sdk:33 image: cirrusci/android-sdk:33
environment:
GRADLE_USER_HOME: .gradle
commands: commands:
- cd MathHomeworkHelper - cd MathHomeworkHelper
- echo "Building Release APK..." - echo "Building Release APK..."
- chmod +x ./gradlew - gradle clean assembleRelease
- ./gradlew clean assembleRelease
- echo "Release APK built successfully!" - echo "Release APK built successfully!"
# Step 3: Run Unit Tests
- name: run-tests - name: run-tests
image: cirrusci/android-sdk:33 image: cirrusci/android-sdk:33
environment:
GRADLE_USER_HOME: .gradle
commands: commands:
- cd MathHomeworkHelper - cd MathHomeworkHelper
- echo "Running unit tests..." - echo "Running unit tests..."
- chmod +x ./gradlew - gradle test
- ./gradlew test
- echo "Tests completed!" - echo "Tests completed!"

View file

@ -18,4 +18,4 @@ android.useAndroidX=true
android.nonTransitiveRClass=true android.nonTransitiveRClass=true
# Gradle memory settings # Gradle memory settings
org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m org.gradle.jvmargs=-Xmx2048m