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

p4 plugin with spec file( load workspace spec from file in perforce) is not updating the workspace specs

    • Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Major Major
    • p4-plugin

      Hi 

      When using P4 plugin with the option to load workspace spec file from perforce, It is not updating the client spec.

      Also as a requirement ,we had to add a changeview section:

      ChangeView:

      //path-to-a specificpath...@p4check-auto-label

      Log is given below.
      Building remotely on
      in workspace c:\jenkins\workspace****... p4 client -o *******workspace name******* +
       
      ... p4 info +
       
      ... p4 print -q **pathto specfile from perforce** +
       
      Client P4CLIENT not changed.... p4 client -o **workspace_name**** +
       

      Is adding changeview in the spec file is supported at all by p4 plugin? 

          [JENKINS-52679] p4 plugin with spec file( load workspace spec from file in perforce) is not updating the workspace specs

          Timo Stordell added a comment -

          ChangeView support would be nice!

          Timo Stordell added a comment - ChangeView support would be nice!

          Paul Allen added a comment -

          Are you using the 'Spec File (load workspace spec from file in Perforce)' option on a FreeStyle Jenkins project?

          The 'Manual (custom view)' option should work for change view for both FreeStyle and Pipeline Projects.  I'll need to verify 'Spec File'.

          Paul Allen added a comment - Are you using the 'Spec File (load workspace spec from file in Perforce)' option on a FreeStyle Jenkins project? The 'Manual (custom view)' option should work for change view for both FreeStyle and Pipeline Projects.  I'll need to verify 'Spec File'.

          Paul Allen added a comment -

          (1) A few issues here - any spec errors are not raised to the user

          (2) spec file must use ${P4_CLIENT} which will get expanded later  e.g.

          Client: ${P4_CLIENT}
          Update: 2019/01/24 14:24:06
          Access: 2019/06/04 16:25:24
          Owner: pallen
          Description: 
             Created by pallen.
          Root: /Users/pallen/Perforce/1666/ws
          Options: noallwrite noclobber nocompress unlocked nomodtime normdir
          SubmitOptions: submitunchanged
          LineEnd: local
          View: 
             //depot/... //${P4_CLIENT}/... 

           

          Paul Allen added a comment - (1) A few issues here - any spec errors are not raised to the user (2) spec file must use ${P4_CLIENT} which will get expanded later  e.g. Client: ${P4_CLIENT} Update: 2019/01/24 14:24:06 Access: 2019/06/04 16:25:24 Owner: pallen Description: Created by pallen. Root: /Users/pallen/Perforce/1666/ws Options: noallwrite noclobber nocompress unlocked nomodtime normdir SubmitOptions: submitunchanged LineEnd: local View: //depot/... //${P4_CLIENT}/...  

          Paul Allen added a comment -

          Ok this seems to work with a change view:

          Client:	${P4_CLIENT}
          Update:	2019/01/24 14:24:06
          Access:	2019/06/04 16:25:24
          Owner:	pallen
          Description:
                  Created by pallen.
          Root:	/Users/pallen/Perforce/1666/ws
          Options:	noallwrite noclobber nocompress unlocked nomodtime normdir
          SubmitOptions:	submitunchanged
          LineEnd:	local
          View:
                  //depot/projA/... //${P4_CLIENT}/...
          ChangeView:
                  //depot/projA/...@2239 

          log...

          P4 Task: syncing files at change: 2239
          ... p4 sync -q /Users/pallen/Workspaces/main.p4-jenkins/public/work/workspace/ChangeViewFree/...@2239 

          Paul Allen added a comment - Ok this seems to work with a change view: Client: ${P4_CLIENT} Update: 2019/01/24 14:24:06 Access: 2019/06/04 16:25:24 Owner: pallen Description: Created by pallen. Root: /Users/pallen/Perforce/1666/ws Options: noallwrite noclobber nocompress unlocked nomodtime normdir SubmitOptions: submitunchanged LineEnd: local View: //depot/projA/... //${P4_CLIENT}/... ChangeView: //depot/projA/...@2239 log... P4 Task: syncing files at change: 2239 ... p4 sync -q /Users/pallen/Workspaces/main.p4-jenkins/ public /work/workspace/ChangeViewFree/...@2239

          Paul Allen added a comment -

          Requires: DOC example and raise warning messages from 'execmap: client -i' to the user.

          Paul Allen added a comment - Requires:  DOC example and raise warning messages from 'execmap: client -i' to the user.

          Paul Allen added a comment -

          Ready for release.

          Paul Allen added a comment - Ready for release.

            p4kevin Kevin Williamson
            bbatna Bharani Batna
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: