简体   繁体   English

Jenkins 管道配置页面上没有保存/应用按钮

[英]No Save/Apply button on Jenkins pipeline configuration page

The Save/Apply button is missing from Jenkins pipeline configuration page. Jenkins 管道配置页面中缺少保存/应用按钮。 There seems to be no other way to apply changes to the configuration settings.似乎没有其他方法可以将更改应用于配置设置。 I am unable to find any useful answers or workarounds as well.我也找不到任何有用的答案或解决方法。 I have tried several Javascript workarounds, reinstallation, uninstalled plugins that generated warnings, and stuff but nothing seems to be working.我已经尝试了几种 Javascript 解决方法、重新安装、卸载产生警告的插件以及其他东西,但似乎没有任何效果。 I am using Jenkins version 2.222.3 with BlueOcean.我正在使用带有 BlueOcean 的 Jenkins 版本 2.222.3。

It would be a great help if anyone can suggest a solution.如果有人可以提出解决方案,那将是一个很大的帮助。

Jenkins 流水线配置页面

Jenkins Pipeline configuration is defined in Jenkins Pipeline (eg Jenkinsfile). Jenkins 流水线配置在 Jenkins 流水线(例如 Jenkinsfile)中定义。 To change your configuration, you need to edit your Jenkinsfile.要更改配置,您需要编辑 Jenkinsfile。

Eg to change "Build periodically", here's an example of edit you need to do:例如,要更改“定期构建”,这是您需要执行的编辑示例:

pipeline {
    triggers {
        cron('* * * * *') // run every minute

This is why the page you're looking at is called "View Configuration" — it is for viewing only.这就是您正在查看的页面被称为“查看配置”的原因——它仅供查看。

Using the GitHub plugin, we have an organization folder that is scanned for any repositories that contain a Jenkinsfile.使用 GitHub 插件,我们有一个组织文件夹,用于扫描包含 Jenkinsfile 的任何存储库。 The configuration you are viewing is driven by a config.xml that is copied from the organization folder into each job that runs in a repo.您正在查看的配置由 config.xml 驱动,该配置从组织文件夹复制到在存储库中运行的每个作业中。 So you want your changes to affect jobs/my_organization/config.xml , not jobs/my_organization/jobs/my_repo/config.xml .因此,您希望您的更改影响jobs/my_organization/config.xml ,而不是jobs/my_organization/jobs/my_repo/config.xml

In the UI this is accomplished by going up a level or two from the job or job run.在 UI 中,这是通过从作业或作业运行上升一两个级别来完成的。 There you will see the link change from "View Configuration" to "Configure".在那里,您将看到链接从“查看配置”更改为“配置”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM