codecov / codecov/codecov-circleci-orb

[Feature request] Support custom variable name in "upload_name" field

Open
#230 2 comments 2 reactions 1 assignee View on GitHub

@thomasrockhu-codecov is already working on this.

Since Feb 10, 2025.

[Product] Report Upload [Type] Enhancement Area: Report Upload codecov/codecov-circleci-orb
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:

Image

☝ 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:

Image

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.