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(detect): enable detect to run with sidecar on Jenkins (non K8s) and others #4979

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

CCFenner
Copy link
Member

@CCFenner CCFenner commented Jul 2, 2024

No description provided.

@CCFenner CCFenner requested a review from a team as a code owner July 2, 2024 13:24
Copy link

sonarcloud bot commented Jul 2, 2024

default:
return nil, fmt.Errorf("unknown container distro %q", config.ScanContainerDistro)
}

host := fmt.Sprintf("inspector-%s", config.ScanContainerDistro)
// if we run in a Kubernetes environment, we can reach the sidecar using "localhost"
if os.Getenv("ON_K8S") == "true" {
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't we get rid of such ifs instead of adding them more and more. Doesn't that defeat the purpose of the jenkins-library if the steps will have to know where they run?

@CCFenner CCFenner marked this pull request as draft July 3, 2024 09:36
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.

None yet

2 participants