[DO-1665] add_msg_admin (!103)

Co-authored-by: Rustam Tagaev <rustam.tagaev@avroid.tech>
Reviewed-on: https://git.avroid.tech/DevOps/jenkins-pipelines/pulls/103
Reviewed-by: Aleksandr Vodyanov <aleksandr.vodyanov@avroid.team>
Reviewed-by: Denis Patrakeev <denis.patrakeev@avroid.team>
This commit is contained in:
Rustam Tagaev
2025-03-13 12:42:16 +03:00
parent 6882740096
commit 8ad06c6d32
4 changed files with 411 additions and 0 deletions

View File

@@ -0,0 +1,92 @@
multibranchPipelineJob('Cloud/Apps-Backend/msg-admin') {
description('msg-admin')
displayName('msg-admin')
factory {
remoteJenkinsFileWorkflowBranchProjectFactory {
localMarker('')
matchBranches(true)
fallbackBranch('master')
lookupInParameters(false)
remoteJenkinsFile('pipelines/Cloud/Apps-Backend/msg-admin.groovy')
remoteJenkinsFileSCM {
gitSCM {
userRemoteConfigs {
userRemoteConfig {
url("${JENKINS_GIT_REPOSITORY_URL}/DevOps/jenkins-pipelines.git")
credentialsId("${JENKINS_GIT_CREDENTIALS_HTTP}")
name('')
refspec('')
}
}
gitTool('')
browser {}
}
}
}
}
branchSources {
branchSource {
source {
giteaSCMSource {
serverUrl("${JENKINS_GIT_REPOSITORY_URL}")
repoOwner('Apps-Backend')
repository('msg-admin')
credentialsId("${JENKINS_GIT_CREDENTIALS_HTTP}")
id('Apps-Backend/msg-admin')
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}/*')
}
}
}
}
}
}
}
}
orphanedItemStrategy {
discardOldItems {
numToKeep(20)
}
defaultOrphanedItemStrategy {
pruneDeadBranches(true)
numToKeepStr('10')
daysToKeepStr('10')
}
}
}