Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

APL-2322 Move Amazon linux install script test to new-e2e #21149

Merged
merged 27 commits into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
fae314e
Add support for ARM tests, and create debian arm test with new-e2e
KevinFairise2 Nov 16, 2023
810b26e
Remove debian arm64 a7 tests kitchen
KevinFairise2 Nov 16, 2023
615594c
Fix typo
KevinFairise2 Nov 16, 2023
7025791
Remove debian from upload deps
KevinFairise2 Nov 16, 2023
125d8b9
Add arm to e2e test upload
KevinFairise2 Nov 16, 2023
bacc6d1
Pass architecture to install
KevinFairise2 Nov 17, 2023
0d19291
Add different flavor and update tests
KevinFairise2 Nov 20, 2023
f7f2689
Merge branch 'main' into kfairise/support-flavor
KevinFairise2 Nov 20, 2023
5287951
Fix launch frequency
KevinFairise2 Nov 20, 2023
1796e02
Merge branch 'main' into kfairise/support-flavor
KevinFairise2 Nov 20, 2023
149942d
Merge branch 'main' into kfairise/support-flavor
KevinFairise2 Nov 21, 2023
f08b754
Remove other flavor install script tests
KevinFairise2 Nov 21, 2023
397cfda
Add flavor in stack name
KevinFairise2 Nov 21, 2023
40990ef
Update invoke task for agent version tests
KevinFairise2 Nov 22, 2023
df98304
Small refacto and add agent 6
KevinFairise2 Nov 22, 2023
4fb93ba
update TARGET -> TARGETS
KevinFairise2 Nov 27, 2023
33af01e
Merge branch 'main' into kfairise/support-agent-6-tests
KevinFairise2 Nov 27, 2023
7cc56a6
Update vars
KevinFairise2 Nov 27, 2023
f0fa879
Fix version script and var name
KevinFairise2 Nov 27, 2023
3a304f1
Remove trailing newline
KevinFairise2 Nov 27, 2023
926b94e
Merge branch 'main' into kfairise/support-agent-6-tests
KevinFairise2 Nov 28, 2023
9e868f9
Update target
KevinFairise2 Nov 28, 2023
80cea88
Set flavor datadog-agent
KevinFairise2 Nov 28, 2023
2c32c3f
Add new AL tests and remove kitchen tests
KevinFairise2 Nov 28, 2023
16259eb
Add new AL tests and remove kitchen tests
KevinFairise2 Nov 28, 2023
1c1f286
Add new AL tests and remove kitchen tests
KevinFairise2 Nov 28, 2023
fe0b83c
Merge branch 'main' into kfairise/amazonlinux-to-new-e2e
KevinFairise2 Nov 29, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitlab/e2e_test_junit_upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ e2e_test_junit_upload:
- new-e2e-agent-platform-install-script-debian-iot-agent-a7-x86_64
- new-e2e-agent-platform-install-script-debian-dogstatsd-a7-x86_64
- new-e2e-agent-platform-install-script-debian-heroku-agent-a7-x86_64
- new-e2e-agent-platform-install-script-amazonlinux-a6-x86_64
- new-e2e-agent-platform-install-script-amazonlinux-a6-arm64
- new-e2e-agent-platform-install-script-amazonlinux-a7-x64
- new-e2e-agent-platform-install-script-amazonlinux-a7-arm64
- new-e2e-npm-main
- new-e2e-cws-main
script:
Expand Down
1 change: 0 additions & 1 deletion .gitlab/kitchen_testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# Contains jobs which run kitchen tests on the Agent packages.

include:
- /.gitlab/kitchen_testing/amazonlinux.yml
- /.gitlab/kitchen_testing/centos.yml
- /.gitlab/kitchen_testing/debian.yml
- /.gitlab/kitchen_testing/suse.yml
Expand Down
96 changes: 0 additions & 96 deletions .gitlab/kitchen_testing/amazonlinux.yml

This file was deleted.

4 changes: 0 additions & 4 deletions .gitlab/kitchen_tests_upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ kitchen_tests_upload_common:
- !reference [.except_mergequeue]
- when: always
dependencies:
- kitchen_amazonlinux_install_script_agent-a6_arm64
- kitchen_amazonlinux_install_script_agent-a6_x64
- kitchen_amazonlinux_install_script_agent-a7_arm64
- kitchen_amazonlinux_install_script_agent-a7_x64
- kitchen_centos_fips_install_script_agent-a6
- kitchen_centos_fips_install_script_agent-a7
- kitchen_centos_fips_install_script_dogstatsd-a7
Expand Down
1 change: 1 addition & 0 deletions .gitlab/new-e2e_testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@

include:
- /.gitlab/new-e2e_testing/debian.yml
- /.gitlab/new-e2e_testing/amazonlinux.yml
90 changes: 90 additions & 0 deletions .gitlab/new-e2e_testing/amazonlinux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@

.new-e2e_os_amazonlinux:
variables:
E2E_PLATFORM: amazonlinux

.new-e2e_install_script:
variables:
TARGETS: ./tests/agent-platform/install-script
TEAM: agent-platform
EXTRA_PARAMS: --osversion $E2E_OSVERS --platform $E2E_PLATFORM --cws-supported-osversion $E2E_CWS_SUPPORTED_OSVERS --major-version $AGENT_MAJOR_VERSION --arch $E2E_ARCH --flavor $FLAVOR

.new-e2e_amazonlinux_a6_x86_64:
variables:
E2E_ARCH: x86_64
E2E_OSVERS: "amazonlinux2-5-10,amazonlinux2022-5-15,amazonlinux2023"
E2E_CWS_SUPPORTED_OSVERS: "amazonlinux2-5-10,amazonlinux2022-5-15,amazonlinux2023"
E2E_BRANCH_OSVERS: "amazonlinux2023"
needs: ["deploy_rpm_testing-a6_x64"]

