Files
jenkins-pipelines/jobs-dsl/jobs/Cloud/Apps-Frontend/web_cloud_messenger_host.groovy
2025-02-10 12:42:32 +03:00

93 lines
3.5 KiB
Groovy

multibranchPipelineJob('Cloud/Apps-Frontend/web-cloud-messenger-host') {
description('web-cloud-messenger-host')
displayName('web-cloud-messenger-host')
factory {
remoteJenkinsFileWorkflowBranchProjectFactory {
localMarker('')
matchBranches(true)
fallbackBranch('master')
lookupInParameters(false)
remoteJenkinsFile('pipelines/Cloud/Apps-Frontend/web-cloud-messenger-host.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-Frontend')
repository('web-cloud-messenger-host')
credentialsId("${JENKINS_GIT_CREDENTIALS_HTTP}")
id('Apps-Frontend/web-cloud-messenger-host')
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')
}
}
}