Add jenkins build file

This commit is contained in:
zontreck 2024-07-21 02:32:47 -07:00
parent 51fde5d2db
commit b175a97c41

46
Jenkinsfile vendored Normal file
View file

@ -0,0 +1,46 @@
pipeline {
agent {
label 'linux'
}
options {
buildDiscarder(
logRotator(
numToKeepStr: '5'
)
)
}
stages {
step ("Build") {
script {
sh '''
#!/bin/bash
flutter pub get
flutter build linux
flutter build apk
'''
}
}
step ('Package') {
script {
sh '''
#!/bin/bash
cd build/linux/x64/release/bundle
tar -cvf ../../../../../linux.tgz ./
cd ../../../../app/outputs/flutter-apk
cp app-release.apk ../../../../
'''
}
}
}
post {
always {
archiveArtifacts artifacts: '*.tgz', fingerprint: true
archiveArtifacts artifacts: '*.apk', fingerprint: true
deleteDir()
}
}
}