Обновить Jenkinsfile
This commit is contained in:
Vendored
+22
-22
@@ -14,29 +14,29 @@ pipeline {
|
|||||||
timestamps()
|
timestamps()
|
||||||
}
|
}
|
||||||
|
|
||||||
parameters {
|
// parameters {
|
||||||
string(name: 'BUILD_TYPE', defaultValue: 'all', description: 'Build type: all, android, web')
|
// 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: 'ANDROID_FLAVOR', defaultValue: 'release', description: 'Android build: debug, release')
|
||||||
string(name: 'VERSION_NAME', defaultValue: '', description: 'Override version name (optional)')
|
// string(name: 'VERSION_NAME', defaultValue: '', description: 'Override version name (optional)')
|
||||||
string(name: 'VERSION_CODE', defaultValue: '', description: 'Override version code (optional)')
|
// string(name: 'VERSION_CODE', defaultValue: '', description: 'Override version code (optional)')
|
||||||
booleanParam(name: 'CLEAN_BUILD', defaultValue: true, description: 'Run flutter clean before build')
|
// booleanParam(name: 'CLEAN_BUILD', defaultValue: true, description: 'Run flutter clean before build')
|
||||||
}
|
// }
|
||||||
|
|
||||||
stages {
|
// stages {
|
||||||
stage('Preparation') {
|
// stage('Preparation') {
|
||||||
steps {
|
// steps {
|
||||||
script {
|
// script {
|
||||||
def buildType = params.BUILD_TYPE.toLowerCase()
|
// def buildType = params.BUILD_TYPE.toLowerCase()
|
||||||
if (buildType == 'all' || buildType == 'android') {
|
// if (buildType == 'all' || buildType == 'android') {
|
||||||
currentBuild.description = "Android ${params.ANDROID_FLAVOR}"
|
// currentBuild.description = "Android ${params.ANDROID_FLAVOR}"
|
||||||
} else if (buildType == 'web') {
|
// } else if (buildType == 'web') {
|
||||||
currentBuild.description = "Web"
|
// currentBuild.description = "Web"
|
||||||
} else {
|
// } else {
|
||||||
error("Unknown BUILD_TYPE: ${buildType}. Use 'all', 'android', or 'web'")
|
// error("Unknown BUILD_TYPE: ${buildType}. Use 'all', 'android', or 'web'")
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
stage('Environment Setup') {
|
stage('Environment Setup') {
|
||||||
steps {
|
steps {
|
||||||
|
|||||||
Reference in New Issue
Block a user