76 lines
No EOL
1.7 KiB
Groovy
76 lines
No EOL
1.7 KiB
Groovy
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.apk build/app/outputs/flutter-apk/timetrack.apk
|
|
|
|
|
|
mv build/app/outputs/bundle/release/app-release.aab build/app/outputs/bundle/release/timetrack.aab
|
|
|
|
cd server/php
|
|
tar -cvf ../../php.tgz .
|
|
cd ../..
|
|
'''
|
|
}
|
|
}
|
|
|
|
post {
|
|
always {
|
|
archiveArtifacts artifacts: "build/app/outputs/flutter-apk/timetrack.apk"
|
|
archiveArtifacts artifacts: "build/app/outputs/bundle/release/timetrack.aab"
|
|
|
|
archiveArtifacts artifacts: "php.tgz"
|
|
|
|
cleanWs()
|
|
}
|
|
}
|
|
}
|
|
|
|
stage("Build Web App") {
|
|
agent {
|
|
label 'linux'
|
|
}
|
|
|
|
steps {
|
|
script {
|
|
sh '''
|
|
#!/bin/bash
|
|
|
|
flutter build web
|
|
|
|
cd build/web
|
|
tar -cvf ../../web.tgz .
|
|
cd ../..
|
|
'''
|
|
}
|
|
}
|
|
|
|
post {
|
|
always {
|
|
archiveArtifacts artifacts: "web.tgz"
|
|
|
|
cleanWs()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |