Update Jenkinsfile
Some checks failed
Firka/firka/pipeline/head There was a failure building this commit
Some checks failed
Firka/firka/pipeline/head There was a failure building this commit
This commit is contained in:
parent
0a7fae9ed5
commit
f5b50cf89b
120
Jenkinsfile
vendored
120
Jenkinsfile
vendored
@ -1,91 +1,47 @@
|
|||||||
pipeline {
|
pipeline {
|
||||||
agent any
|
agent any
|
||||||
|
|
||||||
stages {
|
stages {
|
||||||
stage('Clone firka') {
|
stage('Clone firka') {
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
sh 'rm -rf src'
|
sh 'rm -rf src'
|
||||||
}
|
|
||||||
dir('src') {
|
|
||||||
checkout scm
|
|
||||||
}
|
|
||||||
script {
|
|
||||||
sh 'cd src && git submodule update --init --recursive'
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
dir('src') {
|
||||||
|
checkout scm
|
||||||
stage('Make work dir') {
|
|
||||||
steps {
|
|
||||||
script {
|
|
||||||
sh 'mkdir -p work'
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
script {
|
||||||
|
sh 'cd src && git submodule update --init --recursive'
|
||||||
stage('Make cache dir') {
|
|
||||||
steps {
|
|
||||||
script {
|
|
||||||
sh 'mkdir -p cache'
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
cd firka
|
cd firka
|
||||||
|
|
||||||
flutter gen-l10n --template-arb-file app_hu.arb
|
flutter gen-l10n --template-arb-file app_hu.arb
|
||||||
git branch | grep '*' | grep dev >/dev/null \
|
echo $1 | grep main >/dev/null \
|
||||||
&& flutter build apk --debug --target-platform android-arm,android-arm64,android-x64 \
|
|| 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
|
&& flutter build apk --release --tree-shake-icons --split-per-abi --target-platform android-arm,android-arm64
|
||||||
|
Loading…
x
Reference in New Issue
Block a user