如何从jenkins管道中的不同存储库获取代理pod模板

如何从jenkins管道中的不同存储库获取代理pod模板,jenkins,jenkins-pipeline,jenkins-groovy,jenkins-kubernetes,jenkins-git-plugin,Jenkins,Jenkins Pipeline,Jenkins Groovy,Jenkins Kubernetes,Jenkins Git Plugin,我想在Repo A中保留jenkins管道代理(kubernetes pod)模板。jenkins文件在Repo B中。要在Repo B上运行阶段“ci”,我需要从Repo A签出代理文件夹 pipeline { agent none stages { stage('ci') { agent { kubernetes { yamlFile "agents/ci.yaml" } } steps

我想在Repo A中保留jenkins管道代理(kubernetes pod)模板。jenkins文件在Repo B中。要在Repo B上运行阶段“ci”,我需要从Repo A签出代理文件夹

pipeline {
  agent none
  stages {
    stage('ci') {
      agent {
        kubernetes {
          yamlFile "agents/ci.yaml"
        }
      }
      steps {
      }
    }
    stage('staging deploy') {
      agent {
        kubernetes {
          yamlFile "agents/stage-deploy.yaml"
        }
      }
      steps {
      }
    }
  }
}
当我运行jenkins管道作业时,它检查Repo B(分支名称=develope)。但我无法签出Repo A(branch name=master)以获取代理模板。这里的任何帮助都会很好。我一直在努力解决这个问题