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

Provide ability to define workspace / clientspec from master P4 client template

    • Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Major Major
    • p4-plugin
    • None
    • Hudson ver. 1.374, Perforce Plugin 1.1.10

      It would be nice it the Hudson/Jenkins Perforce plugin could create a
      new Workspace (clientspec) based on an existing Perforce "client", in
      that the following command would be invoked to create it:

      p4 client -t master-project-template client-project

      Why?

      For one of my projects I have 22 hudson jobs. We are building on 5
      distinct platforms, Hourly and Daily, and Release and Debug. We have
      two master jobs that kick off the Daily Release and Daily Debug jobs.
      Each job references the same perforce source code.

      From what I can tell, the plugin requires me to manually enter "View"
      information in the "Project Details" section for each job. When I
      want to update my "View", I need to change all 22 plans.

      I want to avoid doing this by defining my "View" information for my
      project's 22 jobs only once. In this case it would be in the a P4
      client "master-project-template".

      I have fiddled around with the currently plugin: 1.1.10, but I have not
      been able to create a job with having to manually enter "View"
      information.

          [JENKINS-8921] Provide ability to define workspace / clientspec from master P4 client template

          ewysp added a comment -

          I was able to simulate what I want by doing the following with the current Perforce plugin in Hudson/Jenkins.

          Project Details: client-project
          Uncheck "Let Hudson Manage Workspace View"
          Check "Clean Workspace Before Each Build"
          View: leave blank (I will get filled in after build)
          Check "Alway Force Sync"
          [Advance]
          "Client name format for slaves": master-project-template

          Now, when I want to add a new "View:" entry, I edit the "master-project-template":

          p4 client master-project-template

          Make appropriate changes, save, and exit.

          Now, I can rebuild all my projects and the "View:" information will automatically be updated in my Hudson/Jenkins Jobs.

          This kind of breaks the typical Perforce/Client server/file relationship. But, it allows me to change my "View:" information in only one location.

          It would be nice though if I could specify a template (as described this Jira's Description) so I could avoid the hack above, and so I could produce truly valid Perforce clients.

          ewysp added a comment - I was able to simulate what I want by doing the following with the current Perforce plugin in Hudson/Jenkins. Project Details: client-project Uncheck "Let Hudson Manage Workspace View" Check "Clean Workspace Before Each Build" View: leave blank (I will get filled in after build) Check "Alway Force Sync" [Advance] "Client name format for slaves": master-project-template Now, when I want to add a new "View:" entry, I edit the "master-project-template": p4 client master-project-template Make appropriate changes, save, and exit. Now, I can rebuild all my projects and the "View:" information will automatically be updated in my Hudson/Jenkins Jobs. This kind of breaks the typical Perforce/Client server/file relationship. But, it allows me to change my "View:" information in only one location. It would be nice though if I could specify a template (as described this Jira's Description) so I could avoid the hack above, and so I could produce truly valid Perforce clients.

            Unassigned Unassigned
            ewysp ewysp
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: