Ci integration - #236
Merged
Merged
Conversation
This was referenced Apr 22, 2026
isakstenstrom
force-pushed
the
ci-integration
branch
from
April 29, 2026 06:29
9025439 to
4e9a242
Compare
isakstenstrom
marked this pull request as ready for review
April 29, 2026 14:19
isakstenstrom
marked this pull request as draft
May 4, 2026 12:14
The email field wasn't shown, and now that we have authenticated users, this field isn't as useful. Also renames `user_ldap` -> `username`.
isakstenstrom
force-pushed
the
ci-integration
branch
from
May 4, 2026 12:34
4e9a242 to
9fe2108
Compare
The Source Control has been reworked to make it possible to integrate bb-portal with more CI and source control systems. The `invocationMetadataExtractor` configuration controls what data is stored. The extractor can do the following: - Set the username associated with the invocation. - Set the hostname associated with the invocation. - Add `SourceControl`s to a invocation. A `SourceControl` consists of a `repo`, `commit` and a `ref`, as well as their urls. - Set tags (key-value pairs) associated with a invocation. Each key is unique per invocation. - Set tags (key-value pairs) associated with a build. Each combination of key and value is unique per build. Invocations are grouped togehter as builds based on the buildTags. A new config field has been added called `buildKey`, and invocations that have the same combination of `instanceName` and `buildTags[buildKey]` are grouped in the same build. This replaces the old hardcoded way of integrating with Github and Gitlab. Example configurations for Github + Github Actions, Gitlab + Gitlab CI, and Github + SemaphoreCI are provided.
isakstenstrom
force-pushed
the
ci-integration
branch
from
May 11, 2026 11:43
9fe2108 to
7797cc7
Compare
isakstenstrom
marked this pull request as ready for review
May 11, 2026 13:26
meroton-benjamin
approved these changes
May 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For some time, bb-portal has had hard-coded integrations against GitHub and GitLab, where invocations from the same workflow are grouped together into builds which have additional visualizations. This has worked well, but only when using any of those systems.
This PR makes the integration with CI systems configurable from the jsonnet file, allowing for integration with any CI system.
How to configure
A new configuration field has been added called
invocationMetadataExtractorthat accepts a Jmespath expression. Its purpose is to extract data from the environment variables Bazel is executed with. The result of the extractor is expected to be a JSON object with the following fields:username: The username to be associated with the invocation.hostname: The hostname for the computer that ran the invocation.sourceControls: An array of objects representing a repository used by the invocation. The entitySourceControlnow only contains a repo, ref and commit sha, as well as urls for each of them.invocationTags: JSON object with key-values to be associated with the invocation.buildTags: JSON object with key-values to be associated with the build.Invocations are grouped togehter as builds based on the buildTags. A new config field has been added called
buildKey, and invocations that have the same combination ofinstanceNameandbuildTags[buildKey]are grouped in the same build.The tags are visualized on each build and invocation. Additionally, the build and build details tables can be configured with extra columns where specified tags are shown and can be filtered for.
Here is an example
invocationMetadataExtractorfor GitHub Actions:Relevant discussion: #211