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

          quas Jakub Pawlinski created issue -
          quas Jakub Pawlinski made changes -
          Field Original Value New Value
          Description Just discovered by accident, if a retry step happens, it produces some odd results:

           
          {code:java}
          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}"
                }
              }
            }
          }

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

          !image-2018-07-16-12-36-44-190.png!

           

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

           
          {code:java}
          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}"
                }
              }
            }
          }

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

          !image-2018-07-16-12-36-44-190.png|width=1345,height=628!

           

           

          People

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

            Dates

              Created:
              Updated: