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

Use Codecov-related env variables from orga context #5750

Merged
merged 1 commit into from
Jul 9, 2024

Conversation

Martchus
Copy link
Contributor

@Martchus Martchus commented Jul 8, 2024

@Martchus Martchus marked this pull request as draft July 8, 2024 14:22
@Martchus
Copy link
Contributor Author

Martchus commented Jul 8, 2024

This unfortunately didn't work. As mentioned in https://progress.opensuse.org/issues/163187#note-8 I'm really wondering how OBS does it.

@Martchus Martchus force-pushed the codecov-upload branch 3 times, most recently from f38deba to f9339de Compare July 8, 2024 15:02
@Martchus
Copy link
Contributor Author

Martchus commented Jul 8, 2024

It seems like the report cannot be generated in the first place when running only a reduced number of tests. So I'll have to run the full test suite again to see whether it now works after adding security groups on CircleCI.

@Martchus Martchus force-pushed the codecov-upload branch 3 times, most recently from 343d635 to e92f14b Compare July 9, 2024 09:30
@Martchus
Copy link
Contributor Author

Martchus commented Jul 9, 2024

My tests revealed that the CODECOV_TOKEN environment variable is simply empty and that the Orb then passes an empty token leading to the the 401 auth error we see. This can be worked around by not using the token at all by also not using the Orb, see #5751.

This means the culprit is the environment variable passing of CircleCI. I haven't found anything useful about it on the forums. So maybe I'll ask there myself considering we definitely followed the documentation.

* Read `CODECOV_TOKEN` from the organization context so we don't have
  to specify it on the project level
* See https://progress.opensuse.org/issues/163187
@Martchus Martchus changed the title Fix codecov upload Use Codecov-related env variables from orga context Jul 9, 2024
@Martchus Martchus marked this pull request as ready for review July 9, 2024 11:34
@Martchus
Copy link
Contributor Author

Martchus commented Jul 9, 2024

Looks like all I had to do was enabling the setting "Pass secrets to builds from forked pull requests", see #5751. I tested that on this PR which showed the correct checksum.

We may still merge the initial change of this PR. I removed the additional commits again and reworded the first commit as "Use Codecov-related env variables from orga context".

@mergify mergify bot merged commit fabe9b4 into os-autoinst:master Jul 9, 2024
42 checks passed
@Martchus Martchus deleted the codecov-upload branch July 9, 2024 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants