Skip to content

Commit d3c4f47

Browse files
skhruflinjen-huang
authored
[Fleet] Use staging registry for snapshot builds (#90327) (#90911)
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 <[email protected]> Co-authored-by: Nicolas Ruflin <[email protected]> Co-authored-by: Jen Huang <[email protected]>
1 parent 53b8f45 commit d3c4f47

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

x-pack/plugins/fleet/server/services/epm/registry/registry_url.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { appContextService, licenseService } from '../../';
1212
// chose to comment them out vs @ts-ignore or @ts-expect-error on each line
1313

1414
const PRODUCTION_REGISTRY_URL_CDN = 'https://epr.elastic.co';
15-
// const STAGING_REGISTRY_URL_CDN = 'https://epr-staging.elastic.co';
15+
const STAGING_REGISTRY_URL_CDN = 'https://epr-staging.elastic.co';
1616
const SNAPSHOT_REGISTRY_URL_CDN = 'https://epr-snapshot.elastic.co';
1717

1818
// const PRODUCTION_REGISTRY_URL_NO_CDN = 'https://epr.ea-web.elastic.dev';
@@ -23,6 +23,8 @@ const getDefaultRegistryUrl = (): string => {
2323
const branch = appContextService.getKibanaBranch();
2424
if (branch === 'master') {
2525
return SNAPSHOT_REGISTRY_URL_CDN;
26+
} else if (appContextService.getKibanaVersion().includes('-SNAPSHOT')) {
27+
return STAGING_REGISTRY_URL_CDN;
2628
} else {
2729
return PRODUCTION_REGISTRY_URL_CDN;
2830
}

0 commit comments

Comments
 (0)