Uploaded image for project: 'Nuxeo ECM Build/Test Environment'
  1. Nuxeo ECM Build/Test Environment
  2. NXBT-1487

Reference commits on documentation in JIRA

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Continuous Integration

      Description

      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])
      

      https://qa.nuxeo.org/jenkins/job/Private/job/doc.nuxeo.com/jobConfigHistory/showDiffFiles?timestamp1=2017-01-06_08-55-26&timestamp2=2017-01-06_08-55-27

      The following error is thrown:

      ERROR: 'checkout scm' is only available when using "Multibranch Pipeline" or "Pipeline script from SCM"
      

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:

                  PagerDuty

                  Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.