diff --git a/cloud/endpoints.go b/cloud/endpoints.go index 0afa25b5..1c78efc5 100644 --- a/cloud/endpoints.go +++ b/cloud/endpoints.go @@ -29,7 +29,6 @@ import ( ) const ( - QodanaEndpointOldEnv = "ENDPOINT" QodanaEndpointEnv = "QODANA_ENDPOINT" QodanaCloudRequestCooldownEnv = "QODANA_CLOUD_REQUEST_COOLDOWN" QodanaCloudRequestTimeoutEnv = "QODANA_CLOUD_REQUEST_TIMEOUT" @@ -76,8 +75,7 @@ func GetCloudRootEndpoint() *QdRootEndpoint { if endpoint != nil { return endpoint } - oldEnvValue := GetEnvWithDefault(QodanaEndpointOldEnv, DefaultEndpoint) - userUrl := GetEnvWithDefault(QodanaEndpointEnv, oldEnvValue) + userUrl := GetEnvWithDefault(QodanaEndpointEnv, DefaultEndpoint) host, err := parseRawURL(userUrl) if err != nil { log.Fatal(err) diff --git a/platform/env.go b/platform/env.go index 28e52ff0..bdfd4b83 100644 --- a/platform/env.go +++ b/platform/env.go @@ -18,6 +18,7 @@ package platform import ( "fmt" + "github.com/JetBrains/qodana-cli/v2024/cloud" cienvironment "github.com/cucumber/ci-environment/go" log "github.com/sirupsen/logrus" "net/url" @@ -61,6 +62,9 @@ func ExtractQodanaEnvironment(setEnvironmentFunc func(string, string)) { if license := os.Getenv(QodanaLicense); license != "" { setEnvironmentFunc(QodanaLicense, license) } + if endpoint := os.Getenv(cloud.QodanaEndpointEnv); endpoint != "" { + setEnvironmentFunc(cloud.QodanaEndpointEnv, endpoint) + } if remoteUrl := os.Getenv(QodanaRemoteUrl); remoteUrl != "" { setEnvironmentFunc(QodanaRemoteUrl, remoteUrl) }