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

✨ rename fleet => inventory #748

Merged
merged 1 commit into from
Sep 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/cnspec/cmd/scan.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func init() {

// v6 should make detect-cicd and category flag public
scanCmd.Flags().Bool("detect-cicd", true, "Try to detect CI/CD environments. If detected, set the asset category to 'cicd'.")
scanCmd.Flags().String("category", "fleet", "Set the category for the assets to 'fleet|cicd'.")
scanCmd.Flags().String("category", "inventory", "Set the category for the assets to 'inventory|cicd'.")
scanCmd.Flags().MarkHidden("category")
}

Expand Down
2 changes: 1 addition & 1 deletion apps/cnspec/cmd/vuln.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ var vulnCmd = &cobra.Command{

// // v6 should make detect-cicd and category flag public, default for "detect-cicd" should switch to true
// cmd.Flags().Bool("detect-cicd", true, "Try to detect CI/CD environments. If successful, sets the asset category to 'cicd'.")
// cmd.Flags().String("category", "fleet", "Set the category for the assets to 'fleet|cicd'.")
// cmd.Flags().String("category", "inventory", "Set the category for the assets to 'inventory|cicd'.")
// cmd.Flags().MarkHidden("category")

// // output rendering
Expand Down
6 changes: 3 additions & 3 deletions cli/reporter/print_compact.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,15 +167,15 @@ func (r *defaultReporter) printSummary(orderedAssets []assetMrnName) {
url := ""
if len(orderedAssets) > 1 {
// we do not have a space url, so we extract it form the asset url
// https://console.mondoo.com/space/fleet/2JtqGyVTZULTW0uwQ5YxXW4nh6Y?spaceId=dazzling-golick-767384
// https://console.mondoo.com/space/inventory/2JtqGyVTZULTW0uwQ5YxXW4nh6Y?spaceId=dazzling-golick-767384
// an individual asset url wouldn't make sense here
// when runnin inside cicd, we create an url for the cicd project
spaceUrlRegexp := regexp.MustCompile(`^(http.*)/fleet/[a-zA-Z0-9-]+(\?.+)$`)
spaceUrlRegexp := regexp.MustCompile(`^(http.*)/inventory/[a-zA-Z0-9-]+(\?.+)$`)
m := spaceUrlRegexp.FindStringSubmatch(assetUrl)
if projectId != "" {
url = m[1] + "/cicd/jobs" + m[2] + "&projectId=" + projectId
} else {
url = m[1] + "/fleet" + m[2]
url = m[1] + "/inventory" + m[2]
}

} else {
Expand Down
2 changes: 1 addition & 1 deletion cli/reporter/testdata/report-ubuntu.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"labels": {
"mondoo.com/project-id": ""
},
"url": "https://console.mondoo.com/space/fleet/2DRZ1cCWFyTYCArycAXHwvn1oU2?spaceId=dazzling-golick-767384"
"url": "https://console.mondoo.com/space/inventory/2DRZ1cCWFyTYCArycAXHwvn1oU2?spaceId=dazzling-golick-767384"
}
},
"bundle": {
Expand Down