codecov / codecov/codecov-circleci-orb
[Feature request] Support custom variable name in "upload_name" field
@thomasrockhu-codecov is already working on this.
Since Feb 10, 2025.
- Dominant language
- Python
- Stars
- 26
- Forks
- 47
- PR merge metrics
- No merged PRs in 30d
Description
When not specified, upload_name uses $CIRCLE_BUILD_NUM, which I found in the changelog. The docs suggest an empty string:
☝ this could be treated as a small "bug" in docs 😉 but I actually wanted to ask for a feature.
It would be nice to name uploaded reports per container. Unfortunately, CircleCI doesn't support environment variable interpolation in yaml so something like this:
upload_name: "container_${CIRCLE_NODE_INDEX}"
is going to result in the name as we see it:
But I'd be totally fine with preparing the variable name in a previous step, like this, and using it later:
- run:
name: Set CODECOV_UPLOAD_NAME
command: echo "export CODECOV_UPLOAD_NAME=container_${CIRCLE_NODE_INDEX}" >> $BASH_ENV
- codecov/upload:
upload_name: "$CODECOV_UPLOAD_NAME"
or to be more explicit:
- upload_name: "$CODECOV_UPLOAD_NAME"
+ upload_name_var: "$CODECOV_UPLOAD_NAME"
With whatever priority upload_name vs upload_name_var should have in case they are used together.
What do you think?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.