hotfix/doxygen_branch_param (#7)

Reviewed-on: https://git.avroid.tech/DevOps/jenkins-pipelines/pulls/7
This commit is contained in:
Boris Shestov
2023-12-25 20:24:38 +03:00
parent 0a5b18a1aa
commit 4a54b6de6b

View File

@@ -6,10 +6,10 @@ properties([
buildDiscarder(logRotator(numToKeepStr: '100')),
disableConcurrentBuilds(),
parameters([
string (name: "BRANCH", defaultValue: "master",
description: "OS repo branch name."),
booleanParam (name: "onlyUpdatePipeline", defaultValue: false,
description: "Only update pipeline and exit.")
string(name: 'BRANCH', defaultValue: 'master',
description: 'OS repo branch name.'),
booleanParam(name: 'onlyUpdatePipeline', defaultValue: false,
description: 'Only update pipeline and exit.')
]),
pipelineTriggers(
[GenericTrigger(
@@ -24,11 +24,10 @@ properties([
String projectName = 'OS'
String owner = 'Eisen'
String gitRepoName = "${owner}/${projectName}"
String nexusRepoName = "eisen-os_doc-feature"
String nexusRepoName = 'eisen-os_doc-feature'
Git git = new Git(this, env.JENKINS_GIT_CREDENTIALS_SSH)
String doxygenImage = "${env.JENKINS_DOCKER_REGISTRY}/devops/doxygen:1.9.8"
podTemplate(workspaceVolume: hostPathWorkspaceVolume(hostPath: "/data"),
podTemplate(workspaceVolume: hostPathWorkspaceVolume(hostPath: '/data'),
yaml: '''
apiVersion: v1
kind: Pod
@@ -57,7 +56,7 @@ podTemplate(workspaceVolume: hostPathWorkspaceVolume(hostPath: "/data"),
node(POD_LABEL) {
try {
stage('Update pipeline') {
echo("Pipeline updated")
echo('Pipeline updated')
}
String branchName = ''
@@ -68,10 +67,10 @@ podTemplate(workspaceVolume: hostPathWorkspaceVolume(hostPath: "/data"),
String shorthashCommit = hashCommit.substring(0, 10)
branchName = shorthashCommit
} else {
branchName = params.branch
branchName = params.BRANCH
}
} else {
branchName = params.branch
branchName = params.BRANCH
}
println 'branchName: ' + branchName