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

readFileFromWorkspace doesn't not update the shell step if the referenced file content has changed

XMLWordPrintable

      readFileFromWorkspace doesn't not update the shell step if the referenced file content has changed. I have checked that Action for existing jobs and views -> Ignore changes box is NOT ticked.
      Exemple:

      step {
           shell(readFileFromWorkspace("/apps/tools/scripts/myscript.sh"))
      }
      

      myscript.sh content:

      #!/bin/bash
      echo Hello world!
      

      The first time I build, the jobs are created correctly with the matching shell step content:

      #!/bin/bash
      echo Hello world!
      

      If I change the script myscript.sh:

      #!/bin/bash
      echo Hello guys!
      

      I build again I still get the previous content in the step:

      #!/bin/bash
      echo Hello world!
      

            daspilker Daniel Spilker
            lautou Laurent TOURREAU
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: