Add 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
40111921e7
commit
ea2bc99cfb
72
Jenkinsfile
vendored
Normal file
72
Jenkinsfile
vendored
Normal 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'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user