[DO-1395] add_new_job (!56)

Co-authored-by: Rustam Tagaev <rustam.tagaev@avroid.tech>
Reviewed-on: https://git.avroid.tech/DevOps/jenkins-pipelines/pulls/56
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>
This commit is contained in:
Rustam Tagaev
2024-12-11 19:11:18 +03:00
committed by Denis Patrakeev
parent 29e0bebe35
commit b62d3069f0
6 changed files with 178 additions and 9 deletions

View File

@@ -12,8 +12,8 @@ multibranchPipelineJob('Cloud/Apps-Backend/avroid-service-lib') {
gitSCM {
userRemoteConfigs {
userRemoteConfig {
url('https://git.avroid.tech/DevOps/jenkins-pipelines.git')
credentialsId('user-jenkins-in-gitea')
url("${JENKINS_GIT_REPOSITORY_URL}/DevOps/jenkins-pipelines.git")
credentialsId("${JENKINS_GIT_CREDENTIALS_HTTP}")
name('')
refspec('')
}
@@ -29,10 +29,10 @@ multibranchPipelineJob('Cloud/Apps-Backend/avroid-service-lib') {
branchSource {
source {
giteaSCMSource {
serverUrl('https://git.avroid.tech')
serverUrl("${JENKINS_GIT_REPOSITORY_URL}")
repoOwner('Apps-Backend')
repository('avroid-service-lib')
credentialsId('user-jenkins-in-gitea')
credentialsId("${JENKINS_GIT_CREDENTIALS_HTTP}")
id('Apps-Backend/avroid-service-lib')
traits {
giteaBranchDiscovery {

View File

@@ -12,8 +12,8 @@ multibranchPipelineJob('Cloud/Apps-Backend/cloud-messenger-core-api') {
gitSCM {
userRemoteConfigs {
userRemoteConfig {
url('https://git.avroid.tech/DevOps/jenkins-pipelines.git')
credentialsId('user-jenkins-in-gitea')
url("${JENKINS_GIT_REPOSITORY_URL}/DevOps/jenkins-pipelines.git")
credentialsId("${JENKINS_GIT_CREDENTIALS_HTTP}")
name('')
refspec('')
}
@@ -29,10 +29,10 @@ multibranchPipelineJob('Cloud/Apps-Backend/cloud-messenger-core-api') {
branchSource {
source {
giteaSCMSource {
serverUrl('https://git.avroid.tech')
serverUrl("${JENKINS_GIT_REPOSITORY_URL}")
repoOwner('Apps-Backend')
repository('cloud-messenger-core-api')
credentialsId('user-jenkins-in-gitea')
credentialsId("${JENKINS_GIT_CREDENTIALS_HTTP}")
id('Apps-Backend/cloud-messenger-core-api')
traits {
giteaBranchDiscovery {

View File

@@ -0,0 +1,92 @@
multibranchPipelineJob('Cloud/Apps-Frontend/cloud-messenger-uikit') {
description('cloud-messenger-uikit')
displayName('cloud-messenger-uikit')
factory {
remoteJenkinsFileWorkflowBranchProjectFactory {
localMarker('')
matchBranches(true)
fallbackBranch('master')
lookupInParameters(false)
remoteJenkinsFile('pipelines/Cloud/Apps-Frontend/cloud-messenger-uikit.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('cloud-messenger-uikit')
credentialsId("${JENKINS_GIT_CREDENTIALS_HTTP}")
id('Apps-Frontend/cloud-messenger-uikit')
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')
}
}
}