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

When using Contional steps(multiple) plugin config the Fitnesse configuration values are getting null

    XMLWordPrintable

Details

    Description

      We are checking environment variable with String variable in Conditional step if it match then running the Fitness Tests corresponding the Selected Environment, when we see the config of the job after the save button the fitness configuration values are getting null values.

      Attachments

        Issue Links

          Activity

            anilkumar_y108 anil kumar added a comment -

            Console output of the job:-
            -----------------------

            Building in workspace C:\Program Files (x86)\Jenkins\jobs\Anil_ConditionTestForFitnesse\workspace
            Run condition [Strings match] enabling prebuild for step [BuilderChain]
            Run condition [Strings match] enabling prebuild for step [BuilderChain]
            Strings match run condition: string 1=BngLap#2, string 2=BngLap#2
            Run condition [Strings match] enabling perform for step [BuilderChain]
            hudson.plugins.fitnesse.FitnesseBuilder: null
            java.lang.NullPointerException
            at hudson.plugins.fitnesse.FitnesseBuilder.getOption(FitnesseBuilder.java:67)
            at hudson.plugins.fitnesse.FitnesseBuilder.getFitnesseStart(FitnesseBuilder.java:78)
            at hudson.plugins.fitnesse.FitnesseExecutor.getFitnesseBuildAction(FitnesseExecutor.java:70)
            at hudson.plugins.fitnesse.FitnesseExecutor.execute(FitnesseExecutor.java:46)
            at hudson.plugins.fitnesse.FitnesseBuilder.perform(FitnesseBuilder.java:219)
            at org.jenkinsci.plugins.conditionalbuildstep.BuilderChain.perform(BuilderChain.java:71)
            at org.jenkins_ci.plugins.run_condition.BuildStepRunner$2.run(BuildStepRunner.java:110)
            at org.jenkins_ci.plugins.run_condition.BuildStepRunner$Fail.conditionalRun(BuildStepRunner.java:154)
            at org.jenkins_ci.plugins.run_condition.BuildStepRunner.perform(BuildStepRunner.java:105)
            at org.jenkinsci.plugins.conditionalbuildstep.ConditionalBuilder.perform(ConditionalBuilder.java:133)
            at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
            at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804)
            at hudson.model.Build$BuildExecution.build(Build.java:199)
            at hudson.model.Build$BuildExecution.doRun(Build.java:160)
            at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:586)
            at hudson.model.Run.execute(Run.java:1593)
            at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
            at hudson.model.ResourceController.execute(ResourceController.java:88)
            at hudson.model.Executor.run(Executor.java:247)
            Build step 'Conditional steps (multiple)' marked build as failure
            Finished: FAILURE

            anilkumar_y108 anil kumar added a comment - Console output of the job:- ----------------------- Building in workspace C:\Program Files (x86)\Jenkins\jobs\Anil_ConditionTestForFitnesse\workspace Run condition [Strings match] enabling prebuild for step [BuilderChain] Run condition [Strings match] enabling prebuild for step [BuilderChain] Strings match run condition: string 1= BngLap#2 , string 2= BngLap#2 Run condition [Strings match] enabling perform for step [BuilderChain] hudson.plugins.fitnesse.FitnesseBuilder: null java.lang.NullPointerException at hudson.plugins.fitnesse.FitnesseBuilder.getOption(FitnesseBuilder.java:67) at hudson.plugins.fitnesse.FitnesseBuilder.getFitnesseStart(FitnesseBuilder.java:78) at hudson.plugins.fitnesse.FitnesseExecutor.getFitnesseBuildAction(FitnesseExecutor.java:70) at hudson.plugins.fitnesse.FitnesseExecutor.execute(FitnesseExecutor.java:46) at hudson.plugins.fitnesse.FitnesseBuilder.perform(FitnesseBuilder.java:219) at org.jenkinsci.plugins.conditionalbuildstep.BuilderChain.perform(BuilderChain.java:71) at org.jenkins_ci.plugins.run_condition.BuildStepRunner$2.run(BuildStepRunner.java:110) at org.jenkins_ci.plugins.run_condition.BuildStepRunner$Fail.conditionalRun(BuildStepRunner.java:154) at org.jenkins_ci.plugins.run_condition.BuildStepRunner.perform(BuildStepRunner.java:105) at org.jenkinsci.plugins.conditionalbuildstep.ConditionalBuilder.perform(ConditionalBuilder.java:133) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804) at hudson.model.Build$BuildExecution.build(Build.java:199) at hudson.model.Build$BuildExecution.doRun(Build.java:160) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:586) at hudson.model.Run.execute(Run.java:1593) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:247) Build step 'Conditional steps (multiple)' marked build as failure Finished: FAILURE
            ismaild ismail demirel added a comment - - edited

            we have exactly the same problem. Conditional step (single) is also affected

            ismaild ismail demirel added a comment - - edited we have exactly the same problem. Conditional step (single) is also affected

            Unfortunate this issue is cased by the fitness-plugin not using the DataBoundConstructor as intended. Even though the plugin defines a constructor [1] with '@DataBoundConstructor', its usage is wrong.
            Insted it expects the instance to be created by 'descriptor.newInstance()' [2] with some JSON parsing. There are two ways to solve this issue:

            1. remove the '@DataBoundConstructor' annotation at all, this will make the conditional-buildstep plugin ignore this plugin and there fore users will not be confused anymore.
            or
            2. implement the constructor the correct way as intended by newer plugins

            btw. the groovy plugin used to have the same issue [3]

            [1] https://github.com/jenkinsci/fitnesse-plugin/blob/master/src/main/java/hudson/plugins/fitnesse/FitnesseBuilder.java#L61-L65
            [2] https://github.com/jenkinsci/fitnesse-plugin/blob/master/src/main/java/hudson/plugins/fitnesse/FitnesseBuilder.java#L410-L429
            [3] https://issues.jenkins-ci.org/browse/JENKINS-6797

            domi Dominik Bartholdi added a comment - Unfortunate this issue is cased by the fitness-plugin not using the DataBoundConstructor as intended. Even though the plugin defines a constructor [1] with '@DataBoundConstructor', its usage is wrong. Insted it expects the instance to be created by 'descriptor.newInstance()' [2]  with some JSON parsing. There are two ways to solve this issue: 1. remove the '@DataBoundConstructor' annotation at all, this will make the conditional-buildstep plugin ignore this plugin and there fore users will not be confused anymore. or 2. implement the constructor the correct way as intended by newer plugins btw. the groovy plugin used to have the same issue [3] [1] https://github.com/jenkinsci/fitnesse-plugin/blob/master/src/main/java/hudson/plugins/fitnesse/FitnesseBuilder.java#L61-L65 [2] https://github.com/jenkinsci/fitnesse-plugin/blob/master/src/main/java/hudson/plugins/fitnesse/FitnesseBuilder.java#L410-L429 [3] https://issues.jenkins-ci.org/browse/JENKINS-6797

            Code changed in jenkins
            User: antoine-aumjaud
            Path:
            src/main/java/hudson/plugins/fitnesse/FitnesseBuilder.java
            http://jenkins-ci.org/commit/fitnesse-plugin/2eb46b51251aa511fd94110376446c2388732484
            Log:
            JENKINS-21636 Quickfix for Contional steps(multiple) plugin

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: antoine-aumjaud Path: src/main/java/hudson/plugins/fitnesse/FitnesseBuilder.java http://jenkins-ci.org/commit/fitnesse-plugin/2eb46b51251aa511fd94110376446c2388732484 Log: JENKINS-21636 Quickfix for Contional steps(multiple) plugin

            in version 1.13

            antoine_aumjaud Antoine Aumjaud added a comment - in version 1.13

            People

              antoine_aumjaud Antoine Aumjaud
              anilkumar_y108 anil kumar
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: