未验证 提交 1e1c976b 编写于 作者: K KubeSphere CI Bot 提交者: GitHub

Merge pull request #3147 from LinuxSuRen/fix/default-jenkinsfile

Fix panic against with pipeline-multibranch-defaults-plugin
......@@ -902,7 +902,12 @@ func parseMultiBranchPipelineConfigXml(config string) (*devopsv1alpha3.MultiBran
}
}
pipeline.ScriptPath = project.SelectElement("factory").SelectElement("scriptPath").Text()
scriptPathEle := project.SelectElement("factory").SelectElement("scriptPath")
if scriptPathEle != nil {
// There's no script path if current pipeline using a default Jenkinsfile
// see also https://github.com/jenkinsci/pipeline-multibranch-defaults-plugin
pipeline.ScriptPath = scriptPathEle.Text()
}
return pipeline, nil
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册