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

Missing DSL Methods for Perforce Plugin in Jenkins Job DSL

    • Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Major Major
    • p4-plugin
    • Version Job DSL plugin : 1.91
      plugin p4 : 1.17.0
      Jenkins Version : 2.492.2
      OS :

      Hello,

      I am encountering issues when trying to create freestyle jobs using Job DSL scripts for the Perforce plugin in Jenkins. Some expected methods seem to be missing or undefined in the DSL, making it impossible to configure certain options properly.

      - Workspace Configuration Issues

      • Only the manual() method works for defining a workspace.
      • Methods for other workspace types, such as static (spec) or template, seem to be missing or not recognized.
      • Example error when attempting to use a static workspace: 
        unexpected token: static @ line 166, column 21.
        static(client_spec)

      - Missing Populate Options in DSL

      • The populate options (such as sync only, auto sync, etc.) are not available in the DSL configuration.
      • I couldn't find a way to configure clean workspace, force sync, or other p4 populate options via Job DSL.

      - Expected Behavior

      The DSL should provide methods to configure all workspace types (manual, static, template, auto) and allow defining populate options such as sync only and force sync.

      - Steps to Reproduce

      1. Install the Perforce Plugin in Jenkins.
      1. Try to define a freestyle job with a static workspace or populate options using Job DSL.
      1. The only working method is manual(), while other workspace definitions fail.

      Could you please confirm whether these features are missing from the Job DSL support, or if there is an alternative way to configure them?

      Thanks in advance for your help!

      Best regards,

      Esdras

            Unassigned Unassigned
            esdras Esdras
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: