[Fleet] Use staging registry for snapshot builds (#90327)
The staging registry is used in Kibana builds which are not built of the master branch or release version. This means, any build ending with `-SNAPSHOT` not the master branch will use the staging registry. Closes https://github.com/elastic/kibana/issues/90131 Co-authored-by: Jen Huang <its.jenetic@gmail.com>
This commit is contained in:
parent
240da2bf2a
commit
634c0b3424
1 changed files with 3 additions and 1 deletions
|
@ -12,7 +12,7 @@ import { appContextService, licenseService } from '../../';
|
|||
// chose to comment them out vs @ts-ignore or @ts-expect-error on each line
|
||||
|
||||
const PRODUCTION_REGISTRY_URL_CDN = 'https://epr.elastic.co';
|
||||
// const STAGING_REGISTRY_URL_CDN = 'https://epr-staging.elastic.co';
|
||||
const STAGING_REGISTRY_URL_CDN = 'https://epr-staging.elastic.co';
|
||||
const SNAPSHOT_REGISTRY_URL_CDN = 'https://epr-snapshot.elastic.co';
|
||||
|
||||
// const PRODUCTION_REGISTRY_URL_NO_CDN = 'https://epr.ea-web.elastic.dev';
|
||||
|
@ -23,6 +23,8 @@ const getDefaultRegistryUrl = (): string => {
|
|||
const branch = appContextService.getKibanaBranch();
|
||||
if (branch === 'master') {
|
||||
return SNAPSHOT_REGISTRY_URL_CDN;
|
||||
} else if (appContextService.getKibanaVersion().includes('-SNAPSHOT')) {
|
||||
return STAGING_REGISTRY_URL_CDN;
|
||||
} else {
|
||||
return PRODUCTION_REGISTRY_URL_CDN;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue