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

Run triggered job - empty variables

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • None
    • Jenkins 2.121.3 LTS
      parameterized-trigger 2.35.2

      I have a job, which has some parameters.

      When I now want to build with parameters, I get this

      When I now enter some values and start the job, the variables seem to be empty in a Powershell build step:

       

      if ([String]::IsNullOrEmpty($IntMajor)) {
       Write-Host "Error: Variable 'IntMajor' is null or empty."
       exit 1
      }
      if ([String]::IsNullOrEmpty($Major)) {
       Write-Host "Error: Variable 'Major' is null or empty."
       exit 1
      }
      if ([String]::IsNullOrEmpty($Minor)) {
       Write-Host "Error: Variable 'Minor' is null or empty."
       exit 1
      }
      

       

      This is the output in the logs after running the parameterized job:

      [upload] $ powershell.exe -NonInteractive -ExecutionPolicy ByPass "& 'C:\Users\USER123\AppData\Local\Temp\jenkins9061680245707542673.ps1'"
      Error: Variable 'IntMajor' is null or empty.
      Build step 'Windows PowerShell' marked build as failure
      SSH: Current build result is [FAILURE], not going to run.
      Finished: FAILURE

       

        1. image-2018-08-27-16-50-49-375.png
          5 kB
          Kristian Starkloff
        2. image-2018-08-27-16-51-50-363.png
          18 kB
          Kristian Starkloff

            krstje Kristian Starkloff
            krstje Kristian Starkloff
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: