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

Hide 'Repository browser' field for legacy Perforce 'Global Pipeline libraries' - Repository browser not saved

    • Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Trivial Trivial
    • p4-plugin
    • Version 1.7.6

      With latest p4-plugin, repository browser option is not being saved and always revert back to Auto.

      On our environment, p4-plug always fail to detect with auto option.

       

      P4 Task: saving built changes.
      Found last change 25335 on syncID jenkins-******-CI
      ... p4 client -o jenkins-*****-CI
       +
      ... p4 info
       +
      ... p4 client -o jenkins-*****-CI
       +
      ... p4 info
       +
      ... done
      [BFA] Scanning build for known causes...
      [BFA] No failure causes found
      [BFA] Done. 0s
      java.lang.NullPointerException
      	at org.jenkinsci.plugins.p4.client.ConnectionHelper.getSwarm(ConnectionHelper.java:595)
      	at org.jenkinsci.plugins.p4.changes.P4ChangeParser$ChangeLogHandler.<init>(P4ChangeParser.java:73)
      	at org.jenkinsci.plugins.p4.changes.P4ChangeParser.parse(P4ChangeParser.java:48)
      Caused: org.xml.sax.SAXException: Could not parse perforce changelog: 
      java.lang.NullPointerException
      	at org.jenkinsci.plugins.p4.changes.P4ChangeParser.parse(P4ChangeParser.java:53)
      	at org.jenkinsci.plugins.workflow.job.WorkflowRun.onCheckout(WorkflowRun.java:812)
      	at org.jenkinsci.plugins.workflow.job.WorkflowRun.access$1500(WorkflowRun.java:135)
      	at org.jenkinsci.plugins.workflow.job.WorkflowRun$SCMListenerImpl.onCheckout(WorkflowRun.java:1002)
      	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:127)
      	at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:130)
      	at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:59)
      	at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:263)
      	at hudson.model.ResourceController.execute(ResourceController.java:97)
      	at hudson.model.Executor.run(Executor.java:419)
      Finished: FAILURE
      

          [JENKINS-47394] Hide 'Repository browser' field for legacy Perforce 'Global Pipeline libraries' - Repository browser not saved

          mocsharp added a comment - - edited

          Actually, looks like it was saved. However, if user goes back to "config", the dropdown doesn't populate the saved value and thus when user saves the config again, it removes the original value.

          mocsharp added a comment - - edited Actually, looks like it was saved. However, if user goes back to "config", the dropdown doesn't populate the saved value and thus when user saves the config again, it removes the original value.

          Its a know issue. We don't plan to fix it in near future. However, if you have a pull request then we are happy to review.

          W Basu Perforce added a comment - Its a know issue. We don't plan to fix it in near future. However, if you have a pull request then we are happy to review.

          Karl Wirth added a comment -

          NOTE: Repository browser will be saved for Freestyle, pipeline and multibranch jobs. It will NOT be saved for libraries (only available on Legacy SCM > Perforce global libraries). This is by design:

          // Not used for Global Library
           @Override
           public P4Browser getBrowser() {
           return null;
           }

          Therefore this need to be changed to "Hide Repository browser for" for global libraries.

           

            

          Karl Wirth added a comment - NOTE: Repository browser will be saved for Freestyle, pipeline and multibranch jobs. It will NOT be saved for libraries (only available on Legacy SCM > Perforce global libraries). This is by design: // Not used for Global Library @Override public P4Browser getBrowser() { return null ; } Therefore this need to be changed to "Hide Repository browser for" for global libraries.     

            Unassigned Unassigned
            mocsharp mocsharp
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: