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 request] Support custom variable name in "upload_name" field #230

Open
tniezurawski opened this issue Feb 8, 2025 · 1 comment
Assignees
Labels
Area: Report Upload Issues with pre-ingest report uploading Eng Area: CircleCI Orb enhancement New feature or request Medium Medium Priority Issues (to be fixed or re-evaluated in 3 months

Comments

@tniezurawski
Copy link

tniezurawski commented Feb 8, 2025

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?

@thomasrockhu-codecov
Copy link
Contributor

@tniezurawski, thanks for this. I'll take a look into prioritizing, but I think we will want this for flags as well, so it would be useful.

@thomasrockhu-codecov thomasrockhu-codecov self-assigned this Feb 10, 2025
@thomasrockhu-codecov thomasrockhu-codecov added Medium Medium Priority Issues (to be fixed or re-evaluated in 3 months enhancement New feature or request Area: Report Upload Issues with pre-ingest report uploading Eng Area: CircleCI Orb labels Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Report Upload Issues with pre-ingest report uploading Eng Area: CircleCI Orb enhancement New feature or request Medium Medium Priority Issues (to be fixed or re-evaluated in 3 months
Projects
None yet
Development

No branches or pull requests

2 participants