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

retry clause causes multiplication

    XMLWordPrintable

Details

    Description

      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:

       

       

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: