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

Corruption of workspace due to incomplete parameters substitution (no validation)

XMLWordPrintable

      Hello,

      We have experienced several issues with substitution of parameters during execution of operation.

      For example, ${EXECUTOR_NUMBER} works well for checkout(), but this parameter is not accessible during execution processWorkspaceBeforeDeletion(). It causes corruption of job, which requires manual fix at server’s side. Reproduction steps:
      • We start job, and checkout() successfully creates workspace.
      • Cleanup workspace…
      • getWorkspace() in processWorkspaceBeforeDeletion() creates new workspace at Perforce server (name contains unsubstituted EXECUTOR_NUMBER parameter) and then deletes it. BTW, it deletes local folders as well.
      • Run job again…
      • Checkout() completes successfully, because P4 server thinks that workspace is up to date
      • Job fails, because there’s no data in job’s workspace after p4 checkout

      Best regards,
      Oleg Nenashev

            oleg_nenashev Oleg Nenashev
            oleg_nenashev Oleg Nenashev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: