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

🧹 apply runtime env labels for discovered assets #794

Merged
merged 2 commits into from
Oct 4, 2023
Merged

Conversation

imilchev
Copy link
Member

@imilchev imilchev commented Oct 3, 2023

this is needed for ci/cd assets

justAssets := []*inventory.Asset{}
for _, asset := range assets {
asset.asset.KindString = asset.asset.GetPlatform().Kind
for k, v := range runtimeLabels {
Copy link
Contributor

Choose a reason for hiding this comment

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

do we not wanna check if its an automated env before applying all these? (saw that we have that check in v8)

Copy link
Contributor

Choose a reason for hiding this comment

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

if opts.AutoDetectCICDCategory && runtimeEnv.IsAutomatedEnv() || opts.Category == "cicd" {

Copy link
Member Author

Choose a reason for hiding this comment

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

we cannot check this in the same way in this part of the code. I am now checking if the root asset is ci/cd. This should indicate that we are doing a ci/cd scan

Signed-off-by: Ivan Milchev <[email protected]>
@imilchev imilchev merged commit 634de0b into main Oct 4, 2023
8 checks passed
@imilchev imilchev deleted the ivan/k8s-cicd branch October 4, 2023 06:25
@github-actions github-actions bot locked and limited conversation to collaborators Oct 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants