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

Cannot specify single files in workspace mapping

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • p4-plugin

      With a p4sync step that includes individual files:

      p4sync charset: 'utf8', credential: 'perforce', format: 'jenkins-${NODE_NAME}-${JOB_NAME}-${EXECUTOR_NUMBER}-ej', populate: forceClean(have: false, parallel: [enable: true, minbytes: '1024', minfiles: '1', threads: '8'], pin: '', quiet: true), source: depotSource(
      """//${codeline.P4_BRANCH}/sources_ecwjp2v4/QA/Source/Android/...
      //${codeline.P4_BRANCH}/sources_ecwjp2v4/QA/Source/C/...
      //${codeline.P4_BRANCH}/sources_ecwjp2v4/QA/Data/...
      //${codeline.P4_BRANCH}/sources_ecwjp2v4/Documentation/Doxygen/...
      //${codeline.P4_BRANCH}/sources_ecwjp2v4/SDK/ECW_SDK_Objective-C/...
      //${codeline.P4_BRANCH}/sources_ecwjp2v4/SDK/PCS_Extension/...
      //${codeline.P4_BRANCH}/sources_ecwjp2v4/Source/...
      //${codeline.P4_BRANCH}/tools/maven/settings/settings-perth.xml
      //${codeline.P4_BRANCH}/tools/bash-build-tools/...
      //${codeline.P4_BRANCH}/tools/boost-build/...
      //${codeline.P4_BRANCH}/tools/cppunit/...
      //${codeline.P4_BRANCH}/tools/CodeSigning/signtools/...
      //${codeline.P4_BRANCH}/tools/ic_scripts/...
      //${codeline.P4_BRANCH}/tools/srcsrv/...
      //${codeline.P4_BRANCH}/sources_highdrag/apache-ant-1.8.2/...
      //${codeline.P4_BRANCH}/sources_highdrag/NetscapePluginSDK/classes/java40.jar
      //${codeline.P4_BRANCH}/sources_highdrag/retroguard-v1.1/...
      //${codeline.P4_BRANCH}/sources_highdrag/UnxUtils/...
      //${codeline.P4_BRANCH}/sources_erm/third_party/gdal/...
      //${codeline.P4_BRANCH}/sources_iws/Source/C/euclideon/euclideonsdk.vcxproj
      //${codeline.P4_BRANCH}/sources_iws/Source/C/euclideon/euclideonsdk.vcxproj.filters
      //${codeline.P4_BRANCH}/sources_iws/Source/C/euclideon/euclideonsdk.xml
      //${codeline.P4_BRANCH}/sources_iws/Source/NCSNightlyBuild/NCSNightlyBuild.vcxproj
      //${codeline.P4_BRANCH}/sources_iws/Source/NCSNightlyBuild/NCSNightlyBuild.props
      """                      
      				)
      

      We end up with a workspace mapping like:

      //depot/Mainline/Generation_3/sources_ecwjp2v4/QA/Source/Android/... //jenkins-rh6b-bajoran-ecwjp2-mainline-products-0-ej/depot/Mainline/Generation_3/sources_ecwjp2v4/QA/Source/Android/...
      //depot/Mainline/Generation_3/sources_ecwjp2v4/QA/Source/C/... //jenkins-rh6b-bajoran-ecwjp2-mainline-products-0-ej/depot/Mainline/Generation_3/sources_ecwjp2v4/QA/Source/C/...
      //depot/Mainline/Generation_3/sources_ecwjp2v4/QA/Data/... //jenkins-rh6b-bajoran-ecwjp2-mainline-products-0-ej/depot/Mainline/Generation_3/sources_ecwjp2v4/QA/Data/...
      //depot/Mainline/Generation_3/sources_ecwjp2v4/Documentation/Doxygen/... //jenkins-rh6b-bajoran-ecwjp2-mainline-products-0-ej/depot/Mainline/Generation_3/sources_ecwjp2v4/Documentation/Doxygen/...
      //depot/Mainline/Generation_3/sources_ecwjp2v4/SDK/ECW_SDK_Objective-C/... //jenkins-rh6b-bajoran-ecwjp2-mainline-products-0-ej/depot/Mainline/Generation_3/sources_ecwjp2v4/SDK/ECW_SDK_Objective-C/...
      //depot/Mainline/Generation_3/sources_ecwjp2v4/SDK/PCS_Extension/... //jenkins-rh6b-bajoran-ecwjp2-mainline-products-0-ej/depot/Mainline/Generation_3/sources_ecwjp2v4/SDK/PCS_Extension/...
      //depot/Mainline/Generation_3/sources_ecwjp2v4/Source/... //jenkins-rh6b-bajoran-ecwjp2-mainline-products-0-ej/depot/Mainline/Generation_3/sources_ecwjp2v4/Source/...
      //depot/Mainline/Generation_3/tools/maven/settings/settings-perth.xml/... //jenkins-rh6b-bajoran-ecwjp2-mainline-products-0-ej/depot/Mainline/Generation_3/tools/maven/settings/settings-perth.xml/...
      //depot/Mainline/Generation_3/tools/bash-build-tools/... //jenkins-rh6b-bajoran-ecwjp2-mainline-products-0-ej/depot/Mainline/Generation_3/tools/bash-build-tools/...
      //depot/Mainline/Generation_3/tools/boost-build/... //jenkins-rh6b-bajoran-ecwjp2-mainline-products-0-ej/depot/Mainline/Generation_3/tools/boost-build/...
      //depot/Mainline/Generation_3/tools/cppunit/... //jenkins-rh6b-bajoran-ecwjp2-mainline-products-0-ej/depot/Mainline/Generation_3/tools/cppunit/...
      //depot/Mainline/Generation_3/tools/CodeSigning/signtools/... //jenkins-rh6b-bajoran-ecwjp2-mainline-products-0-ej/depot/Mainline/Generation_3/tools/CodeSigning/signtools/...
      //depot/Mainline/Generation_3/tools/ic_scripts/... //jenkins-rh6b-bajoran-ecwjp2-mainline-products-0-ej/depot/Mainline/Generation_3/tools/ic_scripts/...
      //depot/Mainline/Generation_3/tools/srcsrv/... //jenkins-rh6b-bajoran-ecwjp2-mainline-products-0-ej/depot/Mainline/Generation_3/tools/srcsrv/...
      //depot/Mainline/Generation_3/sources_highdrag/apache-ant-1.8.2/... //jenkins-rh6b-bajoran-ecwjp2-mainline-products-0-ej/depot/Mainline/Generation_3/sources_highdrag/apache-ant-1.8.2/...
      //depot/Mainline/Generation_3/sources_highdrag/NetscapePluginSDK/classes/java40.jar/... //jenkins-rh6b-bajoran-ecwjp2-mainline-products-0-ej/depot/Mainline/Generation_3/sources_highdrag/NetscapePluginSDK/classes/java40.jar/...
      //depot/Mainline/Generation_3/sources_highdrag/retroguard-v1.1/... //jenkins-rh6b-bajoran-ecwjp2-mainline-products-0-ej/depot/Mainline/Generation_3/sources_highdrag/retroguard-v1.1/...
      //depot/Mainline/Generation_3/sources_highdrag/UnxUtils/... //jenkins-rh6b-bajoran-ecwjp2-mainline-products-0-ej/depot/Mainline/Generation_3/sources_highdrag/UnxUtils/...
      //depot/Mainline/Generation_3/sources_erm/third_party/gdal/... //jenkins-rh6b-bajoran-ecwjp2-mainline-products-0-ej/depot/Mainline/Generation_3/sources_erm/third_party/gdal/...
      //depot/Mainline/Generation_3/sources_iws/Source/C/euclideon/euclideonsdk.vcxproj/... //jenkins-rh6b-bajoran-ecwjp2-mainline-products-0-ej/depot/Mainline/Generation_3/sources_iws/Source/C/euclideon/euclideonsdk.vcxproj/...
      //depot/Mainline/Generation_3/sources_iws/Source/C/euclideon/euclideonsdk.vcxproj.filters/... //jenkins-rh6b-bajoran-ecwjp2-mainline-products-0-ej/depot/Mainline/Generation_3/sources_iws/Source/C/euclideon/euclideonsdk.vcxproj.filters/...
      //depot/Mainline/Generation_3/sources_iws/Source/C/euclideon/euclideonsdk.xml/... //jenkins-rh6b-bajoran-ecwjp2-mainline-products-0-ej/depot/Mainline/Generation_3/sources_iws/Source/C/euclideon/euclideonsdk.xml/...
      //depot/Mainline/Generation_3/sources_iws/Source/NCSNightlyBuild/NCSNightlyBuild.vcxproj/... //jenkins-rh6b-bajoran-ecwjp2-mainline-products-0-ej/depot/Mainline/Generation_3/sources_iws/Source/NCSNightlyBuild/NCSNightlyBuild.vcxproj/...
      //depot/Mainline/Generation_3/sources_iws/Source/NCSNightlyBuild/NCSNightlyBuild.props/... //jenkins-rh6b-bajoran-ecwjp2-mainline-products-0-ej/depot/Mainline/Generation_3/sources_iws/Source/NCSNightlyBuild/NCSNightlyBuild.props/...
      

      Where individual files are suffixed with the elipse, e.g.:

      //depot/Mainline/Generation_3/tools/maven/settings/settings-perth.xml/... //jenkins-rh6b-bajoran-ecwjp2-mainline-products-0-ej/depot/Mainline/Generation_3/tools/maven/settings/settings-perth.xml/...
      

      And they don't sync.

      Looks like org.jenkinsci.plugins.plugins.p4.client.GraphWorkFlowTest.testGetClientView explicitly tests that the elipse will be suffixed on the workspace mapping.

      If this is expected, how can we explicitly tell p4sync to sync one file?

          [JENKINS-52652] Cannot specify single files in workspace mapping

          Paul Allen added a comment -

          Fixed in Main. Ready for release.

          (builds: https://ci.jenkins.io/job/Plugins/job/p4-plugin/job/master/)

          Paul Allen added a comment - Fixed in Main. Ready for release. (builds:  https://ci.jenkins.io/job/Plugins/job/p4-plugin/job/master/ )

          Paul Allen added a comment -

          Ready for release.

          Paul Allen added a comment - Ready for release.

          Chris Tapley added a comment -

          Thanks p4paul, your change works for me in master

          Chris Tapley added a comment - Thanks p4paul , your change works for me in master

          Paul Allen added a comment -

          Thank you - hopefully I'll get a patch release out next week.

          Paul Allen added a comment - Thank you - hopefully I'll get a patch release out next week.

          Paul Allen added a comment -

          Released in 1.8.14

          Paul Allen added a comment - Released in 1.8.14

          Richard Lee added a comment - - edited

          I think this broke the automatic addition of '/...' to perforce view mappings when using the 'depotPath:' attribute of the p4sync step.

          This was a breaking, not backwards compatible change.

          Also, if you will recall, originally, you were required to not specify '/...' on the end of your depotPath, or the p4-plugin would add another one itself, messing things up.

          You guys need to be more careful about testing, maintaining compatibility, and release notes for major breaking changes. 

          Richard Lee added a comment - - edited I think this broke the automatic addition of '/...' to perforce view mappings when using the 'depotPath:' attribute of the p4sync step. This was a breaking, not backwards compatible change. Also, if you will recall, originally, you were required to not specify '/...' on the end of your depotPath, or the p4-plugin would add another one itself, messing things up. You guys need to be more careful about testing, maintaining compatibility, and release notes for major breaking changes. 

            p4paul Paul Allen
            christapley Chris Tapley
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: