From 382b0b235cbad64878597c34ca9eefaf571f3d69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Jos=C3=A9=20Guti=C3=A9rrez=20de=20Quevedo=20P=C3=A9?= =?UTF-8?q?rez?= Date: Tue, 25 Nov 2025 13:11:09 +0100 Subject: [PATCH] add docker build to pipeline --- .drone.yml | 27 ++++++++++++--------------- MathHomeworkHelper/gradle.properties | 2 +- 2 files changed, 13 insertions(+), 16 deletions(-) diff --git a/.drone.yml b/.drone.yml index a8f560a..2e64ac2 100644 --- a/.drone.yml +++ b/.drone.yml @@ -3,38 +3,35 @@ type: docker name: android-build 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 image: cirrusci/android-sdk:33 - environment: - GRADLE_USER_HOME: .gradle commands: - cd MathHomeworkHelper - echo "Building Debug APK..." - - chmod +x ./gradlew - - ./gradlew clean assembleDebug + - gradle clean assembleDebug - echo "Debug APK built successfully!" - # Step 2: Build Release APK - name: build-release image: cirrusci/android-sdk:33 - environment: - GRADLE_USER_HOME: .gradle commands: - cd MathHomeworkHelper - echo "Building Release APK..." - - chmod +x ./gradlew - - ./gradlew clean assembleRelease + - gradle clean assembleRelease - echo "Release APK built successfully!" - # Step 3: Run Unit Tests - name: run-tests image: cirrusci/android-sdk:33 - environment: - GRADLE_USER_HOME: .gradle commands: - cd MathHomeworkHelper - echo "Running unit tests..." - - chmod +x ./gradlew - - ./gradlew test + - gradle test - echo "Tests completed!" diff --git a/MathHomeworkHelper/gradle.properties b/MathHomeworkHelper/gradle.properties index 7eb05b0..70a6006 100644 --- a/MathHomeworkHelper/gradle.properties +++ b/MathHomeworkHelper/gradle.properties @@ -18,4 +18,4 @@ android.useAndroidX=true android.nonTransitiveRClass=true # Gradle memory settings -org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m \ No newline at end of file +org.gradle.jvmargs=-Xmx2048m