fix: correct Jenkinsfile parameter syntax for pipeline compatibility

This commit is contained in:
dmit.b
2026-05-16 18:25:45 +03:00
parent 790ec905b2
commit 45aa279ed8
Vendored
+17 -7
View File
@@ -15,15 +15,15 @@ pipeline {
} }
parameters { parameters {
string(name: 'BUILD_TYPE', value: 'all', description: 'Build type: all, android, web') string(name: 'BUILD_TYPE', defaultValue: 'all', description: 'Build type: all, android, web')
string(name: 'ANDROID_FLAVOR', value: 'release', description: 'Android build: debug, release') string(name: 'ANDROID_FLAVOR', defaultValue: 'release', description: 'Android build: debug, release')
string(name: 'VERSION_NAME', value: '', description: 'Override version name (optional)') string(name: 'VERSION_NAME', defaultValue: '', description: 'Override version name (optional)')
string(name: 'VERSION_CODE', value: '', description: 'Override version code (optional)') string(name: 'VERSION_CODE', defaultValue: '', description: 'Override version code (optional)')
booleanParam(name: 'CLEAN_BUILD', value: true, description: 'Run flutter clean before build') booleanParam(name: 'CLEAN_BUILD', defaultValue: true, description: 'Run flutter clean before build')
} }
triggers { triggers {
pollSCM('H 2 * * *') cron('H 2 * * *')
} }
stages { stages {
@@ -45,7 +45,7 @@ pipeline {
stage('Environment Setup') { stage('Environment Setup') {
steps { steps {
script { script {
def flutterHome = tool name: 'Flutter', type: 'flutter' def flutterHome = tool name: 'Flutter', type: 'Flutter'
env.PATH = "${flutterHome}/bin:${env.PATH}" env.PATH = "${flutterHome}/bin:${env.PATH}"
sh 'flutter doctor -v' sh 'flutter doctor -v'
} }
@@ -75,6 +75,16 @@ pipeline {
} }
} }
stage('Tests') {
steps {
sh 'flutter test --concurrency=1'
}
post {
always {
junit allowEmptyResults: true, testResults: '**/test-results/*.xml'
}
}
}
stage('Build Android') { stage('Build Android') {
when { when {