-
Notifications
You must be signed in to change notification settings - Fork 39
feat: add support for running the tests in ARM #707
Changes from 6 commits
b618488
17c836f
9eb92ea
e47600e
c009e8d
a880fcd
34bcaf3
f8a0d51
0cd42e0
d42766d
6663c23
33bc88e
c7193a2
8e7bf49
05ea8ce
d51a013
5a8a4ae
235e3bb
8326a23
7a8d36c
30053ab
04555b2
529fc73
ac6d3a0
fbcbdcf
b4d6601
9a20396
65d5010
610d0b8
e83517b
9d3dadb
e6c65c9
2d1dc07
855f949
5528a1b
b3c33c0
b8bdbe5
f2e57c6
99426de
6c2f21b
4906816
a14eebb
1d3770d
4cb4afa
9f4522a
e1d355b
d045f10
7142ab8
496b5ef
6bdf785
bae9a66
33deffa
73fb39f
a755f6f
7883dbb
63ca5f1
11f2d22
f8632dd
6749590
fbe8cd6
9104501
ac300e2
01cc441
2d9e29f
b31a67b
4e46490
43e9e6d
84b93b4
339a052
b4cd209
e9e39ff
52161a6
5be1485
6ed5d55
080da73
ce81c7c
72130dd
9f347d5
9ef81ca
0128c1b
bb7eea0
752594d
bd198ee
95532aa
0ece4da
aa09c0e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -322,8 +322,15 @@ def generateFunctionalTestStep(Map args = [:]){ | |
| } | ||
| tags += excludeNightlyTag | ||
|
|
||
| workerLabels = "${platform}" | ||
| if (platform != "arm") { | ||
| // ARM is not ready as immutable workers | ||
| workerLabels += " && immutable" | ||
| } | ||
| workerLabels += " && docker" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will add this!
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Mmm... does it mean that we cannot use |
||
|
|
||
| return { | ||
| node("${platform} && immutable && docker") { | ||
| node("${workerLabels}") { | ||
| try { | ||
| deleteDir() | ||
| unstash 'source' | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -75,7 +75,8 @@ func (sats *StandAloneTestSuite) aStandaloneAgentIsDeployed(image string) error | |||||
|
|
||||||
| dockerInstaller.PreInstallFn() | ||||||
|
|
||||||
| dockerImageTag += "-amd64" | ||||||
| arch := e2e.GetArchitecture() | ||||||
| dockerImageTag += "-" + arch | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Docker images are pushed to the docker registry, and their tag name contains the architecture, for further details refers to elastic/beats#24121 |
||||||
| } | ||||||
|
|
||||||
| serviceManager := services.NewServiceManager() | ||||||
|
|
@@ -99,7 +100,7 @@ func (sats *StandAloneTestSuite) aStandaloneAgentIsDeployed(image string) error | |||||
|
|
||||||
| profileEnv["elasticAgentContainerName"] = containerName | ||||||
| profileEnv["elasticAgentConfigFile"] = sats.AgentConfigFilePath | ||||||
| profileEnv["elasticAgentPlatform"] = "linux/amd64" | ||||||
| profileEnv["elasticAgentPlatform"] = "linux/" + e2e.GetArchitecture() | ||||||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reuse the variable
Suggested change
|
||||||
| profileEnv["elasticAgentTag"] = dockerImageTag | ||||||
|
|
||||||
| err = serviceManager.AddServicesToCompose(context.Background(), FleetProfileName, []string{ElasticAgentServiceName}, profileEnv) | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -239,7 +239,8 @@ func InitializeMetricbeatTestSuite(ctx *godog.TestSuiteContext) { | |
| serviceManager := services.NewServiceManager() | ||
|
|
||
| env := map[string]string{ | ||
| "stackVersion": stackVersion, | ||
| "stackPlatform": "linux/" + e2e.GetArchitecture(), | ||
| "stackVersion": stackVersion, | ||
| } | ||
|
|
||
| err := serviceManager.RunCompose(true, []string{"metricbeat"}, env) | ||
|
|
@@ -394,7 +395,8 @@ func (mts *MetricbeatTestSuite) runMetricbeatService() error { | |
| useCISnapshots := shell.GetEnvBool("BEATS_USE_CI_SNAPSHOTS") | ||
| beatsLocalPath := shell.GetEnv("BEATS_LOCAL_PATH", "") | ||
| if useCISnapshots || beatsLocalPath != "" { | ||
| artifactName := e2e.BuildArtifactName("metricbeat", mts.Version, metricbeatVersionBase, "linux", "amd64", "tar.gz", true) | ||
| arch := e2e.GetArchitecture() | ||
| artifactName := e2e.BuildArtifactName("metricbeat", mts.Version, metricbeatVersionBase, "linux", arch, "tar.gz", true) | ||
|
|
||
| imagePath, err := e2e.FetchBeatsBinary(artifactName, "metricbeat", mts.Version, metricbeatVersionBase, timeoutFactor, true) | ||
| if err != nil { | ||
|
|
@@ -408,7 +410,7 @@ func (mts *MetricbeatTestSuite) runMetricbeatService() error { | |
|
|
||
| err = docker.TagImage( | ||
| "docker.elastic.co/beats/metricbeat:"+metricbeatVersionBase, | ||
| "docker.elastic.co/observability-ci/metricbeat:"+mts.Version+"-amd64", | ||
| "docker.elastic.co/observability-ci/metricbeat:"+mts.Version+"-"+arch, | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Docker images are pushed to the docker registry, and their tag name contains the architecture, for further details refers to elastic/beats#24121 |
||
| ) | ||
| } | ||
|
|
||
|
|
@@ -429,19 +431,21 @@ func (mts *MetricbeatTestSuite) runMetricbeatService() error { | |
| logLevel = log.DebugLevel.String() | ||
| } | ||
|
|
||
| arch := e2e.GetArchitecture() | ||
|
|
||
| env := map[string]string{ | ||
| "BEAT_STRICT_PERMS": "false", | ||
| "indexName": mts.getIndexName(), | ||
| "logLevel": logLevel, | ||
| "metricbeatConfigFile": mts.configurationFile, | ||
| "metricbeatTag": mts.Version, | ||
| "stackVersion": stackVersion, | ||
| mts.ServiceName + "Tag": mts.ServiceVersion + "-amd64", | ||
| mts.ServiceName + "Tag": mts.ServiceVersion + "-" + arch, | ||
| "serviceName": mts.ServiceName, | ||
| } | ||
|
|
||
| env["metricbeatDockerNamespace"] = e2e.GetDockerNamespaceEnvVar() | ||
| env["metricbeatPlatform"] = "linux/amd64" | ||
| env["metricbeatPlatform"] = "linux/" + arch | ||
|
|
||
| err := serviceManager.AddServicesToCompose(testSuite.currentContext, "metricbeat", []string{"metricbeat"}, env) | ||
| if err != nil { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you describe the intent of the branching? I see it has to do with immutable workers, but don't have context - maybe that is what you could comment better on?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly, this is how Infra's workers are labelled: arm are not immutable yet