Dev #4

Closed
rezidir wants to merge 6 commits from dev into release
Vendored
+48 -48
View File
@@ -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'")
}
}
}
}
// 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 {
@@ -45,20 +45,20 @@ pipeline {
env.PATH = "${flutterHome}/bin:${env.PATH}"
sh 'flutter doctor -v'
}
script {
//def ANDROID_HOME = "/opt/flutter"
//env.PATH = "${flutterHome}/bin:${env.PATH}"
//sh 'find /soft -name "*droid*"'
}
// script {
// //def ANDROID_HOME = "/opt/flutter"
// //env.PATH = "${flutterHome}/bin:${env.PATH}"
// //sh 'find /soft -name "*droid*"'
// }
}
}
stage('Flutter Deps') {
when {
expression {
params.CLEAN_BUILD == true
}
}
stage('Flutter clean') {
// when {
// expression {
// params.CLEAN_BUILD == true
// }
// }
steps {
sh 'flutter clean'
}
@@ -76,16 +76,16 @@ pipeline {
}
}
stage('Tests') {
steps {
sh 'flutter test --concurrency=1'
}
post {
always {
junit allowEmptyResults: true, testResults: '**/test-results/*.xml'
}
}
}
// stage('Tests') {
// steps {
// sh 'flutter test --concurrency=1'
// }
// post {
// always {
// junit allowEmptyResults: true, testResults: '**/test-results/*.xml'
// }
// }
// }
// stage('Build Android') {
// when {
@@ -169,12 +169,12 @@ pipeline {
// }
stage('Build Web') {
when {
expression {
def buildType = params.BUILD_TYPE.toLowerCase()
buildType == 'all' || buildType == 'web'
}
}
// when {
// expression {
// def buildType = params.BUILD_TYPE.toLowerCase()
// buildType == 'all' || buildType == 'web'
// }
// }
steps {
script {
currentBuild.displayName = "#${currentBuild.number} - Web"