DO-143_feature_freeze (#4)

+ Add Feeature freeze for tavro

Reviewed-on: https://git.avroid.tech/DevOps/jenkins-pipelines/pulls/4
Reviewed-by: Denis Patrakeev <denis.patrakeev@avroid.tech>
Co-authored-by: aleksandr.vodyanov <aleksandr.vodyanov@avroid.tech>
Co-committed-by: aleksandr.vodyanov <aleksandr.vodyanov@avroid.tech>
This commit is contained in:
aleksandr.vodyanov
2023-11-16 17:33:49 +03:00
committed by Denis Patrakeev
parent 7eeaa65b16
commit 9c78fca70a
3 changed files with 183 additions and 0 deletions

View File

@@ -0,0 +1,68 @@
pipelineJob('Release-activity/tavro/feature_freeze') {
logRotator {
numToKeep(10)
artifactNumToKeep(10)
}
parameters {
choiceParameter {
name('SOURCE_BRANCH_NAME')
randomName('')
filterable(true)
filterLength(1)
script {
groovyScript {
fallbackScript {
script('')
sandbox(false)
}
script {
sandbox(false)
script(
"""import groovy.json.JsonSlurperClassic
def sout = new StringBuffer(), serr = new StringBuffer()
def proc = 'curl --connect-timeout 15 -u \${gitLogin}:\${gitPass} \${env.JENKINS_GIT_REPOSITORY_HTTP_URL}/api/v1/repos/\${repoName}/branches'.execute()
proc.consumeProcessOutput(sout, serr)
proc.waitForOrKill(5000)
JSONInfo = new JsonSlurperClassic().parseText(sout.toString())
List branches = []
JSONInfo.each{ branch ->
branches.add(branch.name)
}
return branches.sort()
"""
)
}
}
}
choiceType('PT_SINGLE_SELECT')
}
string {
name('RC_VERSION')
defaultValue('')
description('Release version eg. (1.4 or 1.4-demo)')
}
booleanParam {
name('TEST_RC_BRANCH')
defaultValue(false)
description('Test RC branch or no. If value is true, branch will be looks as RC_MODC_test_2.0.0')
}
}
definition {
cpsScm {
scm {
git {
remote {
url("${JENKINS_GIT_REPOSITORY_URL}/DevOps/jenkins-pipelines.git")
credentials("${JENKINS_GIT_CREDENTIALS_HTTP}")
}
branch('master')
}
}
scriptPath('pipelines/Release-activity/tavro/feature_freeze.groovy')
}
}
}