ref(ci): switch to woodpecker ci

This commit is contained in:
2026-09-03 17:20:03 +02:00
parent 1f2f7e9d4e
commit eddfe52a51
3 changed files with 38 additions and 113 deletions

38
.woodpecker.yml Normal file
View File

@@ -0,0 +1,38 @@
when:
- event: [push, pull_request]
- event: manual
steps:
- name: submodules
image: git.firka.app/firka/firka-builder:latest
commands:
- git submodule update --init --recursive
- name: secrets
image: git.firka.app/firka/firka-builder:latest
environment:
UPLOAD_KEYSTORE_B64:
from_secret: upload_keystore_b64
KEYSTORE_PROPERTIES_B64:
from_secret: keystore_properties_b64
commands:
- echo "$UPLOAD_KEYSTORE_B64" | base64 -d > secrets/upload-keystore.jks
- echo "$KEYSTORE_PROPERTIES_B64" | base64 -d > secrets/keystore.properties
- name: dependencies
image: git.firka.app/firka/firka-builder:latest
commands:
- cd firka
- flutter pub get
- name: codegen
image: git.firka.app/firka/firka-builder:latest
commands:
- cd firka
- dart run scripts/codegen.dart
- name: build
image: git.firka.app/firka/firka-builder:latest
commands:
- cd firka
- flutter build apk --release

66
Jenkinsfile vendored
View File

@@ -1,66 +0,0 @@
pipeline {
agent any
environment {
FLUTTER_ROOT = "/opt/flutter"
FLUTTER = "/opt/flutter/bin/flutter"
DART = "/opt/flutter/bin/dart"
ANDROID_SDK_ROOT = "/opt/android-sdk"
ANDROID_HOME = "/opt/android-sdk"
}
stages {
stage('Clone Submodules') {
steps {
sh 'git submodule update --init --recursive'
}
}
stage('Dependencies') {
steps {
sh '''
cd firka
$FLUTTER pub get
'''
}
}
stage('Setup') {
steps {
sh '''
cp -r /opt/secrets ./
'''
}
}
stage('Codegen') {
steps {
sh '''
cd firka
PATH="/opt/flutter/bin:$PATH" $DART run scripts/codegen.dart
'''
}
}
stage('Build') {
steps {
sh '''
cd firka
echo "--- Checking secrets path ---"
ls android/app/
ls android/app/../../../ || echo "no parent"
ls android/app/../../../secrets/ || echo "secrets not found at expected path"
$FLUTTER config --android-sdk /opt/android-sdk
$FLUTTER build apk --release
'''
}
}
stage('Archive') {
steps {
archiveArtifacts(
artifacts: 'firka/build/app/outputs/flutter-apk/app-debug.apk,firka/build/app/outputs/flutter-apk/app-release.apk',
fingerprint: true
)
}
}
}
post {
always {
deleteDir()
}
}
}

View File

@@ -1,47 +0,0 @@
{
description = "Firka — development environment";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
android-nixpkgs = {
url = "github:tadfisher/android-nixpkgs";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, flake-utils, android-nixpkgs }:
flake-utils.lib.eachSystem [ "aarch64-darwin" "x86_64-darwin" "x86_64-linux" ] (system:
let
pkgs = nixpkgs.legacyPackages.${system};
androidSdk = android-nixpkgs.sdk.${system} (sdkPkgs: with sdkPkgs; [
cmdline-tools-latest
build-tools-34-0-0
build-tools-35-0-0
build-tools-36-1-0
platform-tools
platforms-android-34
platforms-android-35
platforms-android-36
ndk-28-2-13676358
cmake-3-22-1
]);
in
{
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [
flutter
git
jq
jdk17
androidSdk
];
shellHook = ''
export GRADLE_OPTS="-Dorg.gradle.project.android.aapt2FromMavenOverride=$ANDROID_HOME/build-tools/36.1.0/aapt2"
flutter --version | head -1
dart --version
'';
};
});
}