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

This commit is contained in:
4831c0 2025-04-09 22:14:08 +02:00
parent 40111921e7
commit ea2bc99cfb

72
Jenkinsfile vendored Normal file
View File

@ -0,0 +1,72 @@
pipeline {
agent any
stages {
stage('Clone firka') {
steps {
script {
sh 'rm -rf src'
}
dir('src') {
checkout scm
}
}
}
stage('Make work dir') {
steps {
script {
sh 'mkdir -p work'
}
}
}
stage('Make cache dir') {
steps {
script {
sh 'mkdir -p cache'
}
}
}
if (env.BRANCH_NAME == 'main') {
stage('Clone builder release') {
steps {
git url: 'https://git.qwit.cloud/firka/firka-builder.git', branch: 'release'
}
}
} else {
stage('Clone builder debug') {
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'
}
}
}
}
post {
if (env.BRANCH_NAME == 'main') {
success {
archiveArtifacts artifacts: 'work/firka/build/app/outputs/apk/release/app-*-release.apk', fingerprint: true
}
} else {
success {
archiveArtifacts artifacts: 'work/firka/build/app/outputs/apk/debug/app-debug.apk', fingerprint: true
}
}
always {
script {
sh 'pwd && docker compose down'
}
}
}
}