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

Conditional build steps are no longer resolved when generating jobs after core upgrade to 1.556

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Component/s: jobgenerator-plugin
    • Labels:
      None
    • Environment:
      Jenkins 1.556 on RHEL5 x86_64
    • Similar Issues:

      Description

      After core upgrade to 1.556 conditional build steps are no longer resolved when generating jobs. Instead all conditional build steps are now left in generated jobs, which works, but looks clumsy and is against documentation.

        Attachments

          Activity

          Hide
          syl20bnr Sylvain Benner added a comment -

          Hi Krzysztof,

          I cannot reproduce the bug in our pipelines (running on 1.557), what kind of conditional test do you use ?

          Show
          syl20bnr Sylvain Benner added a comment - Hi Krzysztof, I cannot reproduce the bug in our pipelines (running on 1.557), what kind of conditional test do you use ?
          Hide
          raspy Krzysztof Malinowski added a comment -

          I use Strings match, Regular expression match and File exists conditions. It used to work OK, resolving strings and regex matches on generation level and keeping File exists condition in the generated job, which was exactly what I wanted. The log was like this:

          Before
          ...
          16:30:21 [EnvInject] - Variables injected successfully.
          16:30:21 [EnvInject] - Injecting contributions.
          16:30:21 Building on master in workspace /jenkins/jenkins_home/jobs/generator-klocwork/workspace@6
          16:30:21 
          16:30:21 Deleting project workspace... Strings match run condition: string 1=[https://server:8072], string 2=[]
          16:30:21 Strings match run condition: string 1=[9.6.2], string 2=[]
          16:30:21 Regular expression run condition: Expression=[^3[24]$], Label=[34]
          16:30:21 Regular expression run condition: Expression=[^27|33$], Label=[34]
          16:30:21 Regular expression run condition: Expression=[^14$], Label=[34]
          16:30:22 Finished: SUCCESS
          

          Now, all condition steps are copied into generated job, none is evaluated on the generation level:

          After
          ...
          10:40:46 [EnvInject] - Variables injected successfully.
          10:40:46 [EnvInject] - Injecting contributions.
          10:40:46 Building on master in workspace /jenkins/jenkins_home/jobs/generator-klocwork/workspace
          10:40:46 
          10:40:47 Deleting project workspace... Finished: SUCCESS
          

          I am not entirely convinced it happened because of core upgrade as they were also some more plugins upgraded at the same time, but it's the only change that comes to my mind which may have affected behavior. Am I missing something here?

          BTW. Comparing now those two outputs I noticed two things:
          1. The working version used workspace with @6 which I think is used only for concurrent runs of the same job. This has changed.
          2. The build was always done on master. I don't know if it's important, but our master is configured to have 0 executors, so that all builds are always run on slaves. This may or may not have impact on this issue, but I thought it's good to mention it for reference.

          Show
          raspy Krzysztof Malinowski added a comment - I use Strings match, Regular expression match and File exists conditions. It used to work OK, resolving strings and regex matches on generation level and keeping File exists condition in the generated job, which was exactly what I wanted. The log was like this: Before ... 16:30:21 [EnvInject] - Variables injected successfully. 16:30:21 [EnvInject] - Injecting contributions. 16:30:21 Building on master in workspace /jenkins/jenkins_home/jobs/generator-klocwork/workspace@6 16:30:21 16:30:21 Deleting project workspace... Strings match run condition: string 1=[https://server:8072], string 2=[] 16:30:21 Strings match run condition: string 1=[9.6.2], string 2=[] 16:30:21 Regular expression run condition: Expression=[^3[24]$], Label=[34] 16:30:21 Regular expression run condition: Expression=[^27|33$], Label=[34] 16:30:21 Regular expression run condition: Expression=[^14$], Label=[34] 16:30:22 Finished: SUCCESS Now, all condition steps are copied into generated job, none is evaluated on the generation level: After ... 10:40:46 [EnvInject] - Variables injected successfully. 10:40:46 [EnvInject] - Injecting contributions. 10:40:46 Building on master in workspace /jenkins/jenkins_home/jobs/generator-klocwork/workspace 10:40:46 10:40:47 Deleting project workspace... Finished: SUCCESS I am not entirely convinced it happened because of core upgrade as they were also some more plugins upgraded at the same time, but it's the only change that comes to my mind which may have affected behavior. Am I missing something here? BTW. Comparing now those two outputs I noticed two things: 1. The working version used workspace with @6 which I think is used only for concurrent runs of the same job. This has changed. 2. The build was always done on master. I don't know if it's important, but our master is configured to have 0 executors, so that all builds are always run on slaves. This may or may not have impact on this issue, but I thought it's good to mention it for reference.

            People

            Assignee:
            syl20bnr Sylvain Benner
            Reporter:
            raspy Krzysztof Malinowski
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: