Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature]: allow pipeline configurations to access the already configured pipelineConfig variable #300

Open
steven-terrana opened this issue Jun 30, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@steven-terrana
Copy link

Feature Description

to minimize duplication in the Pipeline Configuration, allow resolution of the pipelineConfig variable within the configuration.

Open Questions:

  1. should the value of pipelineConfig be the current configuration file or the current aggregated pipeline configuration
@steven-terrana steven-terrana added the enhancement New feature or request label Jun 30, 2022
@cokieffebah
Copy link

cokieffebah commented Jun 30, 2022

currently, technically, it would have to be the aggregated because if you override an existing field that is not allowed to be overridden the local value is not valid

root tier pipeline_config.groovy:

libraries {
  @merge mylib { var = false } // not allowing overridding
  @override mylib2 { var2 = false } // not allowing merge
}

final resolved pipeline_config.groovy

libraries {
  mylib { 
    var = true 
    var2 = pipelineConfig.libraries.mylib.var // technically 'false' but you might expect 'true'
    var3 = pipelineConfig.libraries.mylib2.var // ??
  }
  mylib2 {
    var = true // wont be set because @merge was not used in ancestor config
  }  

}

@cokieffebah
Copy link

cokieffebah commented Jun 30, 2022

the above makes me think we should only allow the 'local' config, because it is simpler and call it something like localConfig to distinguish it from the 'aggregated configuration' that pipelineConfig normally represents

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants