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

After Jenkins upgrade pipeline script from SCM configuration is no longer visible on the GUI

    • 0.6

      After upgrade of the jenkins server to Jenkins ver. 2.176.2 and all plugins to the latest version, all of our pipeline jobs are showing this (see screenshot) and we try to modify it to Pipeline script from SCM and save the configuration, and reopen the configuration of the job it reverts back the screenshot!

       

      what is weird that in the jenkins home directory, the configuration in the job is there in the xml files, it is just not parsed on the GUI!

       

      Even when we create new jobs and save it as pipeline script from SCM, the display always revert to Pipeline script! And there is nothing in the logs that can point us to what might be the issue

          [JENKINS-59145] After Jenkins upgrade pipeline script from SCM configuration is no longer visible on the GUI

          daniel zhang added a comment -

          melhossary

          This issue may be related with the Permissive Script Security Plugin. Although I don't know how it leads to this issue. We configured "-Dpermissive-script-security.enabled=no_security" in our Jenkins with Permissive Script Security Plugin 0.3 and every thing works fine. But after I upgrade the plugin to 0.5, issue happened and  downgrade to 0.3 Jenkins is back to normal.

          Hope this information could help you.

           

          daniel zhang added a comment - melhossary This issue may be related with the Permissive Script Security Plugin. Although I don't know how it leads to this issue. We configured "-Dpermissive-script-security.enabled=no_security" in our Jenkins with Permissive Script Security Plugin 0.3 and every thing works fine. But after I upgrade the plugin to 0.5, issue happened and  downgrade to 0.3 Jenkins is back to normal. Hope this information could help you.  

          daniel1zhang

          Your suggestion fixed our issue ! Thank you so very much, this issue was very annoying to us.

          Mohamed ELHOSSARY added a comment - daniel1zhang Your suggestion fixed our issue ! Thank you so very much, this issue was very annoying to us.

          Peter Wiseman added a comment -

          With Permissive Script Security at 0.5, the Global Pipeline Library SCM configuration information is no longer visible.  If that were all it might be ok, but upon saving, the configuration, is removed.

          Peter Wiseman added a comment - With Permissive Script Security at 0.5, the Global Pipeline Library SCM configuration information is no longer visible.  If that were all it might be ok, but upon saving, the configuration, is removed.

          Peter Wiseman added a comment -

          I tried Permissive Script Security 0.4. It does not have the issue.

          Peter Wiseman added a comment - I tried Permissive Script Security 0.4. It does not have the issue.

          permissive-script-security maintainer here, I failed to reproduce this with version 0.5 installed and enabled so I suspect there must be something else involved. Please share the config.xml of the affected job and org.jenkinsci.plugins.workflow.libs.GlobalLibraries.xml, where there is reported the stored config (of one or the other) is not rendered in UI.

          Oliver Gondža added a comment - permissive-script-security maintainer here, I failed to reproduce this with version 0.5 installed and enabled so I suspect there must be something else involved. Please share the config.xml of the affected job and org.jenkinsci.plugins.workflow.libs.GlobalLibraries.xml , where there is reported the stored config (of one or the other) is not rendered in UI.

          Prometheus plugin 2.0.6 without permissive-security-plugin works.

          Prometheus plugin 2.0.0 and permissive-security-plugin 0.5 works.

          Prometheus plugin 2.0.6 and permissive-security-plugin 0.5 does not work regardless permissive-script-security.enabled setting.

          During startup of Jenkins there are issues with prometheus - https://issues.jenkins-ci.org/browse/JENKINS-59675?focusedCommentId=377073

          Michal Kovarik added a comment - Prometheus plugin 2.0.6 without permissive-security-plugin works. Prometheus plugin 2.0.0 and permissive-security-plugin 0.5 works. Prometheus plugin 2.0.6 and permissive-security-plugin 0.5 does not work regardless permissive-script-security.enabled setting. During startup of Jenkins there are issues with prometheus - https://issues.jenkins-ci.org/browse/JENKINS-59675?focusedCommentId=377073

          Peter Wiseman added a comment -

          Config.xml and org.jenkinsci.plugins.workflow.libs.GlobalLibraries.xml attached.

          config.xml

          org.jenkinsci.plugins.workflow.libs.GlobalLibraries.xml

          Peter Wiseman added a comment - Config.xml and org.jenkinsci.plugins.workflow.libs.GlobalLibraries.xml attached. config.xml org.jenkinsci.plugins.workflow.libs.GlobalLibraries.xml

          It seems like a recurring problem with security plugins no matter what Jenkins versions we are using. With 2.138.3 Jenkins version after updating script-security plugin to version to 1.68 and permissive-script-security plugin is 0.5.  We don't use Prometheus plugin, but the issue is still the same.

          As I see new permissive-script-security plugin version (0.5) has complications with several other plugin and there is no fix for it currently. So you have to downgrade plugins to solve the issue. 
           

          László Kovács added a comment - It seems like a recurring problem with security plugins no matter what Jenkins versions we are using. With 2.138.3 Jenkins version after updating script-security plugin to version to 1.68 and permissive-script-security plugin is 0.5.  We don't use Prometheus plugin, but the issue is still the same. As I see new permissive-script-security plugin version (0.5) has complications with several other plugin and there is no fix for it currently. So you have to downgrade plugins to solve the issue.   

          Adam Koch added a comment - - edited

          Adding my 2¢... 

          I don't have Prometheus but was seeing the issue. I downgraded permissive-script-security plugin from 0.5 to 0.4 and I'm no longer having the issue.

          I downloaded the plugin here: https://updates.jenkins-ci.org/download/plugins/permissive-script-security/

          Update 2020-01-29: After trying with 0.4 I was having issues when approving scripts: the approval would not be saved and I was asked again for approval. So I am on 0.6. I am trying with no_security but get an error running my jobs. 

           

          org.jenkinsci.plugins.scriptsecurity.scripts.UnapprovedUsageException: script not yet approved for use
          	at org.jenkinsci.plugins.scriptsecurity.scripts.ScriptApproval.using(ScriptApproval.java:474)
          	at org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition.create(CpsFlowDefinition.java:120)
          	at org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition.create(CpsFlowDefinition.java:67)
          	at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:299)
          	at hudson.model.ResourceController.execute(ResourceController.java:97)
          	at hudson.model.Executor.run(Executor.java:427)
          

          I'm still looking into this. I've got to understand ScriptApproval.using()

           

           

           

          Adam Koch added a comment - - edited Adding my 2¢...  I don't have Prometheus but was seeing the issue. I downgraded permissive-script-security plugin from 0.5 to 0.4 and I'm no longer having the issue. I downloaded the plugin here:  https://updates.jenkins-ci.org/download/plugins/permissive-script-security/ Update 2020-01-29: After trying with 0.4 I was having issues when approving scripts: the approval would not be saved and I was asked again for approval. So I am on 0.6. I am trying with no_security but get an error running my jobs.    org.jenkinsci.plugins.scriptsecurity.scripts.UnapprovedUsageException: script not yet approved for use at org.jenkinsci.plugins.scriptsecurity.scripts.ScriptApproval.using(ScriptApproval.java:474) at org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition.create(CpsFlowDefinition.java:120) at org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition.create(CpsFlowDefinition.java:67) at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:299) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:427) I'm still looking into this. I've got to understand ScriptApproval.using()      

          Sorry, I failed to report back on the progress here. The rendering issue was addressed in 0.6: https://github.com/jenkinsci/permissive-script-security-plugin/pull/4

           

          aakoch, if you believe there are some other outstanding issues, please report them separately.

           

           

           

          Oliver Gondža added a comment - Sorry, I failed to report back on the progress here. The rendering issue was addressed in 0.6: https://github.com/jenkinsci/permissive-script-security-plugin/pull/4   aakoch , if you believe there are some other outstanding issues, please report them separately.      

            Unassigned Unassigned
            melhossary Mohamed ELHOSSARY
            Votes:
            5 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved: