Files
jenkins-pipelines/jobs-dsl/jobs/Cloud/Apps-Backend/avroid_service_lib.groovy
Rustam Tagaev 1454578765 [DO-1361] add avroid service lib and DSL job for it (!51)
Co-authored-by: Rustam Tagaev <rustam.tagaev@avroid.tech>
Reviewed-on: https://git.avroid.tech/DevOps/jenkins-pipelines/pulls/51
Reviewed-by: Denis Patrakeev <denis.patrakeev@avroid.team>
Co-authored-by: Rustam Tagaev <rustam.tagaev@avroid.team>
Co-committed-by: Rustam Tagaev <rustam.tagaev@avroid.team>
2024-11-26 18:19:51 +03:00

102 lines
3.8 KiB
Groovy

multibranchPipelineJob('Cloud/Apps-Backend/avroid-service-lib') {
description('avroid-service-lib')
displayName('avroid-service-lib')
factory {
remoteJenkinsFileWorkflowBranchProjectFactory {
localMarker('')
matchBranches(true)
fallbackBranch('master')
lookupInParameters(false)
remoteJenkinsFile('pipelines/Cloud/Apps-Backend/avroid-service-lib.groovy')
remoteJenkinsFileSCM {
gitSCM {
userRemoteConfigs {
userRemoteConfig {
url('https://git.avroid.tech/DevOps/jenkins-pipelines.git')
credentialsId('user-jenkins-in-gitea')
name('')
refspec('')
}
}
gitTool('')
browser {}
}
}
}
}
branchSources {
branchSource {
source {
giteaSCMSource {
serverUrl('https://git.avroid.tech')
repoOwner('Apps-Backend')
repository('avroid-service-lib')
credentialsId('user-jenkins-in-gitea')
id('Apps-Backend/avroid-service-lib')
traits {
giteaBranchDiscovery {
// 1 Exclude branches that are also filed as PRs
// 2 Only branches that are also filed as PRs
// 3 Only branches that are also filed as PRs or main
// 4 All branches
strategyId(1)
}
giteaPullRequestDiscovery {
// 1 Merging the pull request with the current target branch revision
// 2 The current pull request revision
// 3 Both the current pull request revision and the pull request merged with
// the current target branch revision
strategyId(2)
}
giteaForkDiscovery {
// 1 Merging the pull request with the current target branch revision
// 2 The current pull request revision
// 3 Both the current pull request revision and the pull request merged with
// the current target branch revision
strategyId(2)
trust {
giteaTrustContributors()
}
}
giteaTagDiscovery()
pruneStaleBranch()
pruneStaleTag()
refSpecs {
templates {
refSpecTemplate {
value('+refs/heads/*:refs/remotes/@{remote}/*')
}
}
}
}
}
// uncomment after reload jenkins
// buildStrategies {
// buildRegularBranches()
// buildTags {
// atLeastDays("")
// atMostDays("7")
// }
// }
}
}
}
orphanedItemStrategy {
discardOldItems {
numToKeep(20)
}
defaultOrphanedItemStrategy {
pruneDeadBranches(true)
numToKeepStr('10')
daysToKeepStr('10')
}
}
}