Add jenkins build file
This commit is contained in:
parent
51fde5d2db
commit
b175a97c41
1 changed files with 46 additions and 0 deletions
46
Jenkinsfile
vendored
Normal file
46
Jenkinsfile
vendored
Normal 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()
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue