【问题标题】:How to add support for Jenkinsfile* in PhpStorm?如何在 PhpStorm 中添加对 Jenkinsfile* 的支持?
【发布时间】:2020-04-27 19:42:15
【问题描述】:

在 PhpStorm 中,Jenkinsfile 的代码被突出显示并自动完成。在我的项目中,我有多个Jenkinsfiles(如Jenkinsfile_DEVJenkinsfile_TESTJenkinsfile_PROD)。在该文件中突出显示和自动完成功能不起作用。

如何让 PhpStorm 不仅支持名称为 Jenkinsfile 的文件,而且还将其他文件与此突出显示/自动完成关联(例如 Jenkinsfile_*)?

到目前为止我尝试了什么:我在 File -> Settings -> Editor -> File Types -> Recognized file types 中寻找“Jenkinsfile”条目。该计划只是将“Jenkinsfile *”之类的条目添加到“Jenkinsfile”条目中。但是我没有找到这样的条目。

【问题讨论】:

    标签: autocomplete jenkins-pipeline phpstorm settings


    【解决方案1】:

    Jenkinsfile 语法由 File | 上的 Groovy textmate 包提供。设置 |编辑 | TextMate 捆绑包。不幸的是,它不可配置:Jenkinsfile 被硬编码为与 PhpStorm 中的 Groovy 相关联。此处唯一的选择是为这些文件添加 .groovy 扩展名。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-10-24
      • 1970-01-01
      • 1970-01-01
      • 2016-01-20
      • 2015-06-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多