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

additional extensions with resolveScm

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Not A Defect
    • Icon: Major Major
    • None
    • Jenkins 2.361.3
      Pipeline: Multibranch Version 716.vc692a_e52371b_
      Git plugin Version 4.13.0
      Git client plugin Version 3.13.0

      I need to activate additional extensions like GitLFSPull or CloneOption when using resolveScm()

      I tried

      checkout resolveScm(source: [$class: 'GitSCMSource', remote: 'remoteurl,
                                   extensions: [[$class: 'CloneOption', reference: "/refrepo"], [$class: 'GitLFSPull']],
                                   traits: [[$class: 'jenkins.plugins.git.traits.BranchDiscoveryTrait']]],
                           targets: ['master'])

      but the extensions is not added to the returned GitSCM object.

      I would like to have an additional parameter for resolveScm like "extensions", "additionalExtensions" or "customExtensions" where extensions can be added and which are then passed to "checkout".

      For example:

      checkout resolveScm(source: [$class: 'GitSCMSource', remote: 'remoteurl,
                                   traits: [[$class: 'jenkins.plugins.git.traits.BranchDiscoveryTrait']]],
                          targets: ['master'],
                          additionalExtensions: [[$class: 'CloneOption', reference: "/refrepo"], [$class: 'GitLFSPull']])

            Unassigned Unassigned
            gordin Christoph Vogtländer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: