• Icon: Improvement Improvement
    • Resolution: Won't Do
    • Icon: Minor Minor
    • pipeline
    • None

      When running our Jenkins pipeline we sometimes get errors like the one below and there I would like to know what clues the directory path can give me.

      /machine01/jenkins_ws/nfs_ws/01/workspace/main-ci-job/path/in/repo@tmp/durable-82d83e2b/script.sh.copy: line 3: cmake: command not found

      So in this case we have a CMakeLists.txt file in path/in/repo, but what does @tmp/durable-82d83e2b mean?

      1. What is @tmp?
      2. What is durable?
      3. What is the hash? (it is not a hash known to git)

          [JENKINS-73605] What is tmp durable directory ?

          Markus Winter added a comment -

          When you execute a sh step in a pipeline with

          node {
            sh 'cmake ...'
          }

          the sh step will create the directory '@tmp/durable-<hash>/' where it puts temporary files, e.g. the script of the sh step is put there as Jenkins needs to execute the script, so it must exist in the file system somewhere. Without looking into the details the hash is probably based on script content and timestamp to ensure it is unique for the execution of this step.
          Once the sh step is finished, the 'durable-<hash>' is deleted.

          The '@tmp'  is a general temporary directory for the pipeline run where all kinds of steps put temporary files, e.g. withCredentials uses it, once a run is finished this directory still exists but is normally empty

          Markus Winter added a comment - When you execute a sh step in a pipeline with node { sh 'cmake ...' } the sh step will create the directory '@tmp/durable-<hash>/' where it puts temporary files, e.g. the script of the sh step is put there as Jenkins needs to execute the script, so it must exist in the file system somewhere. Without looking into the details the hash is probably based on script content and timestamp to ensure it is unique for the execution of this step. Once the sh step is finished, the 'durable-<hash>' is deleted. The '@tmp'  is a general temporary directory for the pipeline run where all kinds of steps put temporary files, e.g. withCredentials uses it, once a run is finished this directory still exists but is normally empty

          David added a comment -

          Thanks, that's very helpful.

          David added a comment - Thanks, that's very helpful.

            Unassigned Unassigned
            david_mse David
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: