Just discovered by accident, if a retry step happens, it produces some odd results:

       

      def NuGetStore = "packages"
      ...
      stage ('SonarQube') {
        when { expression { Settings.Analyse } }
        steps {
          script {
            retry(3) {
              bat "${Tools.NuGet.Run} install -ExcludeVersion -Source \"${Tools.Sonar.Source}\" -OutputDirectory ${NuGetStore} ${Tools.Sonar.Package}"
              Tools.Sonar.Run = new File (NuGetStore, Tools.Sonar.Run).toString()
              bat "${Tools.Sonar.Run} ${Tools.Sonar.Version}"
            }
          }
        }
      }
      
      

      with each retry pass it multiplies value of NuGetStore variable, see:

       

       

          [JENKINS-52578] retry clause causes multiplication

          There are no comments yet on this issue.

            Unassigned Unassigned
            quas Jakub Pawlinski
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: