Skip to content

Commit 5313bce

Browse files
authored
Merge branch 'master' into RTECO-1539-cargo-implementation-phase-1
2 parents efdcf41 + b898f36 commit 5313bce

15 files changed

Lines changed: 824 additions & 139 deletions

common/commands/config.go

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ type ConfigCommand struct {
6262
serverId string
6363
// Preselected web login authentication method, supported on an interactive command only.
6464
useWebLogin bool
65+
// Preserve per-service URL prompts (Artifactory/Distribution/Xray/Mission Control/Pipelines),
66+
// for Artifactory v6.x self-hosted customers where these products don't share a single platform URL.
67+
legacy bool
6568
// Forcibly make the configured server default.
6669
makeDefault bool
6770
// For unit tests
@@ -94,6 +97,11 @@ func (cc *ConfigCommand) SetUseWebLogin(useWebLogin bool) *ConfigCommand {
9497
return cc
9598
}
9699

100+
func (cc *ConfigCommand) SetLegacy(legacy bool) *ConfigCommand {
101+
cc.legacy = legacy
102+
return cc
103+
}
104+
97105
func (cc *ConfigCommand) SetMakeDefault(makeDefault bool) *ConfigCommand {
98106
cc.makeDefault = makeDefault
99107
return cc
@@ -385,8 +393,10 @@ func (cc *ConfigCommand) getConfigurationFromUser() (err error) {
385393
}
386394

387395
disallowUsingSavedPassword := cc.fillSpecificUrlsFromPlatform()
388-
if err = cc.promptUrls(&disallowUsingSavedPassword); err != nil {
389-
return
396+
if cc.legacy {
397+
if err = cc.promptUrls(&disallowUsingSavedPassword); err != nil {
398+
return
399+
}
390400
}
391401

392402
if cc.details.Password == "" && cc.details.AccessToken == "" {
@@ -896,6 +906,7 @@ type ConfigCommandConfiguration struct {
896906
Interactive bool
897907
EncPassword bool
898908
BasicAuthOnly bool
909+
Legacy bool
899910
}
900911

901912
func GetAllServerIds() []string {

common/commands/execution_context.go

Lines changed: 336 additions & 59 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)