ci: add jenkins build file
This commit is contained in:
parent
e38acab399
commit
ba4e746349
1 changed files with 41 additions and 0 deletions
41
Jenkinsfile
vendored
Normal file
41
Jenkinsfile
vendored
Normal file
|
@ -0,0 +1,41 @@
|
|||
pipeline {
|
||||
agent any
|
||||
|
||||
options {
|
||||
buildDiscarder(
|
||||
logRotator(numToKeepStr: '5')
|
||||
)
|
||||
}
|
||||
|
||||
stages {
|
||||
stage ("Build Android") {
|
||||
agent {
|
||||
label 'linux'
|
||||
}
|
||||
|
||||
steps {
|
||||
script {
|
||||
sh '''
|
||||
#!/bin/bash
|
||||
|
||||
flutter build apk
|
||||
flutter build appbundle
|
||||
|
||||
mv build/app/outputs/flutter-apk/{app-release,timetrack}.apk
|
||||
|
||||
mv build/app/outputs/bundle/release/{app-release,timetrack}.aab
|
||||
'''
|
||||
}
|
||||
}
|
||||
|
||||
post {
|
||||
always {
|
||||
archiveArtifacts artifacts: "build/app/outputs/flutter-apk/timetrack.apk"
|
||||
archiveArtifacts artifacts: "build/app/outputs/release/timetrack.aab"
|
||||
|
||||
cleanWs()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue