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

BS-94/use internal sources #1087

Merged
merged 2 commits into from
Nov 14, 2022
Merged

Conversation

gscho
Copy link
Contributor

@gscho gscho commented Nov 9, 2022

Description

This is a new omnibus feature that allows users to build from only internal sources.

It works by adding a configuration value to the omnibus.rb file:

omnibus.rb

use_internal_sources true

And then in the software definitions, you can define an internal_source like this:

my-software/cacerts.rb

internal_source url: "https://my.internal.source/cacert-#{version}.pem"

When both source and internal_source are set, it will use the internal_source when use_internal_sources is set to true.

source url: "https://curl.se/ca/cacert-#{version}.pem"
internal_source url: "https://my.internal.source/cacert-#{version}.pem" # uses this one
  • When use_s3_caching is enabled, it will still use the cached sources wherever possible.
  • When use_internal_sources is enabled and no internal_source is set for a dependency with a url: it will throw and exception

Maintainers

Please ensure that you check for:

  • If this change impacts git cache validity, it bumps the git cache
    serial number
  • If this change impacts compatibility with omnibus-software, the
    corresponding change is reviewed and there is a release plan
  • If this change impacts compatibility with the omnibus cookbook, the
    corresponding change is reviewed and there is a release plan

@gscho gscho requested review from a team as code owners November 9, 2022 17:18
@gscho gscho changed the title Bs 94/use internal sources BS-94/use internal sources Nov 9, 2022
@@ -607,6 +607,12 @@ def reset!
# @return [true, false]
default(:health_check, true)

# Use the internal_source URL when fetching software dependencies. e.g. when creating an
# omnibus package using artifactory as the source url.
#
Copy link
Contributor

Choose a reason for hiding this comment

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

Can append a note here - This switch applies to all included software in the omnibus project. i.e. each omnibus software definition in use in the project must have an internal_source specified

Copy link
Contributor

@vkarve-chef vkarve-chef left a comment

Choose a reason for hiding this comment

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

have tested this with error scenarios. works as expected.

@sonarcloud
Copy link

sonarcloud bot commented Nov 14, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

@vkarve-chef vkarve-chef merged commit cc115a5 into chef:main Nov 14, 2022
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.

2 participants