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

Cant filter streams with P4Groovy

    Details

    • Similar Issues:

      Description

      Following groovy code returns an empty result:

      def output = p4.run('streams','-F','"Name=mainX"','//streams/...')

      At the command line we get a result:

      $ p4 streams -F "Name=mainX" //streams/...
      Stream //streams/main mainline none 'mainX'
      

      Usage Case:

      To get the stream path from the BRANCH_NAME when using multi branch and helix streams.

      Workaround:

      def output = p4.run('streams','-T','Name,Stream','//streams/...')
         output.eachWithIndex{item, index -> output[index].each{
            key, value -> if (value == "mainX") println output[index]['Stream'];
            }
         }

       

        Attachments

          Activity

          There are no comments yet on this issue.

            People

            • Assignee:
              Unassigned
              Reporter:
              p4karl Karl Wirth
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: