Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-50993

Pipeline-Stage-View Plugin is unable to show stage logs when Splunk Plugin for Jenkins is Enabled

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • splunk-devops-plugin
    • Direct Jenkins 2.74 installed via RPM on RHEL 7 64-bit machine;
      JDKs installed in the system: JDK8, JDK7, JDK6
      Build-Pipeline-Plugin version: 1.5.8
      Splunk-Devops-Plugin: 1.6.4
      Pipeline-Stage-view-Plugin: 2.9

      When the Splunk Plugin and Splunk Plugin Extension (for pipeline jobs) are enabled, the stage logs are missing in the pipeline jobs. This is very simple to recreate:

      1. Install the required plugins so that one can create pipeline jobs. I am assuming Build Pipeline and Pipeline Stage View plugins are good enough.
      2. Install latest Splunk Plugin along with Splunk Plugin Extension. Configure it to be used with one Splunk instance. Now disable that once configuration is done.
      3. Create a simple pipeline job using below mentioned script:

      ++++++++++++++++++++++++++  

            pipeline {
      agent any
      options {
      timeout(time: 1, unit: 'HOURS')
      sendSplunkConsoleLog()
      }
      stages {
             stage("Build"){
                  steps {
                      script {
                          currentBuild.displayName = "SAMPLE_PIPELINE"
                          currentBuild.description = "The dummy pipeline job for Splunk"
                      }
                      echo 'Sample Pipeline for Test'
                  }
              }
        stage("Deploy"){
                  steps {
                       echo 'Sample Pipeline Deployed'
                  }
              }
        stage("Testing"){
                  steps {
                       echo 'Sample Pipeline Tested'
                  }
              }
      }
      }

      ++++++++++++++++++++++++++++++++++++++++++++

      4. Trigger the sample pipeline created above. Hover over build or deploy or testing stages in the pipeline stage view and you will get logs link. Clicking on the link, you will get appropriate log message as mentioned above in the pipeline script.

      5. Now enable the Splunk plugin from <Jenkins_url>/configure page.

      6. Again trigger the sample pipeline. This time when you click on the stage log link, you will not see the respective log messages as per the build stage.

       

            fengxx Ted Xiao
            apurv_raj Apurv Raj
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: