Retrieve parameters from properties file

前端 未结 2 1048
礼貌的吻别
礼貌的吻别 2020-12-06 18:58

I have several Jenkins parameterized jobs that uses the same parameters and parameters values. When I have to change the default value of one of those parameters, I need to

相关标签:
2条回答
  • 2020-12-06 19:15

    Use EnvInject Plugin to read your parameters from a file as environment variables in an Inject Environment Variables build step. The glitch is that then you can't override them easily. One solution would be to use it in conjunction with the Conditional BuildStep Plugin. You can then can define a boolean parameter OVERRIDE that would be false by default. You can then run your Inject build step conditionally only when OVERRIDE is false. When you need to override your parameters with values provided by hand (on in a custom call to run the job) specify the override values and set OVERRIDE to true.

    0 讨论(0)
  • 2020-12-06 19:22

    I use hudson with ant and set parameters (customer) in my hudson job. This parameter is then the name of a property file that i open with ant as follow:

    <loadproperties> srcFile="${project.dir}/build/resources/${customer}.properties"/>
    
    0 讨论(0)
提交回复
热议问题