-
Type: Improvement
-
Status: Open
-
Priority: Major
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: Continuous Integration
-
Epic Link:
-
Tags:
-
Sprint:DevOps-15, DevOps-16, DevOps-18
-
Story Points:4
Jenkins uses a "JIRA update" plugin to reference commits in JIRA issues comments. This should be adapted for pipeline so that commits on documentation are referecing commits with a jira issue when building https://qa.nuxeo.org/jenkins/job/Private/job/doc.nuxeo.com/
Documentation: https://doc.nuxeo.com/corg/jenkins-pipeline-usage/#jira-usage
Current pipeline command:
node('SLAVEPRIV') { stage 'build' checkout([$class: 'GitSCM', branches: [[name: '*/' + BRANCH]], browser: [$class: 'GithubWeb', repoUrl: 'https://github.com/nuxeo/doc.nuxeo.com'], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[url: 'git@github.com:nuxeo/doc.nuxeo.com.git']]]) sh '''npm install && npm start''' sh '''python redirects_yml2nginx.py > redirects.txt''' sh '''python redirects_pageid2nginx.py > redirects_pageid.txt''' stage 'deploy' sh "rsync -Waxv --delete site/ root@doc:/opt/www/doc/" sh "rsync redirects.txt root@doc:/etc/nginx/redirects.txt" sh "rsync redirects_pageid.txt root@doc:/etc/nginx/redirects_pageid.txt" sh '''ssh root@doc "service nginx configtest && service nginx restart"''' currentBuild.description = "Build ${BRANCH} and deploy on doc.nuxeo.com" }
When adding the line
step([$class: 'JiraIssueUpdater', issueSelector: [$class: 'DefaultIssueSelector'], scm: scm])
The following error is thrown:
ERROR: 'checkout scm' is only available when using "Multibranch Pipeline" or "Pipeline script from SCM"