Skip to content
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
12 changes: 10 additions & 2 deletions build/ci/evergreen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ tasks:
- func: "install golangci-lint"
- func: "lint"
- name: snyk_scan
tags: ["code_health"]
tags: ["snyk"]
commands:
- func: "clone"
- func: "install snyk"
Expand Down Expand Up @@ -1339,6 +1339,14 @@ buildvariants:
go_bin: "/opt/golang/go1.18/bin"
tasks:
- name: ".ops-manager-50"

- name: snyk
display_name: "Snyk"
run_on:
- rhel80-small
expansions:
go_root: "/opt/golang/go1.18"
go_bin: "/opt/golang/go1.18/bin"
tasks:
- name: .snyk
include:
- filename: build/ci/release.yml
2 changes: 1 addition & 1 deletion internal/cli/atlas/quickstart/confirm_cluster_setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Cluster Disk Size (GiB): %.1f`, opts.Tier, diskSize)
[Confirm cluster settings]
Cluster Name: %s%s
Cloud Provider and Region: %s
Database Username: %s
Database User Username: %s
Allow connections from (IP Address): %s%s
`,
opts.ClusterName,
Expand Down
5 changes: 3 additions & 2 deletions internal/cli/atlas/quickstart/confirm_default_setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,11 @@ Load sample data: Yes`
Cluster Tier: %s
Cluster Disk Size (GiB): %.1f`, opts.Tier, diskSize)
}
fmt.Printf(`[Default Settings]
fmt.Printf(`
[Default Settings]
Cluster Name: %s%s
Cloud Provider and Region: %s
Database Username: %s
Database User Username: %s
Allow connections from (IP Address): %s%s`,
values.ClusterName,
clusterTier+clusterDisk,
Expand Down
14 changes: 9 additions & 5 deletions internal/cli/atlas/quickstart/quick_start.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ Enter 'atlas cluster watch %s' to learn when your cluster is available.

const quickstartTemplateStoreWarning = `
Please store your database authentication access details in a secure location:
username: %s
password: %s
Database User Username: %s
Database User Password: %s
`

const quickstartTemplateIntro = `Press [Enter] to use the default values.
Expand Down Expand Up @@ -177,7 +177,8 @@ func (opts *Opts) Run() error {
return err
}

fmt.Printf(`We are deploying %s...`, opts.ClusterName)
fmt.Printf(`We are deploying %s...
`, opts.ClusterName)

fmt.Printf(quickstartTemplateStoreWarning, opts.DBUsername, opts.DBUserPassword)
opts.setupCloseHandler()
Expand All @@ -189,8 +190,6 @@ func (opts *Opts) Run() error {
return er
}

fmt.Print(quickstartTemplateCluster)

fmt.Print("Cluster created.")

if err := opts.loadSampleData(); err != nil {
Expand All @@ -200,6 +199,11 @@ func (opts *Opts) Run() error {
if err := opts.askMongoShellQuestion(); err != nil {
return err
}

// If user does not want to open MongoShell, skip everything below
if !opts.runMongoShell {
return nil
}
// Get cluster's connection string
cluster, err := opts.store.AtlasCluster(opts.ConfigProjectID(), opts.ClusterName)
if err != nil {
Expand Down
2 changes: 2 additions & 0 deletions internal/cli/atlas/quickstart/quick_start_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ func TestQuickstartOpts_Run(t *testing.T) {
Confirm: true,
}

opts.runMongoShell = true

projectIPAccessList := opts.newProjectIPAccessList()

mockStore.
Expand Down
2 changes: 1 addition & 1 deletion internal/cli/auth/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ type LoginConfig interface {

const (
AlreadyAuthenticatedMsg = "you are already authenticated with an API key (Public key: %s)"
AlreadyAuthenticatedEmailMsg = "you are already authenticated with an email (%s)"
AlreadyAuthenticatedEmailMsg = "you are already authenticated with an account (%s)"
LoginWithProfileMsg = `run "atlas auth login --profile <profile_name>" to authenticate using your Atlas username and password on a new profile`
LogoutToLoginAccountMsg = `run "atlas auth logout" first if you want to login with another Atlas account on the same Atlas CLI profile`
)
Expand Down