forked from firka/firka
ref(ci): switch to woodpecker ci
This commit is contained in:
38
.woodpecker.yml
Normal file
38
.woodpecker.yml
Normal 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
66
Jenkinsfile
vendored
@@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
47
flake.nix
47
flake.nix
@@ -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
|
||||
'';
|
||||
};
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user