Skip to content

Commit

Permalink
[Fleet] Use staging registry for snapshot builds (#90327) (#90911)
Browse files Browse the repository at this point in the history
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 #90131

Co-authored-by: Jen Huang <its.jenetic@gmail.com>

Co-authored-by: Nicolas Ruflin <spam@ruflin.com>
Co-authored-by: Jen Huang <its.jenetic@gmail.com>
  • Loading branch information
3 people authored Feb 10, 2021
1 parent 53b8f45 commit d3c4f47
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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;
}
Expand Down

0 comments on commit d3c4f47

Please sign in to comment.