Skip to content

Commit 1ac33f1

Browse files
crespocarloskibanamachineelasticmachine
authored
[8.18] [APM] Configure fleet docker container for APM tests (#230398) (#230639)
# Backport This will backport the following commits from `main` to `8.18`: - [[APM] Configure fleet docker container for APM tests (#230398)](#230398) <!--- Backport version: 10.0.1 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Carlos Crespo","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-08-05T11:12:35Z","message":"[APM] Configure fleet docker container for APM tests (#230398)\n\ncloses [228305](https://github.com/elastic/kibana/issues/228305)\ncloses [228130](https://github.com/elastic/kibana/issues/228130)\n\n## Summary\n\nThis PR follows this suggestion\nhttps://github.com//issues/228305#issuecomment-3103601583\nto use dockerized epm registry environment in CI","sha":"15456349ea853b8eebae28e23f4cfc1f48088375","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","ci:project-deploy-observability","Team:obs-ux-infra_services","backport:version","v8.18.0","v9.1.0","v8.19.0","v9.2.0"],"title":"[APM] Configure fleet docker container for APM tests","number":230398,"url":"https://github.com/elastic/kibana/pull/230398","mergeCommit":{"message":"[APM] Configure fleet docker container for APM tests (#230398)\n\ncloses [228305](https://github.com/elastic/kibana/issues/228305)\ncloses [228130](https://github.com/elastic/kibana/issues/228130)\n\n## Summary\n\nThis PR follows this suggestion\nhttps://github.com//issues/228305#issuecomment-3103601583\nto use dockerized epm registry environment in CI","sha":"15456349ea853b8eebae28e23f4cfc1f48088375"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18","9.1","8.19"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/230398","number":230398,"mergeCommit":{"message":"[APM] Configure fleet docker container for APM tests (#230398)\n\ncloses [228305](https://github.com/elastic/kibana/issues/228305)\ncloses [228130](https://github.com/elastic/kibana/issues/228130)\n\n## Summary\n\nThis PR follows this suggestion\nhttps://github.com//issues/228305#issuecomment-3103601583\nto use dockerized epm registry environment in CI","sha":"15456349ea853b8eebae28e23f4cfc1f48088375"}}]}] BACKPORT--> --------- Co-authored-by: kibanamachine <[email protected]> Co-authored-by: Elastic Machine <[email protected]>
1 parent 5b2b431 commit 1ac33f1

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

x-pack/test/apm_api_integration/common/config.ts

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,13 @@ import {
1515
createLogger,
1616
LogLevel,
1717
} from '@kbn/apm-synthtrace';
18-
import { FtrConfigProviderContext, kbnTestConfig } from '@kbn/test';
18+
import {
19+
FtrConfigProviderContext,
20+
defineDockerServersConfig,
21+
fleetPackageRegistryDockerImage,
22+
kbnTestConfig,
23+
} from '@kbn/test';
24+
import path from 'path';
1925
import supertest from 'supertest';
2026
import { format, UrlObject } from 'url';
2127
import { MachineLearningAPIProvider } from '../../functional/services/ml/api';
@@ -115,7 +121,23 @@ export function createTestConfig(
115121
const esServer = servers.elasticsearch as UrlObject;
116122
const synthtraceKibanaClient = getApmSynthtraceKibanaClient(kibanaServerUrl);
117123

124+
const dockerRegistryPort: string | undefined = process.env.FLEET_PACKAGE_REGISTRY_PORT;
125+
126+
const packageRegistryConfig = path.join(__dirname, './fixtures/package_registry_config.yml');
127+
const dockerArgs: string[] = ['-v', `${packageRegistryConfig}:/package-registry/config.yml`];
128+
118129
return {
130+
dockerServers: defineDockerServersConfig({
131+
registry: {
132+
enabled: !!dockerRegistryPort,
133+
image: fleetPackageRegistryDockerImage,
134+
portInContainer: 8080,
135+
port: dockerRegistryPort,
136+
args: dockerArgs,
137+
waitForLogLine: 'package manifests loaded',
138+
waitForLogLineTimeoutMs: 60 * 4 * 1000, // 4 minutes
139+
},
140+
}),
119141
testFiles: [require.resolve('../tests')],
120142
servers,
121143
servicesRequiredForTestAnalysis: ['apmFtrConfig', 'registry'],
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
package_paths:
2+
- /packages/package-storage

0 commit comments

Comments
 (0)