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
Expose scm material url and branch as environment variables to tasks #6289
Comments
I'm usually up for providing more information. In these cases though, assuming git for now, these are available using command such as:
Right? Isn't that enough? Trying to understand whether it's about convenience or something more than that. Of course, one of the issues we'd need to look at if URL is provided is that the URL might have credentials in some cases. |
More detail: I specifically didn't include more detail because I wanted the request to reflect the level of knowledge the pipeline task has when it has to perform what it has to perform. It should not have to know whether it is a git repo or an svn repo or any other. That knowledge is nicely compartmentalised into the material handling and should stay there. Usecase: The above not withstanding there are some times when the user or beneficiary of the automation might benefit from some (fairly generic across scm tools) information configured, generated or otherwise identified during material handling that the task itself should not need to know the toolset involved to retrieve (eg branch, remote repo url, change id, etc) as once you are manipulating tools specific to the material in subsequent tasks that pipeline stage is now broken if the material source/toolset changes and reusability across SCM repos is impossible without unwieldy cludges. Credentials: It would seem prudent to elide passwords found in the url format password location or values of query section fields like "password", "passwd", "pass", etc. |
Verified on 19.10.0 (10328-5cb62ca14461d56576551e0bbec2978c909ea9b2) |
Issue Type
Summary
I need to be able to pass the following values to the build process I am executing (creating a pipeline to orchestrate the build, test & release automations of another team):
currently only the commit id and version are exposed as environment variables to the task.
Request is to add the scm url and branch name to the set of material metadata being exposed as env vars to tasks.
The text was updated successfully, but these errors were encountered: