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

feat: generate SBOM file for releases #1367

Merged
merged 7 commits into from
Apr 6, 2022

Conversation

aaronweissler
Copy link
Member

@aaronweissler aaronweissler commented Mar 25, 2022

This change is Reviewable

Copy link
Member Author

@aaronweissler aaronweissler left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 3 files reviewed, 2 unresolved discussions


build.gradle, line 38 at r1 (raw file):

    // includeConfigs += ["runtimeClasspath"]
    // skipConfigs is a list of configuration names to exclude when generating the BOM
    // skipConfigs += ["compileClasspath", "testCompileClasspath"]

I do not know which configs would be sensible to skip or if only a specific set should be included in the first place.
The currently commented-out values are from the plugin's readme https://github.com/CycloneDX/cyclonedx-gradle-plugin


.circleci/config.yml, line 62 at r1 (raw file):

      - run: cp ~/inspectit/repo/components/inspectit-ocelot-eum-server/build/libs/inspectit-ocelot-eum-server-${CIRCLE_TAG}.jar ~/inspectit/artifacts
      - run: cp ~/inspectit/repo/build/reports/bom.json ~/inspectit/artifacts
      - run: cp ~/inspectit/repo/build/reports/bom.xml ~/inspectit/artifacts

I could not yet test whether these additions work as expected.

@codecov
Copy link

codecov bot commented Mar 25, 2022

Codecov Report

Merging #1367 (62e6ada) into master (8efe4a9) will decrease coverage by 0.12%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master    #1367      +/-   ##
============================================
- Coverage     81.16%   81.04%   -0.12%     
+ Complexity     2072     2071       -1     
============================================
  Files           210      211       +1     
  Lines          6591     6593       +2     
  Branches        784      782       -2     
============================================
- Hits           5349     5343       -6     
- Misses          943      951       +8     
  Partials        299      299              
Impacted Files Coverage Δ
...lot/bootstrap/context/noop/NoopContextManager.java 10.00% <0.00%> (-20.00%) ⬇️
...spectit/ocelot/core/config/util/PropertyUtils.java 91.30% <0.00%> (-4.35%) ⬇️
...ectit/ocelot/core/config/InspectitEnvironment.java 75.19% <0.00%> (-2.76%) ⬇️
...nstrumentation/autotracing/InvocationResolver.java 88.24% <0.00%> (-1.68%) ⬇️
.../propertysources/file/DirectoryPropertySource.java 89.80% <0.00%> (-0.40%) ⬇️
.../propertysources/http/HttpPropertySourceState.java 77.60% <0.00%> (ø)
...t/core/config/util/InvalidPropertiesException.java 100.00% <0.00%> (ø)
...nspectit/ocelot/core/utils/HighPrecisionTimer.java 90.62% <0.00%> (+1.56%) ⬆️

@aaronweissler aaronweissler changed the title feat(general) - Generate SBOM for release feat(): Generate SBOM for release Mar 25, 2022
@aaronweissler aaronweissler changed the title feat(): Generate SBOM for release feat: Generate SBOM for release Mar 25, 2022
@mariusoe mariusoe self-assigned this Mar 25, 2022
@mariusoe mariusoe changed the title feat: Generate SBOM for release feat: generate SBOM file for releases Mar 25, 2022
@mariusoe mariusoe added area/general enhancement New feature or request labels Mar 25, 2022
Copy link
Member Author

@aaronweissler aaronweissler left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 6 files reviewed, all discussions resolved (waiting on @mariusoe)


inspectit-ocelot-core/build.gradle, line 156 at r2 (raw file):

cyclonedxBom {
    // includeConfigs is the list of configuration names to include when generating the BOM (leave empty to include every configuration)
    includeConfigs += ["runtimeClasspath"]

As discussed, only dependencies in the runtimeClasspath are taken into account.

Copy link
Member

@mariusoe mariusoe left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 3 files at r1, 2 of 3 files at r2, 3 of 3 files at r3, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @aaronweissler)


.circleci/config.yml, line 61 at r3 (raw file):

      - run: cp ~/inspectit/repo/components/inspectit-ocelot-configurationserver/build/libs/inspectit-ocelot-configurationserver-${CIRCLE_TAG}.jar ~/inspectit/artifacts
      - run: cp ~/inspectit/repo/components/inspectit-ocelot-eum-server/build/libs/inspectit-ocelot-eum-server-${CIRCLE_TAG}.jar ~/inspectit/artifacts
      - run: cp ~/inspectit/repo/inspectit-ocelot-core/build/reports/bom.json ~/inspectit/artifacts/inspectit-ocelot-agent-bom.json

Maybe we should bundle all of these bom files within a single zip-archive file. Doing this, we don't overload the release artifacts with all of thoses bom files.
What do you think?


components/inspectit-ocelot-configurationserver/build.gradle, line 84 at r3 (raw file):

cyclonedxBom {
    // includeConfigs is the list of configuration names to include when generating the BOM (leave empty to include every configuration)

Imo we don't need this comment. Please remove it in each file.

Copy link
Member Author

@aaronweissler aaronweissler left a comment

Choose a reason for hiding this comment

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

Reviewable status: 2 of 6 files reviewed, 2 unresolved discussions (waiting on @mariusoe)


.circleci/config.yml, line 61 at r3 (raw file):

Previously, mariusoe (Marius Oehler) wrote…

Maybe we should bundle all of these bom files within a single zip-archive file. Doing this, we don't overload the release artifacts with all of thoses bom files.
What do you think?

I like the idea, is added now :)


components/inspectit-ocelot-configurationserver/build.gradle, line 84 at r3 (raw file):

Previously, mariusoe (Marius Oehler) wrote…

Imo we don't need this comment. Please remove it in each file.

Done.

Copy link
Member

@mariusoe mariusoe left a comment

Choose a reason for hiding this comment

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

Reviewed 4 of 4 files at r4, 1 of 1 files at r5, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @aaronweissler)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/general enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants