简体   繁体   English

go.cd中的全局配置

[英]Global configuration in go.cd

Is there any way to define some kind of global parameter in go.cd? 有什么办法可以在go.cd中定义某种全局参数? I want to define a few parameters that are common for all pipelines (eg url of the server containing all my repositories). 我想定义一些所有管道通用的参数(例如,包含我所有存储库的服务器的url)。

AFAIK, there are two possibilities to parametrize build, but none is appropriate for global configuration: AFAIK,参数化构建有两种可能性,但都不适合全局配置:

  • parameters are defined for single pipeline/template 为单个管道/模板定义了参数
  • environment variables are only usable inside tasks 环境变量仅在任务内部可用

[ Not a best solution] [ 不是最佳解决方案]

For a quick hack, you can try defining the environment variable(s) on the machines(which have the Go agent installed) may work? 为了快速破解,您可以尝试在安装了Go代理的机器上定义环境变量是否可行?

If you are using Linux machines export the variable(s) inside the bash environment and use them inside the tasks? 如果您使用的是Linux计算机,请在bash环境中导出变量,然后在任务中使用它们?

However, you may need to manage these environment variables on the go agent machines via some other tool. 但是,您可能需要通过其他工具在go agent机器上管理这些环境变量。

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

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