fix teamcity find artifacts

This commit is contained in:
Зеленцов Никита 2022-07-29 12:06:54 +03:00
parent 3c53bb6dc1
commit 961c983966
2 changed files with 14 additions and 33 deletions

View File

@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/) The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/). and this project adheres to [Semantic Versioning](http://semver.org/).
## [1.3.0] - 2022-07-29
### Added
- Add build type for china env
### Changes
- Remove "Setup Skeletor" task
- Combine env var with artifacts path with artifacts rules
## [1.2.1] - 2022-07-19 ## [1.2.1] - 2022-07-19
### Added ### Added
- Environment param for set artifact path - Environment param for set artifact path

View File

@ -67,24 +67,17 @@ project {
} }
object BuildAndroid : BuildAndroidType("", "prod/global_android") object BuildAndroid : BuildAndroidType("", "prod/global_android")
object BuildAndroidDev : BuildAndroidType("Dev", "dev/global_android") object BuildAndroidDev : BuildAndroidType("Dev", "dev/global_android")
object BuildAndroidCh : BuildAndroidType("Ch", "prod/china_android")
object BuildIOS : BuildIOSType("", "prod/global_ios") object BuildIOS : BuildIOSType("", "prod/global_ios")
object BuildIOSDev : BuildIOSType("Dev", "dev/global_ios") object BuildIOSDev : BuildIOSType("Dev", "dev/global_ios")
object BuildIOSCh : BuildIOSType("Ch", "prod/china_ios")
open class BuildAndroidType(name_suffix : String, environment : String) : open class BuildAndroidType(name_suffix : String, environment : String) :
BuildType({ BuildType({
name = "Build Android " + name_suffix name = "Build Android " + name_suffix
artifactRules = "%build.env.artifactRules%"
var artifact_path : String = "%build.env.artifactPath%"
var artifact_rules : String = "%build.env.artifactRules%"
var artifact_rules_with_path : String = ""
artifact_rules.split("\n").forEach {
artifact_rules_with_path += artifact_path + it + "\n"
}
artifactRules = artifact_rules_with_path
vcs { vcs {
root(GitProjectRepo) root(GitProjectRepo)
@ -94,8 +87,7 @@ open class BuildAndroidType(name_suffix : String, environment : String) :
params { params {
param("build.env.buildName", "%system.teamcity.buildConfName%") param("build.env.buildName", "%system.teamcity.buildConfName%")
param("build.env.workDir", "%system.teamcity.build.workingDir%") param("build.env.workDir", "%system.teamcity.build.workingDir%")
param("build.env.artifactPath", "artifacts/android/") param("build.env.artifactRules", "artifacts/android/*.apk\nartifacts/android/*.aab")
param("build.env.artifactRules", "*.apk\n*.aab")
} }
features { features {
@ -115,10 +107,6 @@ open class BuildAndroidType(name_suffix : String, environment : String) :
} }
steps { steps {
script {
name = "Setup Skeletor"
scriptContent = "./setup.sh"
}
script { script {
name = "Deps Update" name = "Deps Update"
scriptContent = "./gamectl deps_update" scriptContent = "./gamectl deps_update"
@ -143,16 +131,7 @@ open class BuildAndroidType(name_suffix : String, environment : String) :
open class BuildIOSType(name_suffix : String, environment : String) : open class BuildIOSType(name_suffix : String, environment : String) :
BuildType({ BuildType({
name = "Build IOS " + name_suffix name = "Build IOS " + name_suffix
artifactRules = "%build.env.artifactRules%"
var artifact_path : String = "%build.env.artifactPath%"
var artifact_rules : String = "%build.env.artifactRules%"
var artifact_rules_with_path : String = ""
artifact_rules.split("\n").forEach {
artifact_rules_with_path += artifact_path + it + "\n"
}
artifactRules = artifact_rules_with_path
vcs { vcs {
root(GitProjectRepo) root(GitProjectRepo)
@ -162,8 +141,7 @@ open class BuildIOSType(name_suffix : String, environment : String) :
params { params {
param("build.env.buildName", "%system.teamcity.buildConfName%") param("build.env.buildName", "%system.teamcity.buildConfName%")
param("build.env.workDir", "%system.teamcity.build.workingDir%") param("build.env.workDir", "%system.teamcity.build.workingDir%")
param("build.env.artifactPath", "artifacts/ios/") param("build.env.artifactRules", "artifacts/ios/*.ipa")
param("build.env.artifactRules", "*.ipa")
} }
features { features {
@ -183,10 +161,6 @@ open class BuildIOSType(name_suffix : String, environment : String) :
} }
steps { steps {
script {
name = "Setup Skeletor"
scriptContent = "./setup.sh"
}
script { script {
name = "Deps Update" name = "Deps Update"
scriptContent = "./gamectl deps_update" scriptContent = "./gamectl deps_update"