I'd like to define build steps in a generic way by reading info from a Yaml/Json file.
Use case: Share information about build stages among different types of CI (i.e. I have lot's of build stages and want to implement those for different CIs and for local usage (as described here)
The problem I face now with Jenkins is that this file won't be available before checking out the whole project which is done in the first stage, i.e. I don't yet have the information about the stages I want to define when I need it.
Is there a solution for this situation? Can I select files to be provided among the main Jenkinsfile before running the actual stages?