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

Run triggered job - empty variables

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Fixed but Unreleased (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Labels:
      None
    • Environment:
      Jenkins 2.121.3 LTS
      parameterized-trigger 2.35.2
    • Similar Issues:

      Description

      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

       

        Attachments

          Activity

          krstje Kristian Starkloff created issue -
          krstje Kristian Starkloff made changes -
          Field Original Value New Value
          Assignee Kristian Starkloff [ krstje ]
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Fixed but Unreleased [ 10203 ]

            People

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

              Dates

              Created:
              Updated:
              Resolved: