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

Timestamps missing for agent-based steps in Pipeline Job 2.190.1


      This problem still prevails on Jenkins ver. 2.190.1 and timestamper version 1.10.
      I tried also older versions of this plugin for which has been written in thicket JENKINS-54081 to work, but again with the same results.
      Also, the following option has been set on Jenkins master as JVM parameter:


      as described in JENKINS-54081 but again with the same outcome.

      A Pipeline example you can use to reproduce this problem is given below. You might adjust it a bit in order to fit your environment:

      • withMaven step needs to be adjusted
      • agent label we are using for our slaves is large so you might want to change that accordingly
      pipeline {
         agent {
            label 'large'
         options {
            timeout(time: 4, unit: 'HOURS')
         stages {
            stage('Preparation') {
               steps {
                  script {
                     // for display purposes
                     // Get some code from a GitHub repository
                     git 'https://github.com/jglick/simple-maven-project-with-tests.git'
            stage('Build') {
               steps {
                  script {
                     // Run the maven build
                        mavenLocalRepo: '.repository',
                        mavenSettingsConfig: 'tool-maven-ro',
                        jdk: 'sapjvm-8',
                        publisherStrategy: 'EXPLICIT',
                        options: [
                           artifactsPublisher(disabled: false),
                           dependenciesFingerprintPublisher(disabled: false),
                           junitPublisher(disabled: false)
                     ) {
                        sh 'mvn  -Dmaven.test.failure.ignore clean package'
            stage('Results') {
               steps {
                  junit '**/target/surefire-reports/TEST-*.xml'
                  archiveArtifacts 'target/*.jar'

      Log snippet from master looks like this:

      11:25:04  Seen branch in repository origin/master
      11:25:04  Seen 1 remote branch
      11:25:04   > git show-ref --tags -d # timeout=10
      11:25:04  Checking out Revision fbe787fbf5b8fce670b4401b2d348ff7a4357160 (origin/master)
      11:25:04   > git config core.sparsecheckout # timeout=10
      11:25:04   > git checkout -f fbe787fbf5b8fce670b4401b2d348ff7a4357160
      11:25:04  Commit message: "first commit"
      [Pipeline] }
      [Pipeline] // script
      [Pipeline] }
      [Pipeline] // stage
      [Pipeline] stage
      [Pipeline] { (Build)
      [Pipeline] script
      [Pipeline] {
      [Pipeline] withMaven
      11:25:04  [withMaven] Options: [org.jenkinsci.plugins.pipeline.maven.publishers.GeneratedArtifactsPublisher[disabled=false], org.jenkinsci.plugins.pipeline.maven.publishers.DependenciesFingerprintPublisher[disabled=false, scopes=[compile, provided, runtime], versions={snapshot:true, release:false}], JunitTestsPublisher[disabled=false,healthScaleFactor=,keepLongStdio=false,ignoreAttachments=false]]
      11:25:04  [withMaven] Available options: 
      11:25:04  [withMaven] using JDK installation sapjvm-8
      11:25:04  $ /bin/sh -c "which mvn"
      11:25:04  [withMaven] using Maven installation provided by the build agent with executable /usr/local/bin/mvn
      [Pipeline] {
      [Pipeline] sh
      11:25:05  + mvn -Dmaven.test.failure.ignore clean package
      11:25:05  ----- withMaven Wrapper script -----
      11:25:05  Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-17T18:33:14Z)
      11:25:05  Maven home: /usr/local/maven
      11:25:05  Java version: 1.8.0_77, vendor: SAP AG, runtime: /usr/lib/jvm/sapjvm_8/jre
      11:25:05  Default locale: en_US, platform encoding: ANSI_X3.4-1968
      11:25:05  OS name: "linux", version: "4.14.138+", arch: "amd64", family: "unix"
      11:25:05  [INFO] [jenkins-event-spy] Generate /srv/jenkins/workspace/test pipeline@tmp/withMaven3fe3ef73/maven-spy-20191015-092505-8403902332112577080839.log.tmp ...
      11:25:06  [INFO] Scanning for projects...
      11:25:06  [INFO] 
      11:25:06  [INFO] ----------------< test:simple-maven-project-with-tests >----------------
      11:25:06  [INFO] Building simple-maven-project-with-tests 1.0-SNAPSHOT
      11:25:06  [INFO] --------------------------------[ jar ]---------------------------------

      Same log snipped when pipeline is executed on slave looks like this:

      Checking out Revision fbe787fbf5b8fce670b4401b2d348ff7a4357160 (origin/master)
      Commit message: "first commit"
      [Pipeline] }
      [Pipeline] // script
      [Pipeline] }
      [Pipeline] // stage
      [Pipeline] stage
      [Pipeline] { (Build)
      [Pipeline] script
      [Pipeline] {
      [Pipeline] withMaven
      [withMaven] Options: [org.jenkinsci.plugins.pipeline.maven.publishers.GeneratedArtifactsPublisher[disabled=false], org.jenkinsci.plugins.pipeline.maven.publishers.DependenciesFingerprintPublisher[disabled=false, scopes=[compile, provided, runtime], versions={snapshot:true, release:false}], JunitTestsPublisher[disabled=false,healthScaleFactor=,keepLongStdio=false,ignoreAttachments=false]]
      [withMaven] Available options: 
      [withMaven] using JDK installation sapjvm-8
      $ /bin/sh -c "which mvn"
      [withMaven] using Maven installation provided by the build agent with executable /usr/bin/mvn
      [Pipeline] {
      [Pipeline] sh
      + mvn -Dmaven.test.failure.ignore clean package
      ----- withMaven Wrapper script -----
      Picked up JAVA_TOOL_OPTIONS: -Dmaven.ext.class.path="/var/lib/jenkins/workspace/test pipeline@tmp/withMaven805d1277/pipeline-maven-spy.jar" -Dorg.jenkinsci.plugins.pipeline.maven.reportsFolder="/var/lib/jenkins/workspace/test pipeline@tmp/withMaven805d1277" 
      Apache Maven 3.6.2 (40f52333136460af0dc0d7232c0dc0bcf0d9e117; 2019-08-27T15:06:16Z)
      Maven home: /usr/share/maven
      Java version: 1.8.0_221, vendor: SAP AG, runtime: /usr/lib/jvm/sapjvm_8/jre
      Default locale: en_US, platform encoding: ANSI_X3.4-1968
      OS name: "linux", version: "4.14.138+", arch: "amd64", family: "unix"
      Seen branch in repository origin/master
      Seen 1 remote branch
       > git show-ref --tags -d # timeout=10
       > git config core.sparsecheckout # timeout=10
       > git checkout -f fbe787fbf5b8fce670b4401b2d348ff7a4357160
      [INFO] [jenkins-event-spy] Generate /var/lib/jenkins/workspace/test pipeline@tmp/withMaven805d1277/maven-spy-20191015-093038-6193675996080952171854.log.tmp ...
      [INFO] Scanning for projects...
      [INFO] ----------------< test:simple-maven-project-with-tests >----------------
      [INFO] Building simple-maven-project-with-tests 1.0-SNAPSHOT
      [INFO] --------------------------------[ jar ]---------------------------------

      List of plugins and their version is listed below:

      PrioritySorter: 3.6.0 (Priority Sorter Plugin)
      ace-editor: 1.1 (JavaScript GUI Lib: ACE Editor bundle plugin)
      ansicolor: 0.6.2 (AnsiColor)
      antisamy-markup-formatter: 1.6 (OWASP Markup Formatter Plugin)
      apache-httpcomponents-client-4-api: 4.5.10-1.0 (Apache HttpComponents Client 4.x API Plugin)
      authentication-tokens: 1.3 (Authentication Tokens API Plugin)
      blueocean: 1.19.0 (Blue Ocean)
      blueocean-autofavorite: 1.2.4 (Autofavorite for Blue Ocean)
      blueocean-bitbucket-pipeline: 1.19.0 (Bitbucket Pipeline for Blue Ocean)
      blueocean-commons: 1.19.0 (Common API for Blue Ocean)
      blueocean-config: 1.19.0 (Config API for Blue Ocean)
      blueocean-core-js: 1.19.0 (Blue Ocean Core JS)
      blueocean-dashboard: 1.19.0 (Dashboard for Blue Ocean)
      blueocean-display-url: 2.3.0 (Display URL for Blue Ocean)
      blueocean-events: 1.19.0 (Events API for Blue Ocean)
      blueocean-executor-info: 1.19.0 (Blue Ocean Executor Info)
      blueocean-git-pipeline: 1.19.0 (Git Pipeline for Blue Ocean)
      blueocean-github-pipeline: 1.19.0 (GitHub Pipeline for Blue Ocean)
      blueocean-i18n: 1.19.0 (i18n for Blue Ocean)
      blueocean-jira: 1.19.0 (JIRA Integration for Blue Ocean)
      blueocean-jwt: 1.19.0 (JWT for Blue Ocean)
      blueocean-personalization: 1.19.0 (Personalization for Blue Ocean)
      blueocean-pipeline-api-impl: 1.19.0 (Pipeline implementation for Blue Ocean)
      blueocean-pipeline-editor: 1.19.0 (Blue Ocean Pipeline Editor)
      blueocean-pipeline-scm-api: 1.19.0 (Pipeline SCM API for Blue Ocean)
      blueocean-rest: 1.19.0 (REST API for Blue Ocean)
      blueocean-rest-impl: 1.19.0 (REST Implementation for Blue Ocean)
      blueocean-web: 1.19.0 (Web for Blue Ocean)
      bouncycastle-api: 2.17 (bouncycastle API Plugin)
      branch-api: 2.5.4 (Branch API Plugin)
      build-with-parameters: 1.4 (Build With Parameters)
      cloudbees-bitbucket-branch-source: 2.5.0 (Bitbucket Branch Source Plugin)
      cloudbees-folder: 6.9 (Folders Plugin)
      command-launcher: 1.3 (Command Agent Launcher Plugin)
      config-file-provider: 3.6.2 (Config File Provider Plugin)
      credentials: 2.3.0 (Credentials Plugin)
      credentials-binding: 1.20 (Credentials Binding Plugin)
      display-url-api: 2.3.2 (Display URL API)
      docker-commons: 1.15 (Docker Commons Plugin)
      docker-workflow: 1.19 (Docker Pipeline)
      durable-task: 1.30 (Durable Task Plugin)
      extended-choice-parameter: 0.78 (Extended Choice Parameter Plug-In)
      external-monitor-job: 1.7 (External Monitor Job Type Plugin)
      favorite: 2.3.2 (Favorite)
      file-operations: 1.7 (File Operations Plugin)
      git: 3.12.1 (Git plugin)
      git-client: 2.8.6 (Git client plugin)
      git-server: 1.8 (GIT server Plugin)
      github: 1.29.4 (GitHub plugin)
      github-api: 1.95 (GitHub API Plugin)
      github-branch-source: 2.5.8 (GitHub Branch Source Plugin)
      google-metadata-plugin: 0.2 (Google Metadata plugin)
      google-oauth-plugin: 0.9 (Google OAuth Credentials plugin)
      google-storage-plugin: 1.4.0 (Google Cloud Storage plugin)
      gradle: 1.34 (Gradle Plugin)
      greenballs: 1.15 (Green Balls)
      groovy: 2.2 (Groovy)
      h2-api: 1.4.199 (H2 API Plugin)
      handlebars: 1.1.1 (JavaScript GUI Lib: Handlebars bundle plugin)
      handy-uri-templates-2-api: 2.1.7-1.0 (Handy Uri Templates 2.x API Plugin)
      htmlpublisher: 1.21 (HTML Publisher plugin)
      jackson2-api: 2.9.10 (Jackson 2 API Plugin)
      javadoc: 1.5 (Javadoc Plugin)
      jaxb: (JAXB plugin)
      jdk-tool: 1.3 (Oracle Java SE Development Kit Installer Plugin)
      jenkins-design-language: 1.19.0 (Design Language)
      jira: 3.0.10 (JIRA plugin)
      job-dsl: 1.76 (Job DSL)
      jquery: 1.12.4-1 (jQuery plugin)
      jquery-detached: 1.2.1 (JavaScript GUI Lib: jQuery bundles (jQuery and jQuery UI) plugin)
      jsch: (JSch dependency plugin)
      junit: 1.28 (JUnit Plugin)
      junit-attachments: 1.6 (JUnit Attachments Plugin)
      kubernetes: 1.19.3 (Kubernetes plugin)
      kubernetes-client-api: 4.6.0-2 (Kubernetes Client API Plugin)
      kubernetes-credentials: 0.4.1 (Kubernetes Credentials Plugin)
      ldap: 1.20 (LDAP Plugin)
      lockable-resources: 2.5 (Lockable Resources plugin)
      logfilesizechecker: 1.5 (build log file size checker plugin)
      login-theme: 1.0 (Login Theme Plugin)
      m2release: 0.15.0 (Maven Release Plug-in Plug-in)
      mailer: 1.28 (Mailer Plugin)
      matrix-auth: 2.4.2 (Matrix Authorization Strategy Plugin)
      matrix-project: 1.14 (Matrix Project Plugin)
      maven-plugin: 3.4 (Maven Integration plugin)
      mercurial: 2.8 (Mercurial plugin)
      metrics: (Metrics Plugin)
      momentjs: 1.1.1 (JavaScript GUI Lib: Moment.js bundle plugin)
      multiple-scms: 0.6 (Multiple SCMs plugin)
      oauth-credentials: 0.3 (OAuth Credentials plugin)
      pam-auth: 1.5.1 (PAM Authentication plugin)
      pipeline-build-step: 2.9 (Pipeline: Build Step)
      pipeline-graph-analysis: 1.10 (Pipeline Graph Analysis Plugin)
      pipeline-input-step: 2.11 (Pipeline: Input Step)
      pipeline-maven: 3.8.1 (Pipeline Maven Integration Plugin)
      pipeline-milestone-step: 1.3.1 (Pipeline: Milestone Step)
      pipeline-model-api: 1.3.9 (Pipeline: Model API)
      pipeline-model-declarative-agent: 1.1.1 (Pipeline: Declarative Agent API)
      pipeline-model-definition: 1.3.9 (Pipeline: Declarative)
      pipeline-model-extensions: 1.3.9 (Pipeline: Declarative Extension Points API)
      pipeline-rest-api: 2.12 (Pipeline: REST API Plugin)
      pipeline-stage-step: 2.3 (Pipeline: Stage Step)
      pipeline-stage-tags-metadata: 1.3.9 (Pipeline: Stage Tags Metadata)
      pipeline-stage-view: 2.12 (Pipeline: Stage View Plugin)
      pipeline-utility-steps: 2.3.1 (Pipeline Utility Steps)
      plain-credentials: 1.5 (Plain Credentials Plugin)
      prometheus: 2.0.6 (Prometheus metrics plugin)
      pubsub-light: 1.13 (Pub-Sub "light" Bus)
      rebuild: 1.31 (Rebuilder)
      resource-disposer: 0.13 (Resource Disposer Plugin)
      saml: 1.1.3 (SAML Plugin)
      scm-api: 2.6.3 (SCM API Plugin)
      script-security: 1.65 (Script Security Plugin)
      sse-gateway: 1.20 (Server Sent Events (SSE) Gateway Plugin)
      ssh-credentials: 1.17.2 (SSH Credentials Plugin)
      startup-trigger-plugin: 2.9.3 (Startup Trigger)
      structs: 1.20 (Structs Plugin)
      swarm: 3.17 (Self-Organizing Swarm Plug-in Modules)
      timestamper: 1.10 (Timestamper)
      token-macro: 2.8 (Token Macro Plugin)
      translation: 1.16 (Translation Assistance plugin)
      trilead-api: 1.0.4 (Trilead API Plugin)
      validating-string-parameter: 2.4 (Validating String Parameter Plugin)
      variant: 1.3 (Variant Plugin)
      windows-slaves: 1.4 (WMI Windows Agents Plugin)
      workflow-aggregator: 2.6 (Pipeline)
      workflow-api: 2.37 (Pipeline: API)
      workflow-basic-steps: 2.18 (Pipeline: Basic Steps)
      workflow-cps: 2.74 (Pipeline: Groovy)
      workflow-cps-global-lib: 2.16-cache-alpha-v1 (Pipeline: Shared Groovy Libraries)
      workflow-durable-task-step: 2.34 (Pipeline: Nodes and Processes)
      workflow-job: 2.35 (Pipeline: Job)
      workflow-multibranch: 2.21 (Pipeline: Multibranch)
      workflow-scm-step: 2.9 (Pipeline: SCM Step)
      workflow-step-api: 2.20 (Pipeline: Step API)
      workflow-support: 3.3 (Pipeline: Supporting APIs)
      ws-cleanup: 0.37 (Workspace Cleanup Plugin)
      xvfb: 1.1.3 (Xvfb plugin)

      and shared cache library is built from this PR: https://github.com/jenkinsci/workflow-cps-global-lib-plugin/pull/85


            Unassigned Unassigned
            ljubisap Ljubisa Punosevac
            0 Vote for this issue
            11 Start watching this issue