Skip to content
Open
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
8 changes: 5 additions & 3 deletions artifactory/commands/transferconfig/transferconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,7 @@ func (tcc *TransferConfigCommand) createImportPollingAction(rtDetails *httputils
newServerDetails.SetPassword(tcc.SourceServerDetails.GetPassword())
newServerDetails.SetAccessToken(tcc.SourceServerDetails.GetAccessToken())


tcc.TargetArtifactoryManager, err = utils.CreateServiceManager(newServerDetails, -1, 0, false)
if err != nil {
return true, nil, err
Expand Down Expand Up @@ -504,9 +505,10 @@ func (tcc *TransferConfigCommand) updateServerDetails() error {
pingCmd := generic.NewPingCommand().SetServerDetails(newTargetServerDetails)
err := pingCmd.Run()
if err != nil {
return err
log.Warn("Ping to the target Artifactory failed. Please Ignore this warning if you are transferring the config to a new Artifactory server. Error: ", err)
} else {
log.Info("Ping to the target Artifactory was successful. Updating the server configuration in JFrog CLI.")
}
log.Info("Ping to the target Artifactory was successful. Updating the server configuration in JFrog CLI.")

// Update the server details in JFrog CLI configuration
configCmd := commands.NewConfigCommand(commands.AddOrEdit, newTargetServerDetails.ServerId).SetInteractive(false).SetDetails(newTargetServerDetails)
Expand Down Expand Up @@ -573,4 +575,4 @@ func (tcc *TransferConfigCommand) validateServerPrerequisites() (err error) {
}
// Make sure that the target Artifactory is empty and the config-import plugin is installed
return tcc.validateTargetServer()
}
}
Loading