in deploy-templates/JobProvisionerRegistryRegulations.groovy [126:155]
def createCleanUpPipeline(pipelineName, codebaseName, codebaseStages, pipelineScript, repository, credId, watchBranch = "master", gitServerCrName, gitServerCrVersion) {
pipelineJob("cleanup-job") {
logRotator {
numToKeep(10)
daysToKeep(7)
}
definition {
cpsScm {
scm {
git {
remote {
url(repository)
credentials(credId)
}
branches("${watchBranch}")
scriptPath("${pipelineScript}")
}
}
parameters {
stringParam("GIT_SERVER_CR_NAME", "${gitServerCrName}", "Name of Git Server CR to generate link to Git server")
stringParam("GIT_SERVER_CR_VERSION", "${gitServerCrVersion}", "Version of GitServer CR Resource")
stringParam("STAGES", "${codebaseStages}", "Consequence of stages in JSON format to be run during execution")
stringParam("GERRIT_PROJECT_NAME", "${codebaseName}", "Gerrit project name(Codebase name) to be build")
stringParam("BRANCH", "${watchBranch}", "Branch to build artifact from")
}
}
}
}
}