Dev #4
Vendored
+22
-22
@@ -14,29 +14,29 @@ pipeline {
|
||||
timestamps()
|
||||
}
|
||||
|
||||
parameters {
|
||||
string(name: 'BUILD_TYPE', defaultValue: 'all', description: 'Build type: all, android, web')
|
||||
string(name: 'ANDROID_FLAVOR', defaultValue: 'release', description: 'Android build: debug, release')
|
||||
string(name: 'VERSION_NAME', defaultValue: '', description: 'Override version name (optional)')
|
||||
string(name: 'VERSION_CODE', defaultValue: '', description: 'Override version code (optional)')
|
||||
booleanParam(name: 'CLEAN_BUILD', defaultValue: true, description: 'Run flutter clean before build')
|
||||
}
|
||||
// parameters {
|
||||
// string(name: 'BUILD_TYPE', defaultValue: 'all', description: 'Build type: all, android, web')
|
||||
// string(name: 'ANDROID_FLAVOR', defaultValue: 'release', description: 'Android build: debug, release')
|
||||
// string(name: 'VERSION_NAME', defaultValue: '', description: 'Override version name (optional)')
|
||||
// string(name: 'VERSION_CODE', defaultValue: '', description: 'Override version code (optional)')
|
||||
// booleanParam(name: 'CLEAN_BUILD', defaultValue: true, description: 'Run flutter clean before build')
|
||||
// }
|
||||
|
||||
stages {
|
||||
stage('Preparation') {
|
||||
steps {
|
||||
script {
|
||||
def buildType = params.BUILD_TYPE.toLowerCase()
|
||||
if (buildType == 'all' || buildType == 'android') {
|
||||
currentBuild.description = "Android ${params.ANDROID_FLAVOR}"
|
||||
} else if (buildType == 'web') {
|
||||
currentBuild.description = "Web"
|
||||
} else {
|
||||
error("Unknown BUILD_TYPE: ${buildType}. Use 'all', 'android', or 'web'")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// stages {
|
||||
// stage('Preparation') {
|
||||
// steps {
|
||||
// script {
|
||||
// def buildType = params.BUILD_TYPE.toLowerCase()
|
||||
// if (buildType == 'all' || buildType == 'android') {
|
||||
// currentBuild.description = "Android ${params.ANDROID_FLAVOR}"
|
||||
// } else if (buildType == 'web') {
|
||||
// currentBuild.description = "Web"
|
||||
// } else {
|
||||
// error("Unknown BUILD_TYPE: ${buildType}. Use 'all', 'android', or 'web'")
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
stage('Environment Setup') {
|
||||
steps {
|
||||
|
||||
Reference in New Issue
Block a user