Skip to content

Conversation

@ribafish
Copy link
Member

@ribafish ribafish commented Jul 8, 2025

Added setting CI Action and CI job id custom values on github action builds. This is an example GHA builds (the build scan), with the scan having two custom values (and search links) added: CI job id and CI step id. This will be helpful when you've got multiple builds running consecutively and are passing in arguments that affect those builds, but are not captured in a build scan (best example are Maven profiles for CCUD Maven).

When this is accepted I will do the same for CCUD Maven (and sbt).

Closes #389.

@ribafish ribafish requested a review from a team July 8, 2025 14:54
@ribafish ribafish requested a review from erichaagdev July 9, 2025 07:39
@ribafish ribafish requested a review from erichaagdev July 14, 2025 09:56
addCustomValueAndSearchLink(develocity, "CI run", value));
envVariable("GITHUB_HEAD_REF", providers).filter(value -> !value.isEmpty()).ifPresent(value ->
buildScan.value("PR branch", value));
envVariable("GITHUB_ACTION", providers).ifPresent(value ->
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick, but I'd group all of the env vars together that produce a value + link. In other words, I'd have the GITHUB_HEAD_REF logic last in this code block.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@clayburn done

@ribafish ribafish force-pushed the gk/expandGhaValues branch from dbe67b5 to 443dd19 Compare July 15, 2025 13:21
@ribafish ribafish requested a review from clayburn July 15, 2025 13:21
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.

Add the job id and step information to custom values when running in Github Actions

4 participants