.new-e2e_amazonlinux_a6_arm64:
variables:
E2E_ARCH: arm64
E2E_OSVERS: "amazonlinux2-5-10,amazonlinux2022-5-15,amazonlinux2023"
E2E_CWS_SUPPORTED_OSVERS: "amazonlinux2-5-10,amazonlinux2022-5-15,amazonlinux2023"
E2E_BRANCH_OSVERS: "amazonlinux2023"
needs: ["deploy_rpm_testing-a6_arm64"]

.new-e2e_amazonlinux_a7_x86_64:
variables:
E2E_ARCH: x86_64
E2E_OSVERS: "amazonlinux2-5-10,amazonlinux2022-5-15,amazonlinux2023"
E2E_CWS_SUPPORTED_OSVERS: "amazonlinux2-5-10,amazonlinux2022-5-15,amazonlinux2023"
E2E_BRANCH_OSVERS: "amazonlinux2023"
needs: ["deploy_rpm_testing-a7_x64"]

.new-e2e_amazonlinux_a7_arm64:
variables:
E2E_ARCH: arm64
E2E_OSVERS: "amazonlinux2-5-10,amazonlinux2022-5-15,amazonlinux2023"
E2E_CWS_SUPPORTED_OSVERS: "amazonlinux2-5-10,amazonlinux2022-5-15,amazonlinux2023"
E2E_BRANCH_OSVERS: "amazonlinux2023"
needs: ["deploy_rpm_testing-a7_arm64"]

new-e2e-agent-platform-install-script-amazonlinux-a6-x86_64:
stage: kitchen_testing
extends:
- .new_e2e_template
- .new-e2e_install_script
- .new-e2e_os_amazonlinux
- .new-e2e_amazonlinux_a6_x86_64
- .new-e2e_agent_a6
variables:
FLAVOR: datadog-agent

new-e2e-agent-platform-install-script-amazonlinux-a6-arm64:
stage: kitchen_testing
extends:
- .new_e2e_template
- .new-e2e_install_script
- .new-e2e_os_amazonlinux
- .new-e2e_amazonlinux_a6_arm64
- .new-e2e_agent_a6
variables:
FLAVOR: datadog-agent

new-e2e-agent-platform-install-script-amazonlinux-a7-x64:
stage: kitchen_testing
extends:
- .new_e2e_template
- .new-e2e_install_script
- .new-e2e_os_amazonlinux
- .new-e2e_amazonlinux_a7_x86_64
- .new-e2e_agent_a7
rules:
!reference [.on_default_new-e2e_tests_a7]
variables:
FLAVOR: datadog-agent

new-e2e-agent-platform-install-script-amazonlinux-a7-arm64:
stage: kitchen_testing
extends:
- .new_e2e_template
- .new-e2e_install_script
- .new-e2e_os_amazonlinux
- .new-e2e_amazonlinux_a7_arm64
- .new-e2e_agent_a7
rules:
!reference [.on_all_new-e2e_tests_a7]
variables:
FLAVOR: datadog-agent
25 changes: 25 additions & 0 deletions test/new-e2e/tests/agent-platform/common/pkg-manager/yum.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// Unless explicitly stated otherwise all files in this repository are licensed
// under the Apache License Version 2.0.
// This product includes software developed at Datadog (https://www.datadoghq.com/).
// Copyright 2016-present Datadog, Inc.

package pkgmanager

import (
e2eClient "github.com/DataDog/datadog-agent/test/new-e2e/pkg/utils/e2e/client"
)

// YumPackageManager struct for the Yum package manager
type YumPackageManager struct {
vmClient e2eClient.VM
}

// NewYumPackageManager return yum package manager
func NewYumPackageManager(vmClient e2eClient.VM) *YumPackageManager {
return &YumPackageManager{vmClient: vmClient}
}

// Remove executes remove command from yum
func (s *YumPackageManager) Remove(pkg string) (string, error) {
return s.vmClient.ExecuteWithError("sudo yum remove -y " + pkg)
}
4 changes: 4 additions & 0 deletions test/new-e2e/tests/agent-platform/common/test_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ func getPackageManager(vmClient e2eClient.VM) PackageManager {
if _, err := vmClient.ExecuteWithError("command -v apt"); err == nil {
return pkgmanager.NewAptPackageManager(vmClient)
}

if _, err := vmClient.ExecuteWithError("command -v yum"); err == nil {
return pkgmanager.NewYumPackageManager(vmClient)
}
spencergilbert marked this conversation as resolved.
Show resolved Hide resolved
return nil
}

Expand Down
14 changes: 14 additions & 0 deletions test/new-e2e/tests/agent-platform/platforms/platforms.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,19 @@
"debian-11": "ami-03ea090ddd75eb738",
"debian-12": "ami-02aab8d5301cb8d68"
}
},
"amazonlinux": {
"x86_64": {
"amazonlinux2-4-14": "ami-038b3df3312ddf25d",
"amazonlinux2-5-10": "ami-06a0cd9728546d178",
"amazonlinux2022-5-15": "ami-0309aede310b9cc1f",
"amazonlinux2023": "ami-0889a44b331db0194"
},
"arm64": {
"amazonlinux2-4-14": "ami-090230ed0c6b13c74",
"amazonlinux2-5-10": "ami-09e51988f56677f44",
"amazonlinux2022-5-15": "ami-0a8495f6303122235",
"amazonlinux2023": "ami-08fc6fb8ad2e794bb"
}
}
}