Update Jenkinsfile
Some checks failed
Firka/firka/pipeline/head There was a failure building this commit

This commit is contained in:
Armand 2025-05-12 11:48:35 +02:00
parent 0a7fae9ed5
commit f5b50cf89b
Signed by: 4831c0
GPG Key ID: 3F97EDDF98E45AA4
2 changed files with 41 additions and 85 deletions

120
Jenkinsfile vendored
View File

@ -1,91 +1,47 @@
pipeline {
agent any
stages {
stage('Clone firka') {
steps {
script {
sh 'rm -rf src'
}
dir('src') {
checkout scm
}
script {
sh 'cd src && git submodule update --init --recursive'
}
stages {
stage('Clone firka') {
steps {
script {
sh 'rm -rf src'
}
}
stage('Make work dir') {
steps {
script {
sh 'mkdir -p work'
}
dir('src') {
checkout scm
}
}
stage('Make cache dir') {
steps {
script {
sh 'mkdir -p cache'
}
script {
sh 'cd src && git submodule update --init --recursive'
}
}
stage('Clone builder release') {
when {
branch 'main'
}
steps {
git url: 'https://git.qwit.cloud/firka/firka-builder.git', branch: 'release'
}
}
stage('Clone builder debug') {
when {
not {
branch 'main'
}
}
steps {
git url: 'https://git.qwit.cloud/firka/firka-builder.git', branch: 'debug'
}
}
stage('Build firka') {
steps {
dir('firka-builder') {
sh 'docker compose up --build --exit-code-from firka-builder'
}
}
}
stage('Publish release artifacts') {
when {
branch 'main'
}
steps {
archiveArtifacts artifacts: 'work/firka/build/app/outputs/apk/release/app-*-release.apk', fingerprint: true
}
}
stage('Publish debug artifacts') {
when {
not {
branch 'main'
}
}
steps {
archiveArtifacts artifacts: 'work/firka/build/app/outputs/apk/debug/app-debug.apk', fingerprint: true
}
}
}
post {
always {
script {
sh 'pwd && docker compose down'
}
}
}
stage('Build firka') {
steps {
dir('src') {
sh 'nix develop -c "./tools/linux/build_apk.sh ' + env.BRANCH_NAME + '"'
}
}
}
stage('Publish release artifacts') {
when {
branch 'main'
}
steps {
archiveArtifacts artifacts: 'src/firka/build/app/outputs/flutter-apk/app-*-release.apk', fingerprint: true
}
}
stage('Publish debug artifacts') {
when {
not {
branch 'main'
}
}
steps {
archiveArtifacts artifacts: 'src/firka/build/app/outputs/flutter-apk/app-debug.apk', fingerprint: true
}
}
}
}

View File

@ -3,6 +3,6 @@
cd firka
flutter gen-l10n --template-arb-file app_hu.arb
git branch | grep '*' | grep dev >/dev/null \
&& flutter build apk --debug --target-platform android-arm,android-arm64,android-x64 \
|| flutter build apk --release --tree-shake-icons --split-per-abi --target-platform android-arm,android-arm64
echo $1 | grep main >/dev/null \
|| flutter build apk --debug --target-platform android-arm,android-arm64,android-x64 \
&& flutter build apk --release --tree-shake-icons --split-per-abi --target-platform android-arm,android-arm64