hotfix/doxygen_branch_param (#7)
Reviewed-on: https://git.avroid.tech/DevOps/jenkins-pipelines/pulls/7
This commit is contained in:
@@ -6,10 +6,10 @@ properties([
|
|||||||
buildDiscarder(logRotator(numToKeepStr: '100')),
|
buildDiscarder(logRotator(numToKeepStr: '100')),
|
||||||
disableConcurrentBuilds(),
|
disableConcurrentBuilds(),
|
||||||
parameters([
|
parameters([
|
||||||
string (name: "BRANCH", defaultValue: "master",
|
string(name: 'BRANCH', defaultValue: 'master',
|
||||||
description: "OS repo branch name."),
|
description: 'OS repo branch name.'),
|
||||||
booleanParam (name: "onlyUpdatePipeline", defaultValue: false,
|
booleanParam(name: 'onlyUpdatePipeline', defaultValue: false,
|
||||||
description: "Only update pipeline and exit.")
|
description: 'Only update pipeline and exit.')
|
||||||
]),
|
]),
|
||||||
pipelineTriggers(
|
pipelineTriggers(
|
||||||
[GenericTrigger(
|
[GenericTrigger(
|
||||||
@@ -24,11 +24,10 @@ properties([
|
|||||||
String projectName = 'OS'
|
String projectName = 'OS'
|
||||||
String owner = 'Eisen'
|
String owner = 'Eisen'
|
||||||
String gitRepoName = "${owner}/${projectName}"
|
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)
|
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: '''
|
yaml: '''
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Pod
|
kind: Pod
|
||||||
@@ -57,7 +56,7 @@ podTemplate(workspaceVolume: hostPathWorkspaceVolume(hostPath: "/data"),
|
|||||||
node(POD_LABEL) {
|
node(POD_LABEL) {
|
||||||
try {
|
try {
|
||||||
stage('Update pipeline') {
|
stage('Update pipeline') {
|
||||||
echo("Pipeline updated")
|
echo('Pipeline updated')
|
||||||
}
|
}
|
||||||
|
|
||||||
String branchName = ''
|
String branchName = ''
|
||||||
@@ -68,10 +67,10 @@ podTemplate(workspaceVolume: hostPathWorkspaceVolume(hostPath: "/data"),
|
|||||||
String shorthashCommit = hashCommit.substring(0, 10)
|
String shorthashCommit = hashCommit.substring(0, 10)
|
||||||
branchName = shorthashCommit
|
branchName = shorthashCommit
|
||||||
} else {
|
} else {
|
||||||
branchName = params.branch
|
branchName = params.BRANCH
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
branchName = params.branch
|
branchName = params.BRANCH
|
||||||
}
|
}
|
||||||
println 'branchName: ' + branchName
|
println 'branchName: ' + branchName
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